Author Topic: Program Logic Version 7.45 is available  (Read 96805 times)

Offline Aegis

  • Full Member
  • ***
  • Posts: 141
  • Karma: +1/-0
Re: Program Logic Version 5.6 is available
« Reply #30 on: January 22, 2014, 08:44:43 pm »
I have not done so yet, but I assume you can set multiple scenes in PLEG for multiple devices.  If so, how do you bypass certain scenes while leaving others active?

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +763/-142
Re: Program Logic Version 5.6 is available
« Reply #31 on: January 22, 2014, 08:59:56 pm »
@clippermiami
It was very difficult for me to read ... because you mix Booleans and Numbers.
After close examination ... it looks like the casting is working for you.

Input Triggers and Timers and Schedules are Booleans ... there values are TRUE or FALSE.
There are many places where you are comparing them to 1 and 0.
Things that come from device Properties are usually numbers or string. With those values you would compare with == != > etc.

Where ever you have a trigger or condition or timer name such as XXX and you have
               XXX == 1      you could replace it with just XXX
 Where you have
               XXX == 0    you could replace it with NOT XXX  or  !XXX

A debug log file would be useful to see why the timers are not scheduling properly.


@Aegis
Use something like a virtual switch or Multi Switch to be the enables. In your PLEG reference the appropriate conditions using:
MyConditionName     VirtualSwitchEnabe AND  (.... the rest of your logic)
« Last Edit: January 22, 2014, 09:19:41 pm by RichardTSchaefer »

Offline clippermiami

  • Hero Member
  • *****
  • Posts: 1391
  • Karma: +27/-6
Re: Program Logic Version 5.6 is available
« Reply #32 on: January 22, 2014, 09:27:44 pm »
@clippermiami
It was very difficult for me to read ... because you mix Booleans and Numbers.
After close examination ... it looks like the casting is working for you.

Input Triggers and Timers and Schedules are Booleans ... there values are TRUE or FALSE.
There are many places where you are comparing them to 1 and 0.
Things that come from device Properties are usually numbers or string. With those values you would compare with == != > etc.

Where ever you have a trigger or condition or timer name such as XXX and you have
               XXX == 1      you could replace it with just XXX
 Where you have
               XXX == 0    you could replace it with NOT XXX  or  !XXX

A debug log file would be useful to see why the timers are not scheduling properly.


@Aegis
Use something like a virtual switch or Multi Switch to be the enables. In your PLEG reference the appropriate conditions using:
MyConditionName     VirtualSwitchEnabe AND  (.... the rest of your logic)

Thanks, I'll look at them again. I thought I had tried TRUE/FALSE and it hadn't worked but ...

John
Two Vera Plus UI7 Linked via HTTP, 90+ Devices. PlugIns: PLEG, DSC, Blue Iris, MySensors,  AutoVera, ImperiHome, VeraAlerts, EventWatcher

Offline jtmoore

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: Program Logic Version 5.6 is available
« Reply #33 on: January 23, 2014, 06:44:47 pm »
I'm trying to use PLEG to turn off a light approximately 1 minute after the motion sensor condition becomes false. The below code currently turns it off 1 minute after the motion is detected. How do I change the DoLightOff condition below use the new Off Time Stamps in version 5.6 please? Thanks.

Triggers
PIRmotion    PIRstatus is turned on
CeilingOn    SpotLights is turned on

Conditions
DoLightOn   PIRmotion
DoLightOff   CeilingOn and (Not PIRmotion) and (PIRmotion; Now > 1:00)
jtmoore

Offline RexBeckett

  • Master Member
  • *******
  • Posts: 3891
  • Karma: +482/-12
Re: Program Logic Version 5.6 is available
« Reply #34 on: January 23, 2014, 07:46:27 pm »
I'm trying to use PLEG to turn off a light approximately 1 minute after the motion sensor condition becomes false. The below code currently turns it off 1 minute after the motion is detected. How do I change the DoLightOff condition below use the new Off Time Stamps in version 5.6 please? Thanks.

Triggers
PIRmotion    PIRstatus is turned on
CeilingOn    SpotLights is turned on

