Countdown timer plugin (UI5)

Try to run the Restart Air scene manually by pressing its Run button in the dashboard. Does it do what you want? If yes, then the problem is the trigger for the scene. If no, then the problem is the actions for the scene.

Try to run the Restart Air scene manually by pressing its Run button in the dashboard. Does it do what you want? If yes, then the problem is the trigger for the scene. If no, then the problem is the actions for the scene.[/quote]

I feel silly. I found a timer I had set in the shutdown air scene that turned it off after 10 min no matter what. Unless you drop that menu down you don’t realize timers are there. I must have set it while playing with timers and forgot about it. DUH!

@Futzle:

It would be nice if the events/triggers were like this:
Timer completes (regardless of mute state)
Timer completes while not muted
Timer completes while muted

This is super helpful to create logic routing almost like a switch in a train track. If one state, go here, other go there…

[quote=“electricessence, post:63, topic:170481”]@Futzle:

It would be nice if the events/triggers were like this:
Timer completes (regardless of mute state)
Timer completes while not muted
Timer completes while muted

This is super helpful to create logic routing almost like a switch in a train track. If one state, go here, other go there…[/quote]

I could see a good use for that. I also could use a mode that would autoreset. For instance: Counting while a switch was on and it it went off before the counter finished it would autoreset. Would be an easy way to implement a resetting time delay in a scene.

This is a neat plugin. For my garage lights and radio, I’ve been using a delayed off. This plugin does the same thing except I can see the time left. and I can mute it if I’m working in there.

Also, it seems to survive a reload, keeping its timer position? How do it do that.

Very nice.

I use this great plugin for lights, etc. and it occurred to me the other day I should be using it to set my ‘has it rained in the last 10 hours virtual switch’ (http://forum.micasaverde.com/index.php/topic,10909.0.html) because of your plugin’s ability to survive a LUUP reload.

Unfortunately 10 hours is 36000 seconds and the plugin only allows numbers 4 numerals long.

Is there any way around this, please?

You sure? I’ve got a 14000-second timer and I don’t recall having an issue setting it.

I will double-check when I get home.

Nope, I’m not sure :slight_smile: Sorry, it just needed a reload and my 36000 one works. Thanks again for the plugin.

Hi

The plugin works great but generates a huge number of log entries. Is there any way to turn these off?

Thanks
Greg

[quote=“asterix406, post:69, topic:170481”]Hi

The plugin works great but generates a huge number of log entries. Is there any way to turn these off?

Thanks
Greg[/quote]
Thanks to pointing this out. I’m also wondering how much ressources this plug-in is using.

I’ve tried to setup an automatic presence detection using that plugin. My idea was to have a counter in each room. Motion sensors trigger reset of the counter and when the counter terminate, it turn off a virtual switch called “prensence room 1”.
But the amount of logs indicate me that it was not an optimal solution. I’m better to build luup code to watch some “last tripped value”

Except that little question, this pluggin is working well and is very usefull. Thanks to futzle for all his work.

Her.

I’ve been toying with the idea of making the countdown decrement configurable. Currently it’s fixed at one second, hence the squillions of log entries. That level of precision isn’t always necessary. If the plugin could be made to sleep for, say, 60 seconds instead, it would cut down the log entries by an order of magnitude or two. Each device instance would have its own precision, naturally.

I've been toying with the idea of making the countdown decrement configurable.

I like this and will likely do the same for PLTS. I might default to something like the Elapsed time / 100 or 1 second … which ever is larger. I previously only had log entries every 25% … I updated the icon at that interval … but then someone requested time remaining to be similar to Countdown timer … and now the logs are very verbose when the timer is active.

Is there any reason why the log output couldn’t be made ‘switchable’? Meaning that there’s a on/off switch (button) in the UI which enables/disables the additional (luup.log()) output to the log upon the users specification - probably makes sense to leave it on by default, but being able to turn it off would be great. Specially for those of us with a few plugins & lots of debug output causing pretty frequent log switches.

Of course, a log switch would not be a big deal if MiOS would preserve the old logs for some period of time, but alas…

The output is not from the plugin, it’s from the Luup engine when a state variable changes. The plugin doesn’t have the option of disabling these log messages.

Hello futzle, trying to see if I should use your nice looking timer within my scene, but I can’t find any documentation or example about how to use it by calling it from some Lua code. Is it possible ? If so, where should I look to find the relative commands (set the timer, start it, cancel it and so on) ?

Thanks in advance.

Regards.

EDIT : Ooops, just noticed there were several pages on this topic, and a few examples around, sorry, lol :smiley: Do you have a full list of all available commands, or can I assume they’re all called the same way : RestartTimer, CancelTimer and so on ?

You can see the full list of commands in the S_CountdownTimer1.xml file (through Apps > Develop Apps > Luup files). Here they are:

StartTimer
RestartTimer
CancelTimer
ForceComplete
SetTimerDuration(newDuration)
SetMute(newStatus)

Thank you for the quick answer :slight_smile: I’ll see if I can use it or not (the amount of logs might be an issue as I intend to have 3 or 4 timers for my code, so some tests will be required).

Regards.

Thanks so much for creating this plugin, it’s something I have been in need of. I am however having issues getting it to work. I’m trying to setup up scenes so that when a light comes on it will turn off after 15 minutes. I have followed the directions you have written, but no joy. When the light is turned on the timers starts counting down, but when it hit’s zero the light stays on. If I go under automation and manually run the scene it will turn the light off. I’m not sure what I am missing. Running version is 1.5.408. Thank you…

vinceblack, do an experiment for me. While the timer is counting, press its Force button. Does the scene fire?

Is your timer muted or unmuted?

[quote=“futzle, post:79, topic:170481”]vinceblack, do an experiment for me. While the timer is counting, press its Force button. Does the scene fire?

Is your timer muted or unmuted?[/quote]

futzle, Thanks for quick response.

When I press force nothing happens either. I have tried muted as well unmuted.