[quote=“delle, post:3, topic:189573”]Thanks amg0
I have a scene to switch on and another one to switch off a device. What’s wrong with a trigger watching the variable “Status”. Why is always the same scene(9) triggered whatever the value of the status is. Scene 10 is always evaluated as second option
switch on
2015-11-09 20:11:48.306 luup_log:3: ALTUI: debug: variableWatchCallback(10130,urn:upnp-org:serviceId:SwitchPower1,Status,old:‘0’,new:‘1’)
2015-11-09 20:11:48.307 luup_log:3: ALTUI: debug: findWatch(10130,urn:upnp-org:serviceId:SwitchPower1,Status)
2015-11-09 20:11:48.310 luup_log:3: ALTUI: debug: registeredWatches: {“10130”:{“urn:upnp-org:serviceId:SwitchPower1”:{“Status”:{“LastUpdate”:1447095810,“LastOld”:“1”,“Expressions”:{“1”:{“SceneID”:9,“LastEval”:1},“0”:{“SceneID”:10,“LastEval”:0}},“LastNew”:“0”}}},“10111”:{“urn:micasaverde-com:serviceId:SecuritySensor1”:{“Tripped”:{“Expressions”:{“1”:{“SceneID”:6},“new == "1"”:{“SceneID”:5}}}}},“7”:{“urn:upnp-org:serviceId:VContainer1”:{“Variable2”:{“Expressions”:{“‘True’”:{“SceneID”:4}}}}},“10088”:{“urn:micasaverde-com:serviceId:SecuritySensor1”:{“Tripped”:{“Expressions”:{“1”:{“SceneID”:8}}}}}}
2015-11-09 20:11:48.311 luup_log:3: ALTUI: debug: registeredWatches found a match
2015-11-09 20:11:48.311 luup_log:3: ALTUI: debug: evaluateExpression(10130,urn:upnp-org:serviceId:SwitchPower1,Status,1,0,1,1447096308,9)
2015-11-09 20:11:48.311 luup_log:3: ALTUI: debug: _evaluateUserExpression(0,1,1447096308,1)
2015-11-09 20:11:48.312 luup_log:3: ALTUI: debug: Evaluation of user watch expression returned: [1]
2015-11-09 20:11:48.313 luup_log:3: ALTUI: debug: run_scene(9)
2015-11-09 20:11:48.313 luup.call_action:3: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.RunScene
2015-11-09 20:11:48.314 luup.scenes:0: running scene 9, SB PLAYING, initiated by command
2015-11-09 20:11:48.315 luup_log:3: ALTUI: debug: evaluateExpression() returns 1
2015-11-09 20:11:48.315 luup_log:3: ALTUI: debug: evaluateExpression(10130,urn:upnp-org:serviceId:SwitchPower1,Status,0,0,1,1447096308,10)
2015-11-09 20:11:48.316 luup_log:3: ALTUI: debug: _evaluateUserExpression(0,1,1447096308,0)
2015-11-09 20:11:48.317 luup_log:3: ALTUI: debug: Evaluation of user watch expression returned: [0]
2015-11-09 20:11:48.318 luup_log:3: ALTUI: debug: ignoring watch trigger, loadstring returned 0
switch off
2015-11-09 20:13:11.243 luup_log:3: ALTUI: debug: variableWatchCallback(10130,urn:upnp-org:serviceId:SwitchPower1,Status,old:‘1’,new:‘0’)
2015-11-09 20:13:11.244 luup_log:3: ALTUI: debug: findWatch(10130,urn:upnp-org:serviceId:SwitchPower1,Status)
2015-11-09 20:13:11.248 luup_log:3: ALTUI: debug: registeredWatches: {“10130”:{“urn:upnp-org:serviceId:SwitchPower1”:{“Status”:{“LastUpdate”:1447096308,“LastOld”:“0”,“Expressions”:{“1”:{“SceneID”:9,“LastEval”:1},“0”:{“LastEval”:0,“SceneID”:10}},“LastNew”:“1”}}},“10111”:{“urn:micasaverde-com:serviceId:SecuritySensor1”:{“Tripped”:{“Expressions”:{“1”:{“SceneID”:6},“new == "1"”:{“SceneID”:5}}}}},“7”:{“urn:upnp-org:serviceId:VContainer1”:{“Variable2”:{“Expressions”:{“‘True’”:{“SceneID”:4}}}}},“10088”:{“urn:micasaverde-com:serviceId:SecuritySensor1”:{“Tripped”:{“Expressions”:{“1”:{“SceneID”:8}}}}}}
2015-11-09 20:13:11.249 luup_log:3: ALTUI: debug: registeredWatches found a match
2015-11-09 20:13:11.249 luup_log:3: ALTUI: debug: evaluateExpression(10130,urn:upnp-org:serviceId:SwitchPower1,Status,1,1,0,1447096391,9)
2015-11-09 20:13:11.250 luup_log:3: ALTUI: debug: _evaluateUserExpression(1,0,1447096391,1)
2015-11-09 20:13:11.251 luup_log:3: ALTUI: debug: Evaluation of user watch expression returned: [1]
2015-11-09 20:13:11.251 luup_log:3: ALTUI: debug: run_scene(9)
2015-11-09 20:13:11.252 luup.call_action:3: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.RunScene
2015-11-09 20:13:11.252 luup.scenes:0: running scene 9, SB PLAYING, initiated by command
2015-11-09 20:13:11.253 luup_log:3: ALTUI: debug: evaluateExpression() returns 1
2015-11-09 20:13:11.254 luup_log:3: ALTUI: debug: evaluateExpression(10130,urn:upnp-org:serviceId:SwitchPower1,Status,0,1,0,1447096391,10)
2015-11-09 20:13:11.254 luup_log:3: ALTUI: debug: _evaluateUserExpression(1,0,1447096391,0)
2015-11-09 20:13:11.255 luup_log:3: ALTUI: debug: Evaluation of user watch expression returned: [0]
2015-11-09 20:13:11.256 luup_log:3: ALTUI: debug: ignoring watch trigger, loadstring returned 0[/quote]
thx for the debug trace, very useful.
see the registeredWatch json object (attached ). the json data structure is a hash of hash of hash etc and is organized this way
devid, service, variable , “expressions container”, expression ( each and individual ) , index , scene to run and last evel
you seem to have expressions like this:
- expression “True”, “1” or 1 will allways evaluate to true and therefore allways execute the scene
- expression 0 will allways evaluate to false and therefore never execute the scene
Now the questions are:
a) what is the content of the VariableToSend and VariableToWatch ALTUI variable
b) what is ALTUI version
c) can you confirm in your scene screens what expressions you wanted ?