Conditions
DoLightOn   PIRmotion
DoLightOff   CeilingOn and (Not PIRmotion) and (PIRmotion; Now > 1:00)

Try:
DoLightOff   CeilingOn and (Not PIRmotion) and (!PIRmotion; Now > 1:00)

Offline jtmoore

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: Program Logic Version 5.6 is available
« Reply #35 on: January 23, 2014, 07:56:44 pm »
Thank you. Works perfectly :)
jtmoore

Offline niharmehta

  • Sr. Member
  • ****
  • Posts: 348
  • Karma: +15/-0
Re: Program Logic Version 5.6 is available
« Reply #36 on: January 24, 2014, 01:56:19 am »
RTS.
I have had some strange occurrences with scheduled PLEG actions that have worked well until yesterday when 5.6 was pulled down.

My Vera auto-upgraded at some point before I woke up.  My morning timed functions had not triggered that yesterday. When I checked my Vera it was in a healing state and a status message about one of the ProgramLogic.ts files was updating. However that message remained for quite a while. After I reloaded Luup, it cleared. 

This morning, one of my other timed actions did not kick off as expected. Also, my evening scene for outdoor lights did not work either.   Nothing had changed in PLEG over the last couple of days. The only change is I disabled Vera routing and did a heal as per support to hopefully stop my nightly heals.

 For example:

Schedules:  *** I used Do it now tonight while troubleshooting. So the time is false for Sunset. But correct for SunsetSub15

Sunset   Weekly   t   1,2,3,4,5,6,7   None   None         None   false   2014-01-23 20:51:02.701   0
SunsetSub15   Weekly   -00:15:00t   1,2,3,4,5,6,7   None   None         None   false   2014-01-23 16:58:13.100   0

Condition:  **Notice condition for SunsetSub15 ran yesterday. However the schedule above showed an accurate value for today.
SunsetFrontOn   Sunset   true   2014-01-22 17:12:15.153
SunsetBackyard   SunsetSub15   true   2014-01-22 16:57:15.153   0



Any guidance is appreciated.  I am not sure why simple conditions are missing while the  schedule seems to be fine.
2x VeraLite; 2xTrane Tstats; 45 x Switches/Dimmers/Appliance Modules; 4x Everspring Water Sensors; DSC Integration; 2 x Zwave Door Locks; 1x Ted5K; 1x Rainforest Eagle; Onkyo AVR; 6x Squeezebox;

Offline ih8gates

  • Full Member
  • ***
  • Posts: 207
  • Karma: +8/-1
Re: Program Logic Version 5.6 is available
« Reply #37 on: January 24, 2014, 10:42:20 am »
I too had a couple events that didn't fire off for me this morning, likely a side-effect of the 5.6 upgrade. I found that a couple schedule inputs that were stuck at true (although the timeframe had passed). I did a couple "do it now"'s for the schedule inputs and added some temporary code to a couple of conditions that were "stuck" to force them false and everything appears to be OK for now.

Offline niharmehta

  • Sr. Member
  • ****
  • Posts: 348
  • Karma: +15/-0
Re: Program Logic Version 5.6 is available
« Reply #38 on: January 24, 2014, 11:13:13 am »
Interesting. I noticed that multiple of my morning  based actions did not fire off this morning again as well.   I will do what you did  and see if it works for me:


Schedules:
Sunrise   Weekly   r   1,2,3,4,5,6,7   None   None         None   false   2014-01-24 06:51:42.102   0
SunrisePlus30   Weekly   +00:30:00r   1,2,3,4,5,6,7   None   None         None   false   2014-01-24 07:21:42.103   0
WorkStart   Weekly   07:40:00   1,2,3,4,5   None   None         None   false   2014-01-24 07:40:00.100   0

Device Properties:
HomeStatus   SystemsStatus1   Variable2   1   2014-01-22 07:16:29.045   0

Conditions:
ShutAMBackyard   SunrisePlus30   true   2014-01-22 07:22:38.124   0
SunriseNightLightsOff   Sunrise   true   2014-01-23 06:52:11.150   0
TimeToWork   HomeStatus==1 and WorkStart   true   2014-01-22 07:40:00.115   0
« Last Edit: January 24, 2014, 11:21:08 am by niharmehta »
2x VeraLite; 2xTrane Tstats; 45 x Switches/Dimmers/Appliance Modules; 4x Everspring Water Sensors; DSC Integration; 2 x Zwave Door Locks; 1x Ted5K; 1x Rainforest Eagle; Onkyo AVR; 6x Squeezebox;

Offline Theduck38

  • Full Member
  • ***
  • Posts: 124
  • Karma: +7/-0
Re: Program Logic Version 5.6 is available
« Reply #39 on: January 24, 2014, 01:14:07 pm »
Hello,

Another user in our french forum is reporting the same thing : a schedule is firing at the correct time (in the report), but instead of waiting 2,5hours to go false, it was seen false after 2hours, and no action based on it fired.
His PLEG config was working previously...
-- TD38 --
MacPro OSX10.6.8 -- MCV Vera3 - Rfxcom Rfxtrx433 -- Foscam FI8910W - Vision Security ZP-3102 -- Oregon BTHR918 / THGR810(x4) / THN132N - AeonLabs 4in1(x2) - Owl CM180 -- Duwi 05439(x7) -- ARC Plugs Diagral (x3) - Everspring AN157 - Fibaro FGD-211 -- Eaton 650 & 1200 + APC UPS PRO 900

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +763/-142
Re: Program Logic Version 5.6 is available
« Reply #40 on: January 24, 2014, 02:48:11 pm »
There are still a number of people reporting timer problems. I have not been able to duplicate.
I am still looking for more log files when the PLEG is in debug mode.
When you find a timer has not worked:
   1) Copy the status report
   2) Provide me log files from just before the Timer was Started ... to just after the timer was supposed to stop.
   3) Indicate which timer you were have a problem with.


Offline Theduck38

  • Full Member
  • ***
  • Posts: 124
  • Karma: +7/-0
Re: Program Logic Version 5.6 is available
« Reply #41 on: January 24, 2014, 04:11:18 pm »
I wonder if it did not happen when a timer was active during update. That's why I was asking the time when you posted the update on MCV...
-- TD38 --
MacPro OSX10.6.8 -- MCV Vera3 - Rfxcom Rfxtrx433 -- Foscam FI8910W - Vision Security ZP-3102 -- Oregon BTHR918 / THGR810(x4) / THN132N - AeonLabs 4in1(x2) - Owl CM180 -- Duwi 05439(x7) -- ARC Plugs Diagral (x3) - Everspring AN157 - Fibaro FGD-211 -- Eaton 650 & 1200 + APC UPS PRO 900

Offline martina1965

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-0
Re: Program Logic Version 5.6 is available
« Reply #42 on: January 24, 2014, 05:17:15 pm »
H
I have same issue here with latwt update 5.6. Timer  Schedule reporting true at correct time but conditions dont become true.


Inviato dal mio GT-P5110 utilizzando Tapatalk


Offline GoBruins

  • Newbie
  • *
  • Posts: 14
  • Karma: +2/-2
Re: Program Logic Version 5.6 is available
« Reply #43 on: January 24, 2014, 05:21:23 pm »
Hmm...I am seeing the same problem with schedules not working since the 5.6 update.


Name   Type   Time   Days   Random On Delay   Off After Type   Off Time   Off Days   Random Off Delay   State   Last On   Last Off
Evening   Weekly   -01:00:00t   1,2,3,4,5,6,7   None   None         None   false   2014-01-24 15:50:26.100   0

Conditions

Name   Expression   State   Last True   Last False
LightsOn   Evening   true   2014-01-23 19:46:08.937   0

It looks like the Evening schedule fired, but the condition that depends on it never went true.   ???
« Last Edit: January 24, 2014, 05:25:35 pm by GoBruins »

Offline martina1965

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +0/-0
Re: Program Logic Version 5.6 is available
« Reply #44 on: January 24, 2014, 05:32:25 pm »
My Schedules are acting correctly changing state (true-false) at the right time but conditions states including simply expression of the schedule do not change state (remain all time false).

Inviato dal mio GT-P5110 utilizzando Tapatalk