PLEG - Trigger based on other PLEG device is always true

Decided to break this into its own thread (since there’s now a sub-forum for the PL plugins)

Problem: Two PLEG devices, where PLEG2 uses a condition in PLEG1 as a trigger. The PLEG1 condition gets updated (true/false) as expected. The PLEG2 trigger is always “true”.

Expectation: That the two conditions accurately reflect each other. So If the PLEG1 condition is false, the PLEG2 trigger based on the PLEG1 condition should also be false.

(I’ve double/triple/quadruple checked spelling (copy/paste, to be sure) of the Condition name, and - AFICT - it’s accurate.)

Configuration
I’ve broken my lights out into 3 different PLEG devices.

Logic_LightManagement_Basement, Logic_LightManagement_1st, Logic_LightManagement_2nd. I did this because I wondered if there perhaps may be a matter of the number of light triggers in the single LightManagement PLEG device I had originally - that stopped working as mentioned in this thread: http://forum.micasaverde.com/index.php/topic,12759.msg103446.html#msg103446. It doesn’t seem to be the case (the limits within my house are such that it doesn’t appear to hit any limits within a single PLEG device).

They contain explicit On and Off triggers for the various light switches on my various floors in the house (too many to list, but it’s a combination of dimmers and on/off switches).

Each of the Logic_LightManagement_* devices have 2 conditions:

AllLigthsOff_ = AND’ed list of LightOff_* devices that level
LightOn_ = OR’ed list of LightOn_* devices for that level

I then have another PLEG device: Logic_HeatManagement (“global” device) containing Triggers based on the Logic_LightManagement_* LightOn/AllLightsOff_* conditions as well as a “isWinter” trigger. This is a Virtual Switch being set by weather/temp forecasts processed with luup/lua and a presence condition based on another PLEG device (Logic_Presence) which in turn uses two Google Latitude plugin devices tracking our phones in a “peopleInTheHouse” condition.

Example condition for the Logic_HeatManagement device:

heatOn_Basement = isWinter AND peopleInTheHouse AND LightOn_Basement
heatOff_Basement = isWinter AND LightsOff_Basement

What happens
All 3 of the Logic_LightManagement devices log appropriate changes to the triggers and their conditions (as a result of the trigger changes). I.e. when the first light in the basement is turned on, the LuaUPnP.log file indicates that the LightOn_* trigger for the device is now true (and the inverse LightOff_* device becomes false). Further, the condition LightOn_Basement becomes “true” (still for the Logic_LightManagement_Basement device).

I’ve deleted and created a new Logic_HeatManagement PLEG device. I used the following process to “recreate” the new device:

First I reloaded Luup/Lua
Closed the Chrome Tab
Created a new TAB
Accessed /cmh
Forced a reload (w/o cache - ctrl+R)
Deleted the old Logic_HeatManagement PLEG device.
Reloaded twice
Closed the TAB (again)
Reopened a new TAB to validate that the device was removed.

Then

Rebooted Vera from CLI
Closed the TAB
Created a new TAB
Forced another page reload (ctrl + reload)
Reloaded Luup/Lua (twice).

Then I finally created the new Logic_HeatManagement device
Reloaded Luup/Lua (again, twice)
Closed the TAB
Created a new TAB
Page Reloads w/o using cache (ctrl+R x 2)

Then added the conditions for the basement, etc

And repeated the Close Tab/refresh/reload/etc process again[1]

And still, the “Logic_HeatManagement” conditions and triggers remain “true” regardless of what the Logic_LightManagement_* devices indicate.

After the Vera reboot, the LuaUPnP.log shows no related errors (for PLEG devices). There’s the “typical” Ergy error message, the “can’t convert devices” error messages for plugins that were not installed via the MiOS store, and an error for the Vera Alerts plugin - “luup_require can’t find veraUserTemplateDefinition”, but nothing PLEG related (at all).

[b]Logic_LightManagement_Basement[/b]
[b]ConditionMap[b]:

['AllLightsOff_Basement','LightOff_CeilingBM%20AND%20LightOff_HallwayBM','LightOn_Basement','LightOn_CeilingBM%20OR%20LightOn_HallwayBM']

[b]Logic_HeatManagement device[/b]
ConditionMap:

