I’m new to PLEG, just need a little assistance with this one. Here’s the info:
Scenario:
Turn inside lights on when we get home at night, then turn off hallway light
Logic:
When its Night and the Armed Garage Sensor is Tripped turn On Hallway Lights and turn On Kitchen Lights
When its Night and the armed Garage Sensor is Untripped turn off Hallway Lights
Note1: Garage Sensor is Armed when the Cameras are Armed. Which I do manually before i leave the house. This is a MCV scene
Note2: Garage Sensor is Disarmed when the Cameras are Disarmed. Which i do manually when i get home. This is a MCV scene
Issues:
? As i leave the house, i arm the cameras (which arms the garage Sensor), and then open the garage door, so this would also turn the lights on.
o Solution 1: Delay arming garage sensor for 5 mins
I dont know how to delay just the garage sensor for 5 mins. I dont want to delay arming the cameras for 5 mins also.
That solution isnt exactly ideal either, because if i decide to arm the cameras, and then do something out the front that might take me longer than 5 mins, like talk to the neighbours, and then open the garage door, the lights would turn on.
You almost wrote the code in your description of the logic. Once you can do that, the rest is easy. I’m not sure your description is what you really want, though. If you disarm the garage sensor when you get home, the Armed Garage sensor is not tripped trigger will not be able to turn off the hallway lights. I’ve delayed the disarming in the code below to get around this. This should get you started:
Inputs, Triggers Arm - Arm switch is turned on
DisArm - Arm switch is turned off
ItsNight - DayorNight plugin indicates night
GarageTripped - Armed Garage sensor is tripped
GarageClear - Armed Garage sensor is not tripped
Conditions ArmGarage - Arm; NOW > 5:00
LightsOn - ItsNight and GarageTripped
LightsOff - ItsNight and (LightsOn;GarageClear) DisArmGarage - Arm; DisArm; LightsOff
Actions ArmGarage - Set Garage sensor Armed to 1
DisArmGarage - Set Garage sensor Armed to 0
LightsOn - Set Hallway Lights to on, set Kitchen lights to on
LightsOff - Set Hallway lights to off
You would need to take the action that arms/disarms the garage sensor out of the existing scene. You could also take the camera arming and disarming out of the scene and put that into PLEG as well - all in one place, nice and tidy.
The expression ArmGarage - Arm; NOW > 5:00 will delay arming the garage sensor for five minutes after you hit the Arm switch. If you want to make this more sophisticated, you probably need some additional input(s). E.g. If you always open the garage door when you go out you could add a door-open sensor and arm the motion sensor (I’m assuming that is what your garage sensor is) two minutes after the door is opened and then closed.
I tend to only bold the names and not the expression …
The - after the name is just a separator between the name and the corresponding input, condition, or action and not part of the PLEG syntax …
OK - that makes sense. I’m happy to follow your lead. It would probably help to avoid confusion by leaving out the separator completely and letting the bold/normal delimit the parts:
it was all working correctly with temp sensor. the temp reported was few degrees over what it was, so i took it down, put the sensor inside the unit, and put it back in its place. hasnt reported since.
cant configure, cant wake it up to configure. have excluded and reincluded.
Best Home Automation shopping experience. Shop at Ezlo!