I suspect I’m missing something obvious, but I’ve struggled with this from day one with Vera.
I have a reasonably technical background (although I’m no developer) so I really can’t understand why I can’t get this to work.
Simply put, when we come home at night, and the lights have gone off automatically (because it’s late or whatever) I want the lights to come on.
I thought I had it pegged with my most recent attempt with PLEG:
Three triggers:
t1: Day or Night indicates night time
t2: House modes plugin has changed to Home
t3: Porch light is off
One condition:c1: t1 AND t2 AND t3
And one set of logic actions
The behaviour is that if you’re at home, with the home mode engaged, it’s dark, and you turn the porch lights off, PLEG immediately evaluates and turns them back on again.
The ‘problem’ as I see is that PLEG is not evaluating that the house mode has changed since we last checked, but that the house mode is home.
What I want is the trigger to either from any mode > home or (perhaps more usefully) away > home
Can’t say that it works only in ‘Away’ mode as we end up with a race condition.
Apologies that this is so basic, but I really can’t find anything in the docs I’ve read so far (and the editing in the current version of UI7 is rather different than that in the manual)
First up, anything PLEG related, you need to post a Status Report.
That report gives us the entire picture of what is going on rather than focusing on what you might think is the problem, you will find that others will join in as well as we all have the same info and motive to help.
Agreed that there are diifernces between what the manual says and UI7 version, but the same logic applies and once you master PLEG then anything is possible.
HIH
My immediate suggestion is to change the light off trigger to device property. A trigger would be a change, whereas you are really looking for a status and if the light is off, then that makes the condition true.
Can’t tell yet . I’m still at home. I can see this won’t work if I’m at home and my wife is out late, so when she comes home the lights won’t come on (I don’t think) if they turn off at 2330. I could be wrong though.
Thanks for your help. I’ll let you know when I get a test scenario.
Next Year…I’m not holding my breath as I have seen so many promises over the years.
When it happens it happens.
I’ll tinker with this more later in the week, ATM it’s Xmas day and there are other priorities.
[quote=“zedrally, post:17, topic:200295”]^^^
What Timer?[/quote]
Sorry, bad use of words. There’s a scene that turns the lights off at 2330. Also some quick checks indicate that if you turn the lights off manually, they immediately get turned on again.
It could well be the scene that is the problem? Unfortunately you have not provided the complete picture as I have no idea what your scene does and how it might affect the PLEG.
Ahh apologies. How can I provide you with what you need?
I’d describe the scene as pretty much:
It’s 2330: Turn (as set) the lights off.
That’s all it does.
Worth re-iterating that even if I turn the lights off manually (i.e. when it’s dark and we’re in home mode) the lights are turned back on again immediately…?