['noHeat_Basement','isWinter%20AND%20LightsOff_Basement1','noHeat_1st','isWinter%20AND%20LightsOff_1st','noHeat_2nd','isWinter%20AND%20LightsOff_2nd','heat_Basement','peopleInTheHouse%20AND%20isWinter%20AND%20LightOn_Basement1','heat_1st','peopleInTheHouse%20AND%20isWinter%20AND%20LightOn_1st','heat_2nd','peopleInTheHouse%20AND%20isWinter%20AND%20LightOn_2nd','arePresent','peopleInTheHouse','Winter','isWinter']

TriggerDeviceVariableMap:

{{name = 'LightsOff_Basement1', device= 198, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'AllLightsOff_Basement'}, } }, {name = 'LightsOff_1st', device= 200, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'AllLightsOff_1st'}, } }, {name = 'LightsOff_2nd', device= 199, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'AllLightsOff_2nd'}, } }, {name = 'LightOn_1st', device= 198, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'LightOn_1st'}, } }, {name = 'LightOn_2nd', device= 199, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'LightOn_2nd'}, } }, {name = 'LightOn_Basement1', device= 198, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'LightOn_Basement'}, } }, {name = 'peopleInTheHouse', device= 188, service= 'urn:rts-services-com:serviceId:ProgramLogicEG', args = {{name = 'ConditionSatisfied', op = '=',  value = 'areHome'}, } }, {name = 'isWinter', device= 35, service= 'urn:upnp-org:serviceId:SwitchPower1', args = {{name = 'Status', op = '=',  value = '0'}, } }, }

Log output from Logic_HeatManagement and Logic_LightManagement for when I turn on the ceiling lights in the basement in the next reply.

[1] = Seems like another horrendous mistake by MicasaVerde to release (even a Beta of a) software (UI5) that requires anything remotely close to this type of usage pattern, but that’s an entirely different discussion.

