I’m trying to set up a two-state switch exactly like the sample Richard provides here.
You will need the following:
A Program Logic Event Generator that will be setup as follows:
Trigger - LightOn; When the Switch is turned On
Condition - AutoOff = (LightOn;Now > 10:00) and (NOT (LightOn @ 2 < 3))An AutoOff Scene, that will turn off the light(s).
You will need a Trigger for this scene based on this Program Logic Event Generator where the condition satisfied is AutoOff
I think most of my confusion stems from not knowing the proper terminology. For #1, I did create new PLEG device, and set a trigger (named LightOn), and set it to a specific light being turned on:
LightOn Hallway Light is turned on
I then created a condition, labeled ‘AutoOff’, and used “(LightOn;Now > 10) and (NOT (LightOn @ 2 < 3))” as the condition:
AutoOff (LightOn;Now > 10) and (NOT (LightOn @ 2 < 3))
But, that’s where the confusion starts. Part 2, says create an AutoOff scene… Is that still within the PLEG device (i.e. action), or am I using the scene editor on MCV to make an entirely new scene? I tried the latter.
After saving and applying, turning on the switch left the light on indefinitely (I dropped the 10min timer to 10sec to speed up the trial).
When I went back to get a status/report on the PLEG device, it had the trigger, but the condition portion was empty - like it never saved. I know I saved it. Are there things that could cause only part of the routine to be saved? I’m getting a TON of Memory leak errors (LEAK) in the log - so I don’t know if that’s related. Coincidentally, the PLEG toolbox icon is missing.
Before I go any further in my description, I think the problem I’m experiencing has to do with how long it takes VERA to communicate with my AEON 18103 in-wall micro switch. If I toggle it using the VERA UI, it’s virtually instant. If I toggle it from my phone, same thing. But when using the PLEG script and MCV Scene Editor approach, the turn-off interval is wildly inaccurate.
For example, set to turn off 20 seconds off after turning it on via the switch itself (via the AutoOff condition in PLEG), it takes anywhere from 50 to 65 seconds. When I turn it on via MCV UI5, anywhere from 30 to 50 seconds. Is that normal? Obviously if it’s taking that long to execute a simple “turn off after X seconds” command, I don’t know how it would have the resolution to see user input that is in the sub-10 second range.
However, if I create a simple new scene (MCV scene editor) triggered by turning on the light, and turning off in 15 seconds - it works exactly as it should. Does this mean that when combining PLEG and MCV scenes, there is an inherent delay?