Difference between revisions of "Egg Timer"
(Created page with "The Egg Timer device (DT #2336) is a logic device. It doesn't really do stuff, but is used to provide additional event logic. In this case, a timer to be used when you want st...") |
(→Use) |
||
Line 11: | Line 11: | ||
Create an Event, probably a motion event. | Create an Event, probably a motion event. | ||
Instead of sending an ON command to the light you want on for 5 minutes, send StartTimer to Egg Timer with DeviceToLink containing the device ID of the light, and Timeout to 300 seconds. Now, each time the motion is triggered, the timer device is set to 300 seconds before it turns off the light. | Instead of sending an ON command to the light you want on for 5 minutes, send StartTimer to Egg Timer with DeviceToLink containing the device ID of the light, and Timeout to 300 seconds. Now, each time the motion is triggered, the timer device is set to 300 seconds before it turns off the light. | ||
+ | |||
+ | == Advantage == | ||
+ | The advantage of the egg timer over the use of Delay command is, that the one timer is always extended, so after the first 300 seconds the light will not be turned off, if after the initial motion there has been another motion say 100 seconds later. It will result in turning the light off at 400 seconds after the initial motion. |
Revision as of 14:51, 26 August 2015
The Egg Timer device (DT #2336) is a logic device. It doesn't really do stuff, but is used to provide additional event logic. In this case, a timer to be used when you want stuff ON for a specific amount of time, and OFF after the time has run up.
Egg Timer is as of today only available as a download from deb.
Setup
Download from deb and store in /usr/pluto/bin and make it executable. Create a child under the core using the above mentioned device template. Quick reload the router
Use
Create an Event, probably a motion event. Instead of sending an ON command to the light you want on for 5 minutes, send StartTimer to Egg Timer with DeviceToLink containing the device ID of the light, and Timeout to 300 seconds. Now, each time the motion is triggered, the timer device is set to 300 seconds before it turns off the light.
Advantage
The advantage of the egg timer over the use of Delay command is, that the one timer is always extended, so after the first 300 seconds the light will not be turned off, if after the initial motion there has been another motion say 100 seconds later. It will result in turning the light off at 400 seconds after the initial motion.