Log from above/below issue ([url=http://forum.micasaverde.com/index.php/topic,13779.0.html]http://forum.micasaverde.com/index.php/topic,13779.0.html[/url])

08      02/22/13 8:56:26.804    JobHandler_LuaUPnP::HandleActionRequest device: 17 service: urn:upnp-org:serviceId:Dimming1 action: SetLoadLevelTarget <0x327b2680>
08      02/22/13 8:56:26.804    JobHandler_LuaUPnP::HandleActionRequest argument fwdserver=1 <0x327b2680>
08      02/22/13 8:56:26.804    JobHandler_LuaUPnP::HandleActionRequest argument remoteIP=24.60.136.225 <0x327b2680>
08      02/22/13 8:56:26.804    JobHandler_LuaUPnP::HandleActionRequest argument token=b1cf028757ce01d859d34aeca1459515bf0e79c5 <0x327b2680>
08      02/22/13 8:56:26.805    JobHandler_LuaUPnP::HandleActionRequest argument PK_AccessPoint=30004107 <0x327b2680>
08      02/22/13 8:56:26.805    JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=17 <0x327b2680>
08      02/22/13 8:56:26.808    JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:Dimming1 <0x327b2680>
08      02/22/13 8:56:26.808    JobHandler_LuaUPnP::HandleActionRequest argument action=SetLoadLevelTarget <0x327b2680>
08      02/22/13 8:56:26.809    JobHandler_LuaUPnP::HandleActionRequest argument newLoadlevelTarget=100 <0x327b2680>
08      02/22/13 8:56:26.809    JobHandler_LuaUPnP::HandleActionRequest argument rand=0.9907635049894452 <0x327b2680>
06      02/22/13 8:56:26.809    Device_Variable::m_szValue_set device: 17 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelTarget was: 0 now: 100 #hooks: 0 upnp: 0 v:0xfec1d0/NONE duplicate:0 <0x327b2680>
02      02/22/13 8:56:26.917    ZWJob_SendData  UPDATE MANUAL ROUTE 6=0xfa12c7 <0x327b2680>
02      02/22/13 8:56:26.923    UPDATE MANUAL ROUTE2 6=0xfa12c7 <0x2b971680>
02      02/22/13 8:56:26.924    ZW_Send_Data node 6 USING ROUTE 255.168.13.250 <0x2b971680>
02      02/22/13 8:56:27.027    UPDATE MANUAL ROUTE2 6=0xfa12c7 <0x2b971680>
02      02/22/13 8:56:27.028    ZW_Send_Data node 6 USING ROUTE 255.168.13.250 <0x2b971680>
06      02/22/13 8:56:27.136    Device_Variable::m_szValue_set device: 17 service: urn:upnp-org:serviceId:Dimming1 variable: LoadLevelStatus was: 0 now: 100 #hooks: 7 upnp: 0 v:0xcd2448/NONE duplicate:0 <0x2b571680>
06      02/22/13 8:56:27.136    Device_Variable::m_szValue_set device: 17 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0xfc9450/NONE duplicate:1 <0x2b571680>
50      02/22/13 8:56:27.137    luup_log:0: w_dimlevl(17/urn:upnp-org:serviceId:Dimming1/LoadLevelStatus/0/100) <0x2b571680>
06      02/22/13 8:56:27.137    Device_Variable::m_szValue_set device: 17 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 600 #hooks: 0 upnp: 0 v:0xfc9450/NONE duplicate:0 <0x2b571680>
06      02/22/13 8:56:27.138    Device_Variable::m_szValue_set device: 17 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Log was: 0,480,480,1361539912,113 now: 600,34,600,1361541387,1588 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2b571680>
50      02/22/13 8:56:27.139    luup_log:0: w_watts(17/urn:upnp-org:serviceId:Dimming1/LoadLevelStatus/0/600) <0x2b571680>
50      02/22/13 8:56:27.139    luup_log:0: watts(17):[0,600] <0x2b571680>
06      02/22/13 8:56:27.139    Device_Variable::m_szValue_set device: 17 service: urn:upnp-org:serviceId:SwitchPower1 variable: Status was: 0 now: 1 #hooks: 4 upnp: 0 v:0xfb33b0/NONE duplicate:0 <0x2b571680>
08      02/22/13 8:56:27.140    JobHandler_LuaUPnP::HandleActionRequest device: 198 service: urn:rts-services-com:serviceId:ProgramLogicC action: TriggerAction <0x2b571680>
08      02/22/13 8:56:27.140    JobHandler_LuaUPnP::HandleActionRequest argument triggerName=LightOn_CeilingBM <0x2b571680>
50      02/22/13 8:56:27.141    luup_log:198: ProgramLogicEG:198:TriggerAction:LightOn_CeilingBM <0x2b571680>
06      02/22/13 8:56:27.141    Device_Variable::m_szValue_set device: 198 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: None now:  #hooks: 3 upnp: 0 v:0x1154700/NONE duplicate:0 <0x2b571680>
07      02/22/13 8:56:27.142    Event::Evaluate 72 LightsOff_Basement1 scene ProgramLogic_201 is false repeat 0/-1 <0x2b571680>
07      02/22/13 8:56:27.142    Event::Evaluate 75 LightOn_1st scene ProgramLogic_201 is false repeat 0/-1 <0x2b571680>
07      02/22/13 8:56:27.142    Event::Evaluate 77 LightOn_Basement1 scene ProgramLogic_201 is false repeat 0/-1 <0x2b571680>
06      02/22/13 8:56:27.143    Device_Variable::m_szValue_set device: 198 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1361539953 now: 1361541387 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2b571680>
50      02/22/13 8:56:27.143    luup_log:198: ProgramLogicEG:198:EvalTriggers:Name:LightOn_CeilingBM State:true Device:17 <0x2b571680>
50      02/22/13 8:56:27.144    luup_log:198: ProgramLogicEG:198:EvalTriggers:Name:LightOff_CeilingBM State:false Device:17 <0x2b571680>
50      02/22/13 8:56:27.144    luup_log:198: ProgramLogicEG:198:EvalTriggers:Name:LightOn_HallwayBM State:false Device:92 <0x2b571680>
50      02/22/13 8:56:27.145    luup_log:198: ProgramLogicEG:198:EvalTriggers:Name:LightOff_HallwayBM State:true Device:92 <0x2b571680>
50      02/22/13 8:56:27.155    luup_log:198: ProgramLogicEG:198:EvalTriggers:Name:LightOn_StairsBM State:false Device:91 <0x2b571680>
50      02/22/13 8:56:27.157    luup_log:198: ProgramLogicEG:198:EvalTriggers:Name:LightOff_StairsBM State:true Device:91 <0x2b571680>
50      02/22/13 8:56:27.159    luup_log:198: ProgramLogicEG:198:EvalConditions:Condition:AllLightsOff_Basement Trigger:LightOn_CeilingBM Result:false <0x2b571680>
50      02/22/13 8:56:27.160    luup_log:198: ProgramLogicEG:198:EvalConditions:Condition:LightOn_Basement Trigger:LightOn_CeilingBM Result:true <0x2b571680>
50      02/22/13 8:56:27.160    luup_log:198: ProgramLogicEG:198:TriggerCondition:LightOn_Basement <0x2b571680>
06      02/22/13 8:56:27.161    Device_Variable::m_szValue_set device: 198 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was:  now: LightOn_Basement #hooks: 3 upnp: 0 v:0x1154700/NONE duplicate:0 <0x2b571680>
07      02/22/13 8:56:27.161    Event::Evaluate 72 LightsOff_Basement1 scene ProgramLogic_201 is false repeat 0/-1 <0x2b571680>
07      02/22/13 8:56:27.161    Event::Evaluate 75 LightOn_1st scene ProgramLogic_201 is false repeat 0/-1 <0x2b571680>
08      02/22/13 8:56:27.162    JobHandler_LuaUPnP::HandleActionRequest device: 201 service: urn:rts-services-com:serviceId:ProgramLogicC action: TriggerAction <0x2b571680>
08      02/22/13 8:56:27.162    JobHandler_LuaUPnP::HandleActionRequest argument triggerName=LightOn_Basement1 <0x2b571680>
50      02/22/13 8:56:27.163    luup_log:201: ProgramLogicEG:201:TriggerAction:LightOn_Basement1 <0x2b571680>
06      02/22/13 8:56:27.163    Device_Variable::m_szValue_set device: 201 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was: None now:  #hooks: 0 upnp: 0 v:0x1154700/NONE duplicate:0 <0x2b571680>
06      02/22/13 8:56:27.164    Device_Variable::m_szValue_set device: 201 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1361539954 now: 1361541387 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2b571680>
50      02/22/13 8:56:27.164    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:LightsOff_Basement1 State:true Device:198 <0x2b571680>
50      02/22/13 8:56:27.165    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:LightsOff_1st State:true Device:200 <0x2b571680>
50      02/22/13 8:56:27.165    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:LightsOff_2nd State:true Device:199 <0x2b571680>
50      02/22/13 8:56:27.166    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:LightOn_1st State:true Device:198 <0x2b571680>
50      02/22/13 8:56:27.166    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:LightOn_2nd State:true Device:199 <0x2b571680>
50      02/22/13 8:56:27.167    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:LightOn_Basement1 State:true Device:198 <0x2b571680>
50      02/22/13 8:56:27.167    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:peopleInTheHouse State:true Device:188 <0x2b571680>
50      02/22/13 8:56:27.168    luup_log:201: ProgramLogicEG:201:EvalTriggers:Name:isWinter State:true Device:35 <0x2b571680>
50      02/22/13 8:56:27.169    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:noHeat_Basement Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.170    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:noHeat_1st Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.172    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:noHeat_2nd Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.173    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:heat_Basement Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.173    luup_log:201: ProgramLogicEG:201:TriggerCondition:heat_Basement <0x2b571680>
06      02/22/13 8:56:27.174    Device_Variable::m_szValue_set device: 201 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: ConditionSatisfied was:  now: heat_Basement #hooks: 0 upnp: 0 v:0x1154700/NONE duplicate:0 <0x2b571680>
06      02/22/13 8:56:27.174    Device_Variable::m_szValue_set device: 201 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1361541387 now: 1361541387 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2b571680>
50      02/22/13 8:56:27.176    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:heat_1st Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.178    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:heat_2nd Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.179    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:arePresent Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.179    luup_log:201: ProgramLogicEG:201:EvalConditions:Condition:Winter Trigger:LightOn_Basement1 Result:true <0x2b571680>
50      02/22/13 8:56:27.180    luup_log:201: ProgramLogicEG:201:SaveDB:{{name ='noHeat_Basement', state = true, seq = 1361539912},{name ='noHeat_1st', state = true, seq = 1361539586},{name ='noHeat_2nd', state = true, seq = 1361539738},{name ='heat_Basement', state = true, seq = 1361541387},{name ='heat_1st', state = true, seq = 0},{name ='heat_2nd', state = true, seq = 1361530444},{name ='LightsOff_Basement1', state = true, seq = 1361539912},{name ='LightsOff_1st', state = true, seq = 1361539586},{name ='LightsOff_2nd', state = true, seq = 1361539738},{name ='LightOn_1st', state = true, seq = 0},{name ='LightOn_2nd', state = true, seq = 1361530444},{name ='LightOn_Basement1', state = true, seq = 1361541387},{name ='peopleInTheHouse', state = true, seq = 0},{name ='isWinter', state = true, seq = 0},{name ='arePresent', state = true, seq = 0},{name ='Winter', state = true, seq = 0},} <0x2b571680>
06      02/22/13 8:56:27.181    Device_Variable::m_szValue_set device: 201 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name ='noHeat_Basement', state = true, seq = 1361539912},{name ='noHeat_1st', state = true, seq = 1361539586},{name ='noHeat_2nd', state = true, seq = 1361539738},{name ='heat_Basement', state = true, seq = 1361534354},{name ='heat_1st', state = true, seq = 0},{name ='heat_2nd', state = true, seq = 1361530444},{name ='LightsOff_Basement1', state = true, seq = 1361539912},{name ='LightsOff_1st', state = true, seq = 1361539586},{name ='LightsOff_2nd', state = true, seq = 1361539738},{name ='LightOn_1st', state = true, seq = 0},{name ='LightOn_2nd', state = true, seq = 1361530444},{name ='LightOn_Basement1', state = true, seq = 1361534354},{name ='peopleInTheHouse', state = true, seq = 0},{name ='isWinter', state = true, seq = 0},{name ='arePresent', state = true, seq = 0},{name ='Winter', state = true, seq = 0},} now: {{name ='noHeat_Basement', state = true, seq = 1361539912},{name ='noHeat_1st', state = true, seq = 1361539586},{name ='noHeat_2nd', state = true, seq = 1361539738},{name ='heat_Basement', state = true, seq = 1361541387},{name ='heat_1st', state = true, seq = 0},{name ='heat_2nd', state = true, seq = 1361530444},{name ='LightsOff_Basement1', state = true, seq = 1361539912},{name ='LightsOff_1st', state = true, seq = 1361539586},{name ='LightsOff_2nd', state = true, seq = 1361539738},{name ='LightOn_1st', state = true, seq = 0},{name ='LightOn_2nd', state = true, seq = 1361530444},{name ='LightOn_Basement1', state = true, seq = 1361541387},{name ='peopleInTheHouse', state = true, seq = 0},{name ='isWinter', state = true, seq = 0},{name ='arePresent', state = true, seq = 0},{name ='Winter', state = true, seq = 0},} #hooks: 0 upnp: 0 v:0x1165e58/NONE duplicate:0 <0x2b571680>
07      02/22/13 8:56:27.182    Event::Evaluate 77 LightOn_Basement1 scene ProgramLogic_201 is true users:(null) allow:1 <0x2b571680>
08      02/22/13 8:56:27.182    Scene::RunScene running 188 ProgramLogic_201 <0x2b571680>
06      02/22/13 8:56:27.183    Device_Variable::m_szValue_set device: 198 service: urn:rts-services-com:serviceId:ProgramLogicEG variable: LastConditionChange was: 1361541387 now: 1361541387 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2b571680>
50      02/22/13 8:56:27.183    luup_log:198: ProgramLogicEG:198:FireAction:Nothing found for:LightOn_Basement <0x2b571680>
50      02/22/13 8:56:27.184    luup_log:198: ProgramLogicEG:198:SaveDB:{{name ='AllLightsOff_Basement', state = false, seq = 1361539912},{name ='LightOn_Basement', state = true, seq = 1361541387},{name ='LightOn_CeilingBM', state = true, seq = 1361541387},{name ='LightOff_CeilingBM', state = false, seq = 1361539912},{name ='LightOn_HallwayBM', state = false, seq = 1361533592},{name ='LightOff_HallwayBM', state = true, seq = 1361539912},{name ='LightOn_StairsBM', state = false, seq = 1361530280},{name ='LightOff_StairsBM', state = true, seq = 1361539917},} <0x2b571680>
06      02/22/13 8:56:27.184    Device_Variable::m_szValue_set device: 198 service: urn:rts-services-com:serviceId:ProgramLogicC variable: ObjectStatusMap was: {{name ='AllLightsOff_Basement', state = true, seq = 1361539912},{name ='LightOn_Basement', state = false, seq = 1361534354},{name ='LightOn_CeilingBM', state = false, seq = 1361534354},{name ='LightOff_CeilingBM', state = true, seq = 1361539912},{name ='LightOn_HallwayBM', state = false, seq = 1361533592},{name ='LightOff_HallwayBM', state = true, seq = 1361539912},{name ='LightOn_StairsBM', state = false, seq = 1361530280},{name ='LightOff_StairsBM', state = true, seq = 1361539917},} now: {{name ='AllLightsOff_Basement', state = false, seq = 1361539912},{name ='LightOn_Basement', state = true, seq = 1361541387},{name ='LightOn_CeilingBM', state = true, seq = 1361541387},{name ='LightOff_CeilingBM', state = false, seq = 1361539912},{name ='LightOn_HallwayBM', state = false, seq = 1361533592},{name ='LightOff_HallwayBM', state = true, seq = 1361539912},{name ='LightOn_StairsBM', state = false, seq = 1361530280},{name ='LightOff_StairsBM', state = true, seq = 1361539917},} #hooks: 0 upnp: 0 v:0x1165e58/NONE duplicate:0 <0x2b571680>
07      02/22/13 8:56:27.186    Event::Evaluate 36 LightOn_CeilingBM scene ProgramLogic_198 is true users:(null) allow:1 <0x2b571680>
08      02/22/13 8:56:27.186    Scene::RunScene running 185 ProgramLogic_198 <0x2b571680>
07      02/22/13 8:56:27.186    Event::Evaluate 37 LightOff_CeilingBM scene ProgramLogic_198 is false repeat 0/-1 <0x2b571680>
06      02/22/13 8:56:27.186    Device_Variable::m_szValue_set device: 17 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 600 now: 600 #hooks: 0 upnp: 0 v:0xfc9450/NONE duplicate:1 <0x2b571680>
50      02/22/13 8:56:27.189    luup_log:0: w_switch(17/urn:upnp-org:serviceId:SwitchPower1/Status/0/1) <0x2b571680>
06      02/22/13 8:56:27.190    Device_Variable::m_szValue_set device: 17 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 600 now: 600 #hooks: 0 upnp: 0 v:0xfc9450/NONE duplicate:1 <0x2b571680>
50      02/22/13 8:56:27.190    luup_log:0: w_watts(17/urn:upnp-org:serviceId:SwitchPower1/Status/0/600) <0x2b571680>
50      02/22/13 8:56:27.191    luup_log:0: watts(17):[0,600] <0x2b571680>
04      02/22/13 8:56:27.192    <Job ID="260" Name="Level 99 node 6" Device="17" Created="2013-02-22 8:56:26" Started="2013-02-22 8:56:26" Completed="2013-02-22 8:56:27" Duration="0.274787000" Runtime="0.268610000" Status="Successful" LastNote="Transmit was ok" Node="6" NodeType="ZWaveDimmableLight" NodeDescription="Lights_Ceiling_Basement"/> <0x2b571680>

