LinuxMCE Forums

General => Users => Topic started by: Marie.O on April 01, 2012, 09:04:49 pm

Title: Re: Stopwatch / timer in events?
Post by: Marie.O on April 01, 2012, 09:04:49 pm
yes.

There is a pause or sleep command in DCERouter that you can select.

EDIT: Just looked: Delay is the name of the command.
Title: Re: Stopwatch / timer in events?
Post by: Marie.O on August 23, 2015, 07:44:25 pm
Although this is a fairly old topic, we had a feature request for this in trac.

While doing a LinuxMCE install on Cyprus the user requested a similar feature. And after thinking a bit about it, we found out, that this can be achieved with a dedicated egg timer device. The egg timer receives the device in question to be turned on, as well as the amount of time in seconds before it should be turned off. What is different from the use of Delay is, that if the event that started the egg timer (or different event that would extend the egg timer) happens, the egg timer gets extended and does not turn off after the first period of time.

If anyone is interested in testing this new device, please download http://deb.linuxmce.org/possy/eggtimer into /usr/pluto/bin, and add the Egg Timer device below your CORE.

Feedback is greatly appreciated.
Title: Re: Stopwatch / timer in events?
Post by: phenigma on August 26, 2015, 06:21:00 am
This is awesome!  I have not had a chance to test this but I have been looking for this type of thing for some time.  For me I see it as a perfect use case with motion detectors and lighting.  As long as motion is detected the on-time is extended.  When the detection no longer occurs for a period of time it is turned off.  Very handy!

J.
Title: Re: Stopwatch / timer in events?
Post by: Marie.O on August 26, 2015, 09:47:51 am
As always, feedback is appreciated. If everybody is happy with it, we might make it a must-have device and can amend the security plugin for the camera and lighting with it.
Title: Re: Stopwatch / timer in events?
Post by: Marie.O on August 28, 2015, 10:31:12 am
There has been an update to the binary, as well as to the device template.

You now have the ability to define a sensor to verify before turning OFF the device in question.

The way the egg timer works is:

* Send Start Egg Timer to the device with the parameters DeviceToLink (the light that will be turned on at the beginning), Timeout (the time after which the light will be turned off), VerifyStateDeviceID (the Device ID of the sensor that should be verified at the end of the timeout if it is tripped. If it is, the timer will be extended by the initial timeout.

* Send Cancel Egg Timer if you want to cancel the above timer before the end has been reached with a parameter defining if the OFF command should happen or not.

The reason for the new VerifyStateDeviceID are people that work the whole time, thus never stopping the motion sensor being tripped. Now it will continue to keep the light on.

Again, the binary is currently downloadable from http://deb.linuxmce.org/possy/eggtimer - and there is a small wiki page about it:

http://wiki.linuxmce.org/index.php/Egg_Timer

Feedback is appreciated.

PS: If you do not see the VerifyStateDeviceID when sending the Start Egg Timer command, make sure to sqlCVS upgrade the DCE repo.
Title: Re: Stopwatch / timer in events?
Post by: Marie.O on August 28, 2015, 10:35:56 pm
More fixes. Thanks to the guys testing at IPTP I was able to squash a few more bugs. Updated binary is still at

http://deb.linuxmce.org/possy/eggtimer

Please report back.