Intermatic intouch CA8900 - not switching off with Luup code

I have create the following luup code, the idea is to be able to turn the HVAC on or off. When I use the code it will change the status of the device on the MIOS GUI but not on the actual device, In my case the device # is 9. After a period the GUI switches back I assume during the polling cycle. Does anyone know how to push this all the way to the device

luup.variable_set(“urn:upnp-org:serviceId:HVAC_UserOperatingMode1”,“ModeStatus”,“Off”, 9)
luup.variable_set(“urn:upnp-org:serviceId:HVAC_UserOperatingMode1”,“ModeTarget”,“Off”, 9)

any advise appreciated

Setting those is literally just setting the underlying Variable, something more typically done in Plugin development than Scene authoring.

To make a device do something, you need to call the relevant method using [tt]luup.call_action[/tt].

This luup command is documented here:
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_call_action

You can see some other Thermostat actions being invoked be call_action here:
http://wiki.micasaverde.com/index.php/Luup_Scenes_Events#Change_the_Temperature_on_Thermostat_.28Cool.29_device_.2319

Given what you’re doing, something like the following should do it (untested):

luup.call_action("urn:upnp-org:serviceId:HVAC_UserOperatingMode1", "SetModeTarget", {NewModeTarget = "Off"}, 9)

Let me know if it works, and I’ll add it to the Example wiki page.

excellent, works like a charm can now switch “Off” and back to cool “CoolOn”

Great! I’ve added it to the Scenes section in the Wiki for future reference:

http://wiki.micasaverde.com/index.php/Luup_Scenes_Events#Thermostat_Actions