Edit: Added link to post this log applies to.

PL? devices can trigger other PL? devices. But they can NOT convey their values.
The trigger constitutes a true value.

There is NO trigger to tell other PL? devices that a condition is no longer true.

If you must convey values between PL? devices than use a Variable Container
@RexBeckett has described this process.

When 2.1 comes out (It’s in MCV audit state) It has support for cascaded condition expressions.

Then you can have TWO conditions:
Normal = Some Logic Expression …
NotNormal = not Normal

Then in the dependent PL? devices you can have:
Normal = NotNormalTrig; NormalTrig

NOTE: You can do this without 2.1 … but you have to code:
NotNormal = not (Some logic Expression …)

PL? devices can trigger other PL? devices. But they can NOT convey their values. The trigger constitutes a true value.

Sorry, poorly described by me.

My expectation is that the trigger reflect what the condition is (not conveying the value).

If I have a trigger (t1) created being triggered by PL* condition “c1” , if the c1 is true, the trigger should “fire” (be true), shouldn’t it?

At least, that’s what I (thought) was observing when everything was working, prior to yesterday’s PLTS experiments (which, for the record, had nothing to do with the PL devices that are now behaving in - to me - unexpected ways)

You are getting into an area where the difference between a trigger and a value are important.

The PL? Triggers are defined as “When PL?? has satisified XXX”
That implies when it became true … it says nothing about when it’s NOT true.

