Dog Sitter Timer

I’m trying to implement a vacation timer of sorts and I’m trying to figure out the best way to implement it but I can’t seem to figure out how to get it to do exactly what I need. Maybe someone can point me in the right direction?

I would like to have an “away” mode that allows someone to turn on the lights (the dog sitter) and then after a pre-determined amount of time (30 min) they automatically turn off. Any light, or device, at any time. Basically, like having a 30 min timer on each device.

I currently have a scene linked to a virtual switch so that when it’s switched on it runs a “turn everything off” scene every hour. That works ok, unless the sitter comes by 5 min before the hour. Then all the lights turn off 5 min later. Not terrible but I’d like to know if there’s a way to achieve the first scenario.


Easily done, but will take a little bit of work. How is you LUA programming? You will need to be familiar with the “Conditional Scene Execution” sticky thread at the beginning of this sub-forum.

I would create a virtual switch (I call mine “Away”), that is set when you are not home. You would then set up a scene for each device, triggered when the device was turned on, and have that scene turn the device off after 30 minutes. You then cancel running the scene should the Away virtual switch not be set.

A lot of work, setting up all those scenes. Maybe a better way is to have a scene that is triggered when the entrance door is unlocked (or when locked), and just have that one scene turn out all of the lights (and again checking the Away switch to see if it should execute).

Good advice. I’d thought about that… Programming scenes for each device. Or putting LUA code in each device to check the status of a virtual switch and then turn off after a certain amount of time. Either way, it’s allot of coding or scene set up. Could potentially get too confusing down the road.

However, I do like the idea of triggering a scene to turn off all the lights after the door is locked, when in away mode. That seems like a much simpler idea.

I’d do this by using a resettable timer. Every device on hits the reset button on the timer. Timer expired sends zwave all off command. (I think you can do that via vera… I think. I know the zwave all off command exists, at any rate.) When you switch to home, hit mute on the timer. When you switch to away, un-mute the timer.

So where does the code to reset the timer reside? In the timer? Or a specific scene? Or in each device’s code?

You could put all of the code in a single PLEG device …
This is higher level then than Scenes/LUA … and with the report command you can see all of your logic in one place.


Ahh… PLEG. I haven’t used that yet but I’ve read a little about it. May be time to dive into it!

The resettable timer is a device action. So instead of ‘turn switch xyz off’ it’s ‘reset timer mnp’. (Resettable timer is a plugin, search for it.)

Are you talking about the PLEG Timer Switch? I did a search for resettable timer on the Mios Marketplace and didn’t get any results. A search for timer came up with a few results but nothing named resettable timer.

Yep. I did see that one. Thanks!

If you only need one timer … Countdown timer is fine … your logic will be in a scene or two that interacts with the Countdown timer.

If you are going to use more than one timer … you are better off (resource wise, in particular memory) with PLEG.
If you need a user interface (Manually start/stop/restart, visible display of timer duration) for the timer you can use PLTS.
With PLEG/PLTS you do not need external scenes. A PLEG/PLTS report shows you all the working pieces of your automation logic.

Ok, so I’ve made some progress but I have a few questions. I managed to get two lights on a shared 1 min timer using a single pleg device. Turn on light one, timer starts. Turn on light two and the timer re-starts. When the timer runs out they both turn off. Not too complicated.

But if I want to do that for all my lights / devices I’ll have LOTS of triggers, conditions and actions. Before I get too deep I have a few questions.

I assume I need to have a trigger for every device that I want to be on a timer. Easy enough. Makes sense.

However, do I need to have a separate on-condition, off-condition and on and off actions for each device?

Just want to figure the cleanest, neatest way to do it.

It’s hard to answer a general question like this.
The best thing is to post the Status report for an template of the things you are doing … and ask if there are ways to improve it.

Just getting back to this finally. Here’s a screen shot of the status report. There are two shots because I couldn’t fit it all into one screen capture. This is for two lights with a 1 min timer for testing purposes.