I've just put a plugin onto apps.mios.com that makes scriptable countdown timer devices. Combined with scenes, this plugin can eliminate the need to use Luup in several real-world scenarios.
Fetch the plugin here: Countdown timer
. This plugin is UI5/6 only.
By itself, a countdown timer doesn't do much. When the Start
button is pressed, a timer counts down seconds from a (configurable) start value. Left to its own devices, when the timer hits zero, it stops.
What makes the plugin useful is that the Start
button is scriptable: like a virtual switch it can be run as a target action for any scene. Any Vera event can start a timer.
There is also a Cancel
button to abort a timer. That, too, can be triggered by a scene.
For more complicated scening, there is a Restart
button that does exactly the same as Start
, except that it resets the timer back to its start duration even if it's currently counting down. Finally, there's a Force
button, equivalent to grabbing the kitchen timer and wrenching it down to zero (ding!).
When a timer completes, or if it's cancelled, the timer device triggers an event. You can use this event to start a scene that can make your Vera do anything that is scenable.
Timers can be Muted
, which just prevents them from generating an event. This might be useful if you want to disable a timer during a certain time of the day: it still counts down but doesn't go Ding.
Tip for creating multiple timers: Apps > Countdown Timer > Create Another.
Some scenarios in the next post.