When a PL?? device is triggered … it evaluates the input triggers.
When that input trigger is from another PL?? it tries to see if XXX is currently satisfied.
It will be true if its the most recent condition that that input PL?? device is XXX.

But note: that even though XXX is the most recent satisfied condition … it does not mean that it’s currently true. Because PL?? only triggers conditions when they are true.

[quote=“RichardTSchaefer, post:5, topic:174404”]You are getting into an area where the difference between a trigger and a value are important.

The PL? Triggers are defined as “When PL?? has satisified XXX”
That implies when it became true … it says nothing about when it’s NOT true.

When a PL?? device is triggered … it evaluates the input triggers.
When that input trigger is from another PL?? it tries to see if XXX is currently satisfied.
It will be true if its the most recent condition that that input PL?? device is XXX.

But note: that even though XXX is the most recent satisfied condition … it does not mean that it’s currently true. Because PL?? only triggers conditions when they are true.[/quote]

So, just to clarify my understanding of what you wrote:

Up to and including in V2.0, if I base a trigger on a Condition being satisfied in another PLEG device, once that trigger fires, it stays true indefinitely (it never changes)?

It depends …

Lets define the input PL?? device as PL1, and it has multiple conditions, XXX, YYY, ZZZ
And the dependent PL?? device as PL2, and it has a trigger on PL1 XXX

