It seems there should be an easy non-LUA way to effectively make a timer on a switch so it turns off x minutes after I turn it on. I created a scene called “watchdog” which is enabled by a switch event (see attached “event”). Then, I simply execute a command to turn off after x minutes after the scene is activated (see attached "command). It doesn’t seem to work – am I missing something?
[quote=“oTi@, post:2, topic:170841”]What’s the brand/model of your switch?
When you turn it on/off locally, does the status update immediately on the Dashboard?[/quote]
It’s a GE/Jasco dimmer. Does that not support events?
I think that is what oTi@ was trying to determine. If when you flip the switch the dashboard doesn’t update then you are going to have a difficult time doing what you want. If it does update, then what you want to do is fairly easy.
When you create an automation event, there is a pull-down menu that will say “Immediate” by defailt. (See attached image) If you pull it down and click on the “Manage Delays” option then you can enter a delay such as 5 minutes. Whatever is in that pull-down area is what happens after that much time. So, if you want a light to turn off after 5 minutes, the “Immediate” selection should have nothing set in it. The “5 minute” selection should turn off whatever light(s) you want off.
However, the key to this working is the previously mentioned event. If the dashboard doesn’t update when you flip the switch, then the Vera won’t know to start the timer until the next time the device is polled.
should the immediate section not contain the command to turn the light on and the 5 minute delay section the command to turn off ?
its probably me but the advanced section is the only thing that makes sense to me lol
It would depend on what you were trying to do, and how you were trying to do it. If you wanted a scene that turned the light on for 5 minutes, then off you would set the immediate value to be on.
However, I guess I assumed the goal was to set up lights similar to a few I have in my house. When you physically hit the on switch, it should turn them off after 15 minutes (in my case). For that, setting the immediate to send an “on” is just redundant because someone had to physically turn the light on in order to fire the trigger that called the scene.
What I was ultimately trying to get across is that there is an easy way to set a delay in a scene without Lua code. ;D
The method I was showing seems to result in values getting set in the advanced section. So it might be worth looking there if this method doesn’t make sense. I just went with the method I did because it was the first one that made sense to me.
Exactly. The GE’s don’t support associations, so don’t send status updates to Vera. However, Vera may still be able to detect the status change. Hence the question about the dashboard. Your UI4 scene definition looks correct, so chances are your dashboard doesn’t update; presumably because your switch is too far from Vera.
well the lua code is executed before anything else so it makes sense to me to write a piece there so i know what is going on.
this whole ui thing doesnt make much sense to me at all and should have some good docs to go with it as it makes me more confused then it is helpfull.
i mean i didnt get to the point to set the delay there untill i read this thread lol
it sort of doesnt make sense to me that if you turn on the light the scene would automaticly trigger to set the light to turn off after 5 minutes
how should i know ?
logical sense is to think : someone activated the switch so the scene would start and set the light on and wait 5 minute and turn it off.
what i make from all this here is to make scene and set trigger to 5 minute and turn of light… ehm, so when i turn on the light the vera would sense it and then turn it of after 5 minutes ?
It may make more sense to you if think of the light switch as a independent device .when you manually flick the switch it turns on the light and sets it’s status to on for Vera…rather then the switch sending a signal to Vera and then the Vera turns on the light.
i thought the last version was how it supposed to be as vera is the main controller… it does make sense now more thnx for explaining it
then again how would the vera know that the light is on and it should start the procedure of timer for 5 minute and turn off ?
you have to set a trigger for the light to check it is on all the time or does the vera autostart the scene when the light is on… still dont make much sense really…
Thank you all for the replies – a couple of points:
#1: I gathered from the initial post that the GE switches don’t proactively send unsolicited status when they are physically turned on. The scene to turn off my fan after 1 minute (1 minute was used as a test case) worked if I turned on the device from the web interface (and therefore triggered the scene). Turns out that vera will eventually pick up on the fact the GE switch was physically activated through polling. Therefore, it just shows up as an extra delay until the scene is activated. I set the polling interval for that particular switch to 30 seconds. Oddly, I had to wait a few minutes (I was expecting a max of 1min 30sec), but the scene worked and the fan turned off. Now that I set it to 45 minutes, a few extra minutes of slop doesn’t really matter.
#2: What is this “immediate” business? Is this something on UI5 only? I have not taken the plunge yet and did not see the “immediate” function on my UI4 scene creation screen.
ur welcome… im still learning and sharing my finds
1: u have to set the vera overall z-wave polling to 30 instead of 60 and of the device itself also… mind that it will slow down things when u have multiple devices
2: immediate as in no delay
Turns out that vera will eventually pick up on the fact the GE switch was physically activated through polling.
Exactly.
I set the polling interval for that particular switch to 30 seconds. [...]
Keep in mind you cannot control the polling interval per switch; only the maximum rate at which a particular switch is polled. Roughly, Vera (by default) polls your first device, waits 30 seconds, polls your second device, waits 30 seconds, polls your third device, and so on. The more devices, the longer it takes to complete one full cycle.
#2: What is this "immediate" business?
The immediate business is the first action you select (on the left) in UI4 ([tt]ON[/tt] in your screenshot).
(Then a single delay ([tt]after 1 minute[/tt]). Then what to do after the delay ([tt]OFF[/tt]). UI5 allows multiple delays of any length.)
]
I set the polling interval for that particular switch to 30 seconds. [...]
Keep in mind you cannot control the polling interval per switch; only the maximum rate at which a particular switch is polled. Roughly, Vera (by default) polls your first device, waits 30 seconds, polls your second device, waits 30 seconds, polls your third device, and so on. The more devices, the longer it takes to complete one full cycle.
That explains why it takes a couple of minutes to figure out the event has been triggered. All good. Thanks for the explanation.
This post helps a lot, unfortunately my light switch does not send unsolisited status. How do I know which switches send the status immediately? (Is there a name for this feature?)