I think this is a really stupid question, but for some reason I can’t find the answers or get the conditions to work as I wish. So I am already sorry if I missed the explanation somewhere.
I want to achieve these conditions, without shedules.
“Time is in between 10:00:00 and 11:00:00” The condition shall be true in between 10 and 11 o’clock.
“Time is exactly 10:00:00” The condition shall be true for one minute after 10 o’clock.
EDIT:
Would something like “(10:00:00;NOW) AND (NOW;11:00:00)” work as a solution for both?
“(10:00:00;NOW) AND (NOW;11:00:00)” does work. My problem is that the status page doesn’t seem to update correctly, therefore I thought the condition is never true. When when checking with an action it is executed as I wish.
However, is this the best way to do this or are there “simpler” solutions?
Thanks, that works! It takes a while getting used to PLEG, but it sure is the most amazing plugin so far and possibilities are endless.
Are there any known issues concerning the status-page of PLEG when accessing it over micasaverde’s remote servers? The conditions and actions all work just fine, but the states are completly wrong. Seems a little like they only get updated after a luup-reload.
Mine work fine when i log in from work. I sometimes have issues of opening a blank page when i click on report or status, but that is down to a very very old IE8. And after reloading Vera a few times it normally works. Als the status times and states are always correct.
Do not forget, PLEG will need a condition to turn from false to true or vice versa to trigger an action, unless the condition starts with _
So that might lead you to think the status is wrong while in reality it just needs to change state before it triggers the action again
Hope that makes sense
I understand the condition/event based logic of PLEG, I even love it.
But I don’t think I missed something, when the lights turn on based on a condition, and I see this in vera, it must be true. But the status still shows “false” and the time when it was last true is wrong too.
However, this doesn’t matter. Everything is working, this could also be a local problem, i.e. browser-based like you mentioned (using stable chrome on windows 7).
if you have a condition lets say test. that triggers an action only when changing from false to true. If you call it _test, it will trigger every time it is evaluated true. So if it is true, and something changes to make it true (again) the one called true would not trigger as true already, the _test would trigger an action.
Does that make sense ?
"(10:00:00;NOW) AND (NOW;11:00:00)" does work. My problem is that the status page doesn't seem to update correctly
It has been discussed before: That evaluations caused by [b]NOW[/b] will not be available via the [b]Status[/b] command. If you have any other event in the PLEG ... you can trigger it ... and then do a [b]Status[/b] report.
[quote=“mikee123, post:3, topic:177511”]I think you can shorten this to:
(10:00:00;NOW;11:00:00)[/quote]
Thanks. I wanted my living room lamp to be turned on by the motion detector for 3 minutes between 10pm and 6am. I don’t want it to run if the light is already on. I modified the code to the following and it seams to be working.
Triggers:
LMotion - living room sensor detect motion armed or disarmed
LampOn - whenever living room lamp dimmer is on
Condition:
NightLamp - LMotion and ( (20:00:00;now;23:59:59) or (00:00:00;now;06:00:00) ) and !LampOn