Help with PLEG

Hi -

I am having trouble configuring PLEG, and wonder if someone could point me in the right direction?

I have a Fan in my Garage, and I’d like the following:

IF the Garage Door is closed
AND If the Garage Temperature is > 80 degrees OR the Garage Humidity is above 70%
AND If it is between 9am and 9pm

Then

Immediate - Turn on Garage Fan

In 45 minutes - Turn off Garage Fan

Here is what I have:

Triggers

Name Description Last Trigger State
Garage_Humidity_65 Humidity reported by Garage Humidity go above 65 0 false
Garage_Temp_80 Garage Temp temperature goes above 80 degrees 0 false
Schedules

Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
9am_9pm Weekly 09:00:00 1,2,3,4,5,6,7 None Weekly 21:00:00 1,2,3,4,5,6,7 None false 0
Device Properties

Name Device Name Device Variable Last Change Value
garage_door_tripped Garage Door Sensor Tripped 0 false
Conditions

Name Expression Last True State
c1 (NOT Garage_Door_Tripped) and 9am_9pm and (Garage_Humidity_65 OR Garage_Temp_80) 2013-10-02 10:41:32.233 null

I think I may have multiple syntax issues, but the error reported is:

Program Logic : (NOT Garage_Door_Tripped) and 9am_9pm and (Garage_Humidity_65 OR Garage_Temp_80): Invalid Expression Operator: AM_9PM in: TMP_2 and 9am_9pm and TMP_4

Any help is appreciated!

Don’t have names of schedules, trigggers or conditions start with a numeric digit. Change 9am_9pm to something like AllDay.

Thanks, Rex. I changed the name to AllDay, but I still have the following challenges:

AllDay reports False. Since it should run 09:00 to 21:00 every day, I’m expecting this to be True. What am I doing wrong here?

I don’t think my Garage_Door_Tripped is working. I think it might be waiting for the garage door to open to change values. I’d like to know the current value (i.e. Garage door is open or closed).

Any ideas with these?

Whenever you setup a new schedule, trigger or condition, you have to wait for the event to occur before the status display can show proper timing. With schedules, I usually set dummy times in the near future for testing and then set the proper times later. For triggers, I usually go and operate the sensor/switch so I can check the condition fires.