PLEG for dummies

PLEG sees every input you create in PLEG regardless of wether you did it by using the UI, an android/iphone app or at the switch.

So, you have to consider adding other inputs. an example:

I want to turn on the garage light at night if:
I open the laundry room door to the garage
if it is night and
if it isn’t on already.

Inputs
LaundrydoorIsOpen (laundry door sensor is triggered)
GarageLightOn(switch is on)
IsNight (Day/Night app indicates night)

Condition

LaundryDoorIsOpen AND IsNight AND !GarageLightOn

Action = Turn on the garage Door

So, in this case, if my garage light was already on (because of another scene or PLEG turned it on when we opened the GarageDoor) nothing will happen.

I hope that makes it more clear.

How does PLEG handle the manual operation of switches. So lets say I have the lights set to shut off when the garage is closed at night but then after this happens, can I just turn on the lights manually and PLEG won't shut them off?
It handles things exactly how you program it to do so. It is your responsibility to write your logic so that it behaves the way you want it to. When you are designing the logic for automatic lights, you need to consider how to react to manual changes to the switches.
Does PLEG only trigger on status changes or does it constantly monitor the status and make sure things are always operating according to the programmed conditions?
PLEG is event-driven. Changes to Triggers, Device Properties and Schedules cause it to check which Conditions are affected and re-evaluate them. So you could say it constantly monitors its inputs but it will not care what else may change. If you want it to react to a change in something, you make it an input.

Rex-
Thanks for your reply. That makes sense.

This must be the right place for me.
I installed PLEG, PLTS, VeraAlerts and Day or Night for starters and here is what I try to accomplish.
I have an Ecolink door sensor on the garage door and I’d like to just get a message when the door is left open for more than 10 minutes. I started to set up PLEG with the trigger (sensor tripped) and as actions, notify me when the door is opened, closed (or left) open, just to play with PLEG. The trigger works, I get a message when the door is opened and closed but not with my timer. In addition, I’d like to setup a routine check, say at 9pm at night, that simply checks the status of the sensor and sends me a message. I tried to play with the schedules and a selftrigger but that didn’t work. I am still trying to warp my head around everything like most newbies.
Any help is greatly appreciated.

KP

Ok I’m stumped. I’m trying to figure out how to program a scene to only kick off at night when my alarm is disarmed. I have Night and (Night,AlarmDisarmed) but its not working. Does anyone have any suggestions?

You might need: Night and AlarmDisarmed and (Night; AlarmDisarmed)

Note the semicolon in the sequence expression to make it time-ordered.

Thanks Rex. I had tried that combination before. The issue was I didn’t add a space between the semi-colon and the command. Once I did it worked. Thanks.

I’m puzzled as to why a space needs to be added to this sequence expression?

I have several auto light off(s) which work without it.

PassageLEDOff Yes PassageLEDisOn and (PassageLEDisOn;Now>2:00) ???

PLEG does not need it … If you find an example where it does … let me know … it would be a parser bug.

I just installed PLEG today after lots of reading. It seems a bit much to understand. I do have question about what PLEG can do. Can PLEG take the wattage input from the Aeon Labs by Aeotec Smart Energy Switch DSC06106-ZWUS and create an event based on the wattage? I am wanting to get a notification if a device is drawing power for too long and also turn the device off until I can investigate.
http://www.amazon.com/Aeon-Labs-DSC06106-ZWUS-Z-wave-Energy/dp/B007UZH7B8

Specifically this is for a sump pump for a sump tube to relieve hydrostatic pressure from beneath my fiberglass pool.

Yes PLEG can solve that type of problem … others have used it to keep track of when the pump was last run by watching the power load … so that they can tell that it is responding … another wanted to watch how long it was running … to detect a pump (as opposed to a motor) problem.

All trying to automate potential problem detection. Personally I would want some type of water sensor that trips BEFORE the pump actually turns on …
and use that in the pump efficiency/reliability logic. (Or at least something that triggers independently as a result of the pump being requested to do some work.)

@Richard

The main problem I was finding was that the sand in the area would sometimes bind the pump. I am limited on the pump size, so changing to another pump is not really an option. I want to be able to shut off the pump after 30 seconds if it has not shut off from the float switch. I found a problem this morning of the pump motor energized, but the pump impeller bound up. I do not want to burn up the pump motor.

You can put a high voltage coil relay in parallel with the pump … and let it trigger something like a Zipato vs-zd2102.us Z-Wave Door/Window Sensor, (it has connector for external sensor … you would use the relay contacts to trip) … That coupled with the Power meter would allow you to see any problems …

Motor in-op — Sensor calls for pump but no power.
Pump bypass because of wear, … sand will do that … Pump on, runs long, low power usage
Impeller bound … High power sensed … but you really ought to have a slow blow circuit breaker to trip when the motor exceeds it MAX rated power.

@Richard
I am getting better with doing some things in PLEG. Awesome plug-in!!! Thanks for your hard work. I also appreciate Rex’s PLEG Basics. That helps a lot.

I was hoping you could tell me how to disable a certain condition in PLEG. I understand the entire PLEG has the BYPASS, but I was looking at different events that I will want turned on/off depending on season and some depending on vacation. Not all of these will be disabled at the same time. I really do not want or see the need to have 10 PLEGS to do this.

Ideas? Thanks

@thewizardofoz,

The usual way is to add a term to the Conditions that you want selectively enabled. The term could be the state of a VirtualSwitch, MultiSwitch, a Schedule or another Condition. Just AND the term with the whole of the existing expression:

DoSomething Summer and (existing expression…)

@RexBeckett
That is easy enough. Thanks. I appreciate all your help and hard work as well as Richard. I have 6 of your MS installed and use them in conjunction with PLEG and as a work around for remotes.