Do they perform the same task or is there a difference?
Example:
luup.variable_set (“urn:upnp-org:serviceId:SwitchPower1”,“Heater”, “1”, 91)
Vs.
luup.call_action (“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” },91)
JOD.
Do they perform the same task or is there a difference?
Example:
luup.variable_set (“urn:upnp-org:serviceId:SwitchPower1”,“Heater”, “1”, 91)
Vs.
luup.call_action (“urn:upnp-org:serviceId:SwitchPower1”,“SetTarget”,{ newTargetValue=“1” },91)
JOD.
IIUC, you’re asking about the difference between
[tt]luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, { newTargetValue=“1” }, 16879 )[/tt]
and
[tt]luup.variable_set(“urn:upnp-org:serviceId:SwitchPower1”, “Target”, “1”, 16879 )[/tt].
The first line does change the state of the physical device #16879, the second line changes the UPnP variable ‘Target’ without modifying the state of the physical device.
Thanks @Ap15e, you understood correctly.
I was stuck in my thinking that luup.variable_get obtained the state, therefore luup.variable_set would change the state. But could not understand why call_action worked for me and variable_set didn’t.
Makes sense now.
JOD.
Best Home Automation shopping experience. Shop at Ezlo!
© 2022 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules