Timed event every day at 23:00 - solved

Hi

is there a way to program a timed event for each day at a specific time?

thx
Jipp

Hey @jipp,

sure, just set EVENTTIME to 23:00 and RECUREVERY to 86400. That triggers the event every day at the same time.

Alternatively you can use the “timer” node. There you can also set times depending on the position of the sun (like sunrise or sunset).

Cheers,

Sathya

Do you have some more Details about the timed Node?

What do you want to know?

The node can be used in Node-BLUE (accessible through http://[homegear ip]:2001/flows). There it can be used to trigger time based events - either at a specific time or at a time point defined by the sun position.

An importable example from my home turning on some lights at night:

[{"id":"fbcfc43.1273a38","type":"comment","namespace":"comment","z":"e75b7fd7.a33d6","name":"AuĂźenlampen nachts einschalten","info":"","x":145,"y":420,"wires":[]},{"id":"afabef4b.0ac4c","type":"light","namespace":"light","z":"e75b7fd7.a33d6","variabletype":"device","family":"11","peerid":"1","channel":"2","variable":"STATE","variabletext":"","lighttype":"switch","offvalue":"0","onvalue":"100","twoinputs":false,"inputs":1,"name":"","x":655,"y":470,"wires":[]},{"id":"162f0333.79fa65","type":"light","namespace":"light","z":"e75b7fd7.a33d6","variabletype":"device","family":"11","peerid":"12","channel":"1","variable":"STATE","variabletext":"","lighttype":"switch","offvalue":"0","onvalue":"100","twoinputs":false,"inputs":1,"name":"","x":655,"y":520,"wires":[]},{"id":"2d3527a1.5e5938","type":"light","namespace":"light","z":"e75b7fd7.a33d6","variabletype":"device","family":"11","peerid":"12","channel":"2","variable":"STATE","variabletext":"","lighttype":"switch","offvalue":"0","onvalue":"100","twoinputs":false,"inputs":1,"name":"","x":655,"y":570,"wires":[]},{"id":"87adecee.306ee8","type":"timer","namespace":"timers","z":"e75b7fd7.a33d6","name":"","startup":true,"ontime":"sunset","ontimetype":"suntime","offtime":"sunrise","offtimetype":"suntime","lat":"54.28438","lon":"10.17234","startoff":"15","endoff":"-15","sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"x":80,"y":470,"wires":[[{"id":"afabef4b.0ac4c","port":0},{"id":"162f0333.79fa65","port":0},{"id":"2d3527a1.5e5938","port":0}]]}]

Cheers,

Sathya

wow

looks quite cool - ist her any documentation about this?
like Username/password to log in?

cheers
jipp

Hi

One additional question:

the time is given as UTC. this would mean that summer/winter time change is not recognized?

thx
Jipp

Not yet… But the usage is pretty much the same as with Node-RED - except scripting is done in PHP.

Default user name and password “homegear”. Users can be created or the password changed in Homegear’s CLI.

No, the time is the local time. So summer/winter time is recognized. Remember to set the time zone correctly in Raspbian.

Cheers,

Sathya

Hi

in the meantime I use the ro image provided. So far pretty good.

when now using the link above: http://homegear:2001/flows/signin.php

I can type in username and password - in case its wrong I got an error messages which is ok.

in case its correct I’m diverted to the login-page again and see the following in the logs:

06/18/17 16:40:07.142 Scriptengine (/var/lib/homegear/www/rpc/flows/signin.php): PHP Warning:  session_start(): open(/var/lib/homegear/tmp/php/sess_c1a5936fd3c11be1861d7521b3d15a14, O_RDWR) failed: No such file or directory (2) in /var/lib/homegear/flows/www/user.php on line 6
06/18/17 16:40:07.143 Scriptengine (/var/lib/homegear/www/rpc/flows/signin.php): PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/homegear/tmp/php) in /var/lib/homegear/flows/www/user.php on line 6
06/18/17 16:40:07.181 Scriptengine (/var/lib/homegear/www/rpc/flows/index.php): PHP Warning:  session_start(): open(/var/lib/homegear/tmp/php/sess_c1a5936fd3c11be1861d7521b3d15a14, O_RDWR) failed: No such file or directory (2) in /var/lib/homegear/flows/www/user.php on line 6
06/18/17 16:40:07.181 Scriptengine (/var/lib/homegear/www/rpc/flows/index.php): PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/homegear/tmp/php) in /var/lib/homegear/flows/www/user.php on line 6

also changing the partition to rw does not help.

any idea?

As you’re using the readonly image, check that session.save_path is set to /var/tmp/homegear/php in /etc/homegear/php.ini.

1 Like

Hi

yes - you are right
after changing it works!

thx a lot

Hi @jipp,

the error was in the Raspbian image. In the next version session.save_path will be set correctly.

Cheers,

Sathya