My PLEG case not working

I would like to achieve: When the Virtual Switch Away is on, turnon the light at sunset and turn it off at 0:00
What am I doing wrong? I have created the following:

Triggers
Away Away is turned on

Schedules
Lightson every day at Sunset
Lightsoff every day at 0:00

Conditions
AwayLightsOn: Away and LightsOn
AwayLightsOff: Away and LightsOff

Actions
AwayLightsOn: : Woonkamer lamp SetTarget newTargetValue=1
AwayLightsOff: : Woonkamer lamp SetTarget newTargetValue=0

thx for helping me out

Looks OK … did you arm the PLEG ?

I am having a similar problem as Screamhouse. I am trying a very simple set up in PLEG and it will not work.

Here’s what I would like to accomplish:
Turn on the entry light when I unlock the front door using the Z-wave Kwikset deadbolt only at nighttime. (Entry light has a z-wave switch).

Set up so far:
1.) Both devices are connected to my Vera network and both are working independently.
2.) I have installed both PLEG and PL Core.
3.) Installed Day or Night plugin

Here’s what does work:
When I create an Input > Trigger for the “door_unlock”, a Condition for ONLY the “door_unlock” and an Action to turn on the entry light, it works GREAT! BUT when I add one additional “AND” variable to the condition, it no longer works.

I not only have tried the “Day or Night” plugin, but I have tried a second light status condition, a schedule condition, etc. I have tried 2 other conditions together and they won’t work. When I try 1 condition ONLY it works.

I must be doing something wrong. Please help.

Here is the exact set up in PLEG plugin:

INPUTS

Trigger
Name: Door Description: Door Lock is Opened
Device Properties
Name: Night Description: Day or Night Device Variable: Status Current Status = 1

CONDITIONS
Name: c1 Condition Expression: Door AND Night EQ “1”

ACTIONS
Condition: c1 Number of Actions: 1 Action: “Turn ON Entry Light”

PLEG is Armed.

That’s it I think. It should work but it doesn’t.

Please hep. Thanks!

Maybe this is the reason?

02 06/29/13 22:26:00.289 ctrl_chr[33;1mGetSunriseSunset error#1 sunrise: 1372389925/2013-06-28 05:25:25 sunset: 1372450013/2013-06-28 22:06:53 midnight: 1372456800/11670228ctrl_chr[0m <0x2adde000>
02 06/29/13 22:26:00.296 ctrl_chr[33;1mGetSunriseSunset error#1 sunrise: 1372476363/2013-06-29 05:26:03 sunset: 1372536397/2013-06-29 22:06:37 midnight: 1372543200/11670228ctrl_chr[0m <0x2adde000>
02 06/29/13 22:26:06.228 ctrl_chr[33;1mXXXX setinitial UpdateManualRoute node 11 = (null)ctrl_chr[0m <0x2b911680>
02 06/29/13 22:26:06.228 ctrl_chr[33;1mXXXX UpdateManualRoute setinitial node 11 m_cRoutePosition 0ctrl_chr[0m <0x2b911680>

[quote=“Screamhouse, post:4, topic:175940”]Maybe this is the reason?

02 06/29/13 22:26:00.289 ctrl_chr[33;1mGetSunriseSunset error#1 sunrise: 1372389925/2013-06-28 05:25:25 sunset: 1372450013/2013-06-28 22:06:53 midnight: 1372456800/11670228ctrl_chr[0m <0x2adde000>
02 06/29/13 22:26:00.296 ctrl_chr[33;1mGetSunriseSunset error#1 sunrise: 1372476363/2013-06-29 05:26:03 sunset: 1372536397/2013-06-29 22:06:37 midnight: 1372543200/11670228ctrl_chr[0m <0x2adde000>
02 06/29/13 22:26:06.228 ctrl_chr[33;1mXXXX setinitial UpdateManualRoute node 11 = (null)ctrl_chr[0m <0x2b911680>
02 06/29/13 22:26:06.228 ctrl_chr[33;1mXXXX UpdateManualRoute setinitial node 11 m_cRoutePosition 0ctrl_chr[0m <0x2b911680>[/quote]

Sorry, I’m not sure what all this means, other than I see some errors.

However, it’s not just the “Day or Night” plugin. I tried other combinations of variables for my condition and it never worked.

If I use only 1 variable, it works great. Add 2 or more variables, no good.

Was not specifically referring to your case. For me it only works when i set a time, not via sunset or day/night

I understand. I’m hoping that someone can address my issue. Thanks.

Day or Night Plugin needs to have the Location and Timezone set properly in Setup.
After doing this and saving … I would POWER CYCLE Vera. This will be needed for Vera to respond to the changes correctly. After that Day or Night should work properly. I believe the errors in the log file … should disappear.

[quote=“RichardTSchaefer, post:8, topic:175940”]Day or Night Plugin needs to have the Location and Timezone set properly in Setup.
After doing this and saving … I would POWER CYCLE Vera. This will be needed for Vera to respond to the changes correctly. After that Day or Night should work properly. I believe the errors in the log file … should disappear.[/quote]

I cycled Vera twice. Still no luck. I checked the triggers and it sees that the door was opened, but no action.

Have you set your location and timezone properly in Vera Setup ?

For me Night is now working. Will look tonight if I can swithc the lamp off at 0:00

Yes the location is set. However, the issue seems to be the syntax for the condition statement. I must be doing something wrong as it won’t work whenever I have 2 conditions.

Check the debugging thread.

Works, for me this case is closed :slight_smile: