PLEG not always triggering actions

I feel that my PLEG does not seem to trigger actions all the time. I think since upgrading to 5.3, i noticed some actions not taking place. Looking then at my status, the condition which should trigger the action is true. In particular, quite a few of my actions also trigger a multi switch, so its easy to see what state my HVAC/thermostats are. And recently quite often actions seem not to get triggered. Here is one example which i just noticed:

AutoAway (NOT Mikehome) and (NOT Justhome) 2013-11-15 11:40:30 true
AutoAway5m AutoAway and (AutoAway; NOW > 5:00) 2013-11-15 11:46:03 true
The condition is true, but the action below seems not to have been triggered as my multi switch autohome is still on (should have been turned off) and the autoaway is still off (should have been turned on

Actions for Condition: AutoAway5m
Immediate
Device Action Arguments
Lighting PLEG RunScene SceneNameOrNumber=84
MultiSwitch 2 SetStatus5 newStatus5=1
MultiSwitch 2 SetStatus6 newStatus6=0

At this point i am not sure if the scene 84 has run, as that turns the heating down, and it has been turned down before we left so impossible to tell if it was run

I have the datamine, but unfortunately i cannot use that to track actions. I would like to monitor some of my scene triggers/actions to monitor if PLEG is triggering as it should, also it would then probably make it possible for RTS to find a bug (if there is one)
What makes be believe that it might be a problem with PLEG, some actions which have worked fine and reliable for a while before upgrading PLEG, now have become unreliable (status true but actions not triggered)
I am not sure how i can capture this in a log (unless i let it run for a long time and create a huge log)

You might also put the RunScene at the end … Maybe it’s hanging trying to do something in that scene.

Put a notification in in your Actions … (Push or VeraAlert)

I have put the scenes to the end, see what happens, also created a scene to send a notification (I never managed to send notifications from actions, it just doesnt work, given up on that)
Not sure that is the problem though. The otehr day i had a problem with actions which just mute my iphonelocator (or my wifes), no other action. Condition was true, but my phone was still unmuted. I have completely rewritten the condition itself, but left the action untouched, and its working again. That was extremely weird. Seeing the condition go true, and no action. I just could not understand it, especially as it has been working fine for quite some time.

The next problem now… the condition Jhome has become true. It should have triggered 3 actions as below. Actions for Condition: Jhome
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus2 newStatus2=1 this has not triggered
MultiSwitch 2 SetStatus1 newStatus1=0 this one has triggered
MultiSwitch 2 SetStatus4 newStatus4=0 this one i do not know as it was 0 before

this is my status report if it helps:

Lighting PLEG
Device ID: 2212013-11-15 16:11:54 PLC Version: 5.3

Triggers
Name Description Last Trigger State
HallmotionOn Hall Motion Sensor is tripped 2013-11-08 23:01:02 false
Night1 Day or Night indicates Night time. 2013-11-14 16:58:52 false
Vacation1 MultiSwitch Switch 8 is turned on 0 false
On3 Front door lights is turned on 2013-11-15 07:01:21 false
Patio_door_opened Patio door armed is tripped 0 false
MotionOn2 Front Door Motion Sensor is tripped 2013-11-15 13:33:35 false
MotionFDarmed Front Door Motion Sensor armed is tripped 2013-11-14 13:46:32 false
Mikehome ()Mike is present 2013-11-14 18:29:10 false
PingMike Ping Mike is Tripped 2013-11-15 06:01:35 false
Porchdooropen Porch door is tripped 2013-11-15 15:10:20 false
PingJust Ping Justine is Tripped 2013-11-15 16:08:02 false
Justhome (
)Justine?s iPhone is present 2013-11-15 15:08:32 true
Porcharm Porch door armed is tripped 2013-10-31 14:09:28 false
Cloakarm Cloakroom armed is tripped 0 false
LWindowarm Window Left armed is tripped 2013-10-30 19:36:15 false
RWindowarm Window Right armed is tripped 2013-10-30 19:57:05 false
Kitchenarm Back door kitchen armed is tripped 2013-11-12 12:38:55 false
Garagearm Garage Door Sensor armed is tripped 0 false
AutohomeON MultiSwitch 2 Switch 6 is turned on 2013-11-15 11:46:04 true


Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
Dark Weekly +00:05:00t 1,2,3,4,5,6,7 None Weekly -00:20:00r 1,2,3,4,5,6,7 None false 2013-11-14 16:13:52


Device Properties
Name Device Name Device Variable Last Change Value
Mdistance1 ()Mike Distance 2013-11-15 16:07:04 35.947
Jdistance (
)Justine?s iPhone Distance 2013-11-15 15:18:49 0.007
WE11 Weekend 2013-11-11 00:00:00 0
Mdirection ()Mike IconCode 2013-11-15 08:09:07 0
Jdirection (
)Justine?s iPhone IconCode 2013-11-15 16:06:49 50


Conditions
Name Expression Last True State
BothOff Not On3 2013-11-15 07:04:16 true
AutoOn1 Night1 and MotionOn2 and BothOff 2013-11-15 07:01:21 false
BothAutoOn (On3 and (AutoOn1; On3 < 1:00)) 2013-11-15 07:01:21 false
AutoOff1 (MotionOn2; Now > 1:30) or (Not Night1) 2013-11-15 07:04:16 true
LastTrip BothAutoOn and MotionOn2 2013-11-15 07:01:57 false
AutoOn2 Night1 and HallmotionOn 2013-11-08 23:01:02 false
LastTripHall AutoOn2 and HallmotionOn 2013-11-08 23:01:02 false
AutoOff2 (AutoOn2 and (LastTripHall; Now > 1:30)) or (Not Night1) 2013-11-15 07:15:29 true
GardenOn (((19:15:00;NOW) and WE11==0) or ((17:10:00;NOW) and WE11==1)) and Night1 and NOT Vacation1 2013-11-14 19:15:32 false
GardenOff (WE11==0 and (22:20:00;NOW)) or (WE11==1 and (22:50:00;NOW)) 2013-11-14 22:20:46 false
Patiodoor Patio_door_opened 0 false
FDmotion MotionFDarmed 2013-11-14 13:46:32 false
Mikeaway Mdistance1 > 0.4 2013-11-15 06:20:04 true
Jgoingaway (Jdirection == 25) 2013-11-15 14:37:50 false
Mhome Mikehome and (PingMike;Now < 10:00) 2013-11-15 06:02:16 false
Jhome Justhome 2013-11-15 15:08:32 true
Mcomhome (Mdirection == 75) and Mdistance1 < 1.3 2013-11-14 18:27:31 false
Jcomhome (Jdirection == 75) and Jdistance < 1.3 2013-11-15 15:04:47 false
_Jmute (Justhome; NOW > 8:00) and Justhome and (Junmute;Now > 8:00) 2013-11-15 16:09:20 true
_Mmute (Mikehome; NOW > 8:00) and Mhome and (Munmute;Now > 8:00) 2013-11-15 06:03:16 false
Mcomdark (Mcomhome or Jcomhome) and Dark 2013-11-14 18:27:31 false
Porchopen Porchdooropen 2013-11-15 15:10:20 false
Junmute (Porchopen and Justhome) or NopingJ 2013-11-15 15:10:20 false
Munmute (Porchopen and Mikehome) or NopingM 2013-11-15 06:03:23 false
AutoAway (NOT Mikehome) and (NOT Justhome) 2013-11-15 11:40:30 false
AutoAway5m AutoAway and (AutoAway; NOW > 5:00) 2013-11-15 11:46:03 false
Mhomelights (Mcomhome;Mikehome < 30:00) and Dark 2013-11-14 18:29:11 false
AutoHome (Mcomhome or Jcomhome or Justhome or PingJust or PingMike or Mikehome) and NOT AutohomeON 2013-11-15 11:46:03 false
Justaway Jdistance > 0.4 2013-11-15 11:42:24 false
Mikenotnear (Mcomhome;Mgoingaway < 3:00) or Mdistance1 > 2.5 2013-11-15 06:25:13 true
Mcomhometrue Mcomhome and (Mcomhome; NOW > 2:00) 2013-11-14 18:25:32 false
Mgoingaway (Mdirection == 25) 2013-11-15 06:51:03 false
NopingJ (PingJust and (PingJust; Now < 20:00)) 2013-11-15 16:08:20 false
NopingM (PingMike and (PingMike; Now < 10:00)) 2013-11-15 06:02:16 false
Justnotnear (Jcomhome;Jgoingaway < 3:00) or Jdistance > 2.5 2013-11-10 15:10:31 false
Jhomelights (Jcomhome;Justhome < 30:00) and Dark 2013-11-14 16:13:52 false
test (Munmute;Now > 8:00) 2013-11-15 06:12:16 true
test2 (PingMike;Now < 10:00) 2013-11-15 06:02:16 false
test3 (Mhome; NOW > 8:00) 2013-11-15 06:11:16 true
test4 (Mikehome; NOW > 8:00) 2013-11-14 18:37:32 true


Actions
Actions for Condition: AutoOn1
Immediate
Device Action Arguments
Front door lights SetLoadLevelTarget newLoadlevelTarget=100

Actions for Condition: AutoOff1
Immediate
Device Action Arguments
Front door lights SetLoadLevelTarget newLoadlevelTarget=0

Delay 10
Device Action Arguments
Front door lights SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: AutoOn2
Immediate
Device Action Arguments
Blue Lights SetTarget newTargetValue=1

Actions for Condition: AutoOff2
Immediate
Device Action Arguments
Blue Lights SetTarget newTargetValue=0

Actions for Condition: GardenOn
Immediate
Device Action Arguments
Brick lights SetTarget newTargetValue=1
Uplighters SetTarget newTargetValue=1
Water feature lights SetTarget newTargetValue=1

Actions for Condition: GardenOff
Immediate
Device Action Arguments
Uplighters SetTarget newTargetValue=0
Water feature lights SetTarget newTargetValue=0
Brick lights SetTarget newTargetValue=0

Actions for Condition: Patiodoor
Immediate
Device Action Arguments
Lighting PLEG RunScene SceneNameOrNumber=63

Actions for Condition: Mcomhome
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus3 newStatus3=1

Actions for Condition: FDmotion
Immediate
Device Action Arguments
Lighting PLEG RunScene SceneNameOrNumber=88

Actions for Condition: Mcomdark
Immediate
Device Action Arguments
Front door lights SetLoadLevelTarget newLoadlevelTarget=100

Delay 30
Device Action Arguments
Porch light SetLoadLevelTarget newLoadlevelTarget=100

Actions for Condition: Junmute
Immediate
Device Action Arguments
(*)Justine?s iPhone SetMute newMuteStatus=0

Delay 02:00
Device Action Arguments
(*)Justine?s iPhone ForceRefresh PresentStatus=0

Delay 04:00
Device Action Arguments
(*)Justine?s iPhone ForceRefresh PresentStatus=0

Delay 06:00
Device Action Arguments
(*)Justine?s iPhone ForceRefresh PresentStatus=0

Delay 08:00
Device Action Arguments
(*)Justine?s iPhone ForceRefresh PresentStatus=0

Actions for Condition: Munmute
Immediate
Device Action Arguments
(*)Mike SetMute newMuteStatus=0

Delay 02:45
Device Action Arguments
(*)Mike ForceRefresh PresentStatus=0

Delay 03:00
Device Action Arguments
(*)Mike ForceRefresh PresentStatus=0

Delay 05:45
Device Action Arguments
(*)Mike ForceRefresh PresentStatus=0

Delay 07:00
Device Action Arguments
(*)Mike ForceRefresh PresentStatus=0

Delay 10:00
Device Action Arguments
(*)Mike ForceRefresh PresentStatus=0

Actions for Condition: AutoAway5m
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus5 newStatus5=1
MultiSwitch 2 SetStatus6 newStatus6=0
Lighting PLEG RunScene SceneNameOrNumber=84
Lighting PLEG RunScene SceneNameOrNumber=101
Homewave Push SendMessage

Actions for Condition: AutoHome
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus5 newStatus5=0
MultiSwitch 2 SetStatus6 newStatus6=1
Lighting PLEG RunScene SceneNameOrNumber=85
Lighting PLEG RunScene SceneNameOrNumber=102

Actions for Condition: Mhomelights
Delay 05:00
Device Action Arguments
Front door lights SetLoadLevelTarget newLoadlevelTarget=0
Porch light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: Mhome
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus8 newStatus8=1
MultiSwitch 2 SetStatus7 newStatus7=0
MultiSwitch 2 SetStatus3 newStatus3=0

Actions for Condition: Jhome
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus2 newStatus2=1
MultiSwitch 2 SetStatus1 newStatus1=0
MultiSwitch 2 SetStatus4 newStatus4=0

Actions for Condition: Jcomhome
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus4 newStatus4=1

Actions for Condition: Justaway
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus2 newStatus2=0
MultiSwitch 2 SetStatus1 newStatus1=1

Actions for Condition: Mikeaway
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus7 newStatus7=1
MultiSwitch 2 SetStatus8 newStatus8=0

Actions for Condition: Mikenotnear
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus3 newStatus3=0
Front door lights SetLoadLevelTarget newLoadlevelTarget=0
Porch light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: Mcomhometrue
Delay 03:00
Device Action Arguments
Porch light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: Justnotnear
Immediate
Device Action Arguments
MultiSwitch 2 SetStatus4 newStatus4=0
Front door lights SetLoadLevelTarget newLoadlevelTarget=0
Porch light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: Jhomelights
Delay 05:00
Device Action Arguments
Front door lights SetLoadLevelTarget newLoadlevelTarget=0
Porch light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: _Mmute
Immediate
Device Action Arguments
(*)Mike SetMute newMuteStatus=1

Actions for Condition: _Jmute
Immediate
Device Action Arguments
(*)Justine?s iPhone SetMute newMuteStatus=1

Mike,
Do you have a debug log for that time interval ?
Just double checking … is the PLEG armed ?

PLEG is armed. It is triggering some actions, but just not always all of them. I have not got a debug log, but i will turn it on now. Once i have noticed something going wrong, i’ll email you the log with a description of what went wrong. Thats probably the best thing to do.

This is something else looking strange:

Lighting PLEG
Device ID: 2212013-11-16 12:48:47.321 PLC Version: 5.3

Triggers
Mikehome (*)Mike is present 2013-11-16 08:55:06.095 true
PingMike Ping Mike is Tripped 2013-11-16 10:42:50.204 true

Conditions
Mhome Mikehome and (PingMike;Now < 10:00) 2013-11-16 10:43:41.398 false

Given the time, 12:48, Mhome should still be true ?

Conditions that are updated by the evaluation of NOW are not accurately reported in the status report. Trip any real input trigger or variable or schedule … and you will see the current state.

This is by design.

Ok that explains some findings i had. In this case though when mhome is true, my iphonelocator is muted. It was not, so i am quite sure the condition was not true, and it should have been, shouldn’t it ?
And it is not generally not working, as my phone is muted now. But is was unmuted for a few hours, thats how i noticed there might be something going wrong.

Something else not looking right here. This schedule should be false in my opinion:

HVAC PLEG
Device ID: 2502013-11-16 23:57:57.272 PLC Version: 5.3

HeatWEOn Weekly 06:35:00 6 None Weekly 22:40:00 6,7 None true 2013-11-16 06:35:00.100

It is weekend (day6, 23:57) so why is this still true ? I noticed as my heating was not turned down to night temperature

If have logging on the PLEG. Do you think it is worth sending you the log file Richard ?

Yes EMAIL me the log.

Mike … can you also for something to get a new time stamp on something …
Then compare the time in the report with the current time.

The time at the top of the report is the time of your Web Browser.
The times on the events are times according to Vera.

I want to make sure your Vera Time is correct.

Not sure why you have included a 7 for the end since the beginning excludes 7. Perhaps that’s the culprit.

@BrianLBeaton Should not hurt …

Mike also email a current Status report … Helps me to understand what I see in the log.

@RichardTSchaefer

I have sent you 2 emails, one with the status report (and another schedule not firing), and i forgot to attach the log file so i sent that with another email

@BrianLBeaton

You are right it should be

HeatWEOn Weekly 06:35:00 6,7 None Weekly 22:40:00 6,7

I have corrected that now. In my opinion it should have still switched off on Saturday 22:40, and the just not switch on Sunday morning (which is exactly what happend, i turned the heating down manually Saturday night, it did not come on Sunday morning)

This log file is becoming very big. I would like to start it again from 0 (as you have it up to now anyway). How can i do that ? I tried reloading Vera but it is still there in its full size

Never received the log or any email …

That is strange, but i think that happened before. I will send you a pm of where i sent it too and my email, then i’ll try sending it again

I have sent another email to you, with another status report and another little problem in schedules…

Would it be possible in a future release to make it possible to sort schedules like it is possible now with conditions ? It would make it easier to sort by groups of events. As mine have been altered over time they are not together, so its easy to make mistakes by mising a newer schedule… as happened on my PLEG…

There is a weakness in using Schedules with Absolute times.
This is actually true of Vera Scene’s as well … I just use it’s service.

Say you have a schedule to turn on on Friday at 20:00:00
If Vera Restarts at 19:59:59 … and does not get to the PLEG startup until after 20:00:00
like maybe 20:00:05 … then when it schedules for Friday at 20:00:00 … it will happen about a week later!

With some amount of coding I could emulate the logic of luup.call_timer … and at startup if we just missed the schedule … we could schedule it immediately.

Note: If you have a Interval OFF … As long as the Start happened … the OFF would happen because it already evaluates the Interval on startup … and it would expire even if Vera was not running at the time.