Concatenate nil error in PLEG 5.1/PLC 5.13

Getting the following error in my LuaUPnP.log when a condition triggers.

01	10/14/13 5:16:17.726	LuaInterface::CallFunction_Variable func: TriggerPropertyUpdate Device_Variable 216 urn:rts-services-com:serviceId:ProgramLogicEG:ConditionSatisfied failed [string "module("L_ProgramLogicCEE", package.seeall)..."]:589: attempt to concatenate local 'opv' (a nil value) <0x2b571680>

I am surprised to see this … but I can fix it.
This is related to a poorly constructed trigger.

Can you post the value of your Triggers parameter from the Advanced tab.

This is related to a poorly constructed trigger.

Not surprising… :slight_smile:

Here it is.

[{'device':'214','name':'isSummer','template':'1','service':'urn:upnp-org:serviceId:VSwitch1','args':[{'name':'Status','op':'=','value':'1'}]},{'device':'214','name':'isWinter','template':'1','service':'urn:upnp-org:serviceId:VSwitch1','args':[{'name':'Status','op':'=','value':'0'}]},{'device':'209','name':'haveGuests','template':'1','service':'urn:upnp-org:serviceId:VSwitch1','args':[{'name':'Status','op':'=','value':'1'}]},{'device':'217','name':'LightsOffInBasement','template':'1','service':'urn:rts-services-com:serviceId:ProgramLogicEG','args':[{'name':'ConditionSatisfied','op':'=','value':'AllLightsOff_Basement'}]},{'device':'217','name':'LightOnInBasement','template':'1','service':'urn:rts-services-com:serviceId:ProgramLogicEG','args':[{'name':'ConditionSatisfied','op':'=','value':'LightOn_Basement'}]},{'device':'223','name':'ThomasIsHome','template':'1','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'Present','op':'=','value':'1'}]},{'device':'224','name':'ChristineIsHome','template':'1','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'Present','op':'=','value':'1'}]},{'device':'223','name':'ThomasIsNOTHome','template':'1','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'Present','op':'=','value':'0'}]},{'device':'224','name':'ChristineIsNOTHome','template':'1','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'Present','op':'=','value':'0'}]},{'device':'148','name':'Open_DoorToGarage','template':'1','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'}]},{'device':'75','name':'GarageMotion','template':'1','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'}]},{'device':'93','name':'Open_FrontDoor','template':'1','service':'urn:micasaverde-com:serviceId:DoorLock1','args':[{'name':'Status','op':'=','value':'0'}]},{'device':'19','name':'SensorArmed_DenMotion','template':'2','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'},{'name':'Armed','op':'=','value':'1'}]},{'device':'19','name':'Sensor_DenMotion','template':'1','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'}]},{'device':'131','name':'OnVacation','template':'1','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'}]},{'device':'176','name':'isDay','template':'1','service':'urn:rts-services-com:serviceId:DayTime','args':[{'name':'Status','op':'=','value':'1'}]},{'device':'176','name':'isNight','template':'1','service':'urn:rts-services-com:serviceId:DayTime','args':[{'name':'Status','op':'=','value':'0'}]},{'device':'139','name':'Motion_FrontDoor','template':'1','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'}]},{'device':'155','name':'Motion_FrontOfGarage','template':'1','service':'urn:micasaverde-com:serviceId:SecuritySensor1','args':[{'name':'Tripped','op':'=','value':'1'}]},{'device':'217','name':'firstFloor_LightsOff','template':'1','service':'urn:rts-services-com:serviceId:ProgramLogicEG','args':[{'name':'ConditionSatisfied','op':'=','value':'AllLightsOff_1st'}]},{'device':'217','name':'firstFloor_LightOn','template':'1','service':'urn:rts-services-com:serviceId:ProgramLogicEG','args':[{'name':'ConditionSatisfied','op':'=','value':'LightOn_1st'}]},{'device':'217','name':'second_LightOn','template':'1','service':'urn:rts-services-com:serviceId:ProgramLogicEG','args':[{'name':'ConditionSatisfied','op':'=','value':'LightOn_2nd'}]},{'device':'217','name':'second_LightsOff','template':'1','service':'urn:rts-services-com:serviceId:ProgramLogicEG','args':[{'name':'ConditionSatisfied','op':'=','value':'AllLightsOff_2nd'}]},{'device':'209','name':'NoGuestsPresent','template':'1','service':'urn:upnp-org:serviceId:VSwitch1','args':[{'name':'Status','op':'=','value':'0'}]},{'device':'223','name':'ThomasIsMoreThan_6','template':'3','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'CurrentDistance','op':'>','value':'6'}]},{'device':'223','name':'ThomasIsLessThan_3','template':'2','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'CurrentDistance','op':'<','value':'3'}]},{'device':'224','name':'ChristineIsMoreThan_6','template':'3','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'CurrentDistance','op':'>','value':'6'}]},{'device':'224','name':'ChristineIsLessThan_3','template':'2','service':'urn:upnp-org:serviceId:IPhoneLocator1','args':[{'name':'CurrentDistance','op':'<','value':'3'}]}]

The list looks good … So not a a bad trigger specification … maybe a trigger on a deleted device ?

I have a new file for you to test with … It will help identify the problem.

Lines of interest in the log file look like:
PLTS:133:TPU:Status :1=1

Can start with PLEG or PLTS, in this case 133 is the device ID of PLEG or PLTS
Looking for something with XXX=nil on the end (Bad trigger)
or
nil=XXX on the end (Deleted Device)
where XXX is valid string or number.

Hmm… Not had it again after upgrading to 5.2.

Was getting a warning (error?) about mismatched versions between PLC and PLEG, but that too appears to have disappeared. It’s possible the Vera unit restarted on me, but I don’t know for sure since my log turned over.

I’ll monitor for the diag message pattern.