PL2 will see PL1 XXX as true until PL1 triggers YYY or ZZZ.

If PL1 ONLY has a condition for XXX than your statement would be true.

[quote=“RichardTSchaefer, post:7, topic:174404”]It depends …

Lets define the input PL?? device as PL1, and it has multiple conditions, XXX, YYY, ZZZ
And the dependent PL?? device as PL2, and it has a trigger on PL1 XXX

PL2 will see PL1 XXX as true until PL1 triggers YYY or ZZZ.

If PL1 ONLY has a condition for XXX than your statement would be true.[/quote]

OIC. This is why it “worked” before. And it should have worked after… Even with two conditions that are each others inverse, it should work all the time unless I’ve misunderstood your explanation.

But for some reason it doesn’t. And I’m not seeing anything in the logs to indicate why…

I’ve now attempted to move the Action into the Logic_LightManagement device for the specific floor, and it’s still not triggering. So it seems like the issue is within the Logic_LightManagement_* device(s) themselves.

With no logfile output that indicates trouble (outright failure of the plugin) and “weird” behavior in general, I’m wondering if I’m down to having to reset my PL* plugins (do the full clean-up) and start from scratch…

May be easier and quicker than figuring this out. Living in the North East of the US with winter temps and the heating logic failing me isn’t winning me many brownie points with my wife!

Not that if you have the Negative Conditon as:

Condition = … some lengthy logic expression
NegativeCondition = not Condition

The NegativeCondition will NOT trigger …
If you read the documentation you will see that in order to trigger … the condition must be true, it ,must be previously false, AND a member of the condition must be the reason the expression is being evaluated.

In 2.1 still waiting for audit … I now also modify the last requirements to include an OR previous condition that meets these conditions
That’s what I refer to as cascading conditions.

If you PM the details for EACH PL?? device
Inputs, Conditions, Actions
And a log, demonstrating some un-explained behavior … I will be glad to look over the logs and let you know what’s happening