I am trying to get the luup code correct for setting the HVAC_FanOperationMode1 on a RT CT-100+ thermostat. The following code when tested successfully changes the HVAC_FanOperatingMode1 from “ContinuousOn” to “Auto”:
luup.call_action(“urn:upnp-org:serviceId:HVAC_FanOperatingMode1”,“SetMode”,{ newModeValue=“Auto” },272)
However, when I use the same code to try and change the mode from “Auto” to “ContinuousOn”, it processes successfully, but does not change the HVAC_FanOperatingMode1.
luup.call_action(“urn:upnp-org:serviceId:HVAC_FanOperatingMode1”,“SetMode”,{ newModeValue=“ContinuousOn” },272)
Any idea why it works one way but not another?
cw-kid
May 15, 2024, 11:09am
2
urn:upnp-org:serviceId:HVAC_FanOperatingMode1 – Mode
Auto, ContinuousOn, or PeriodicOn depending on the fan mode of the thermostat.
I tried this also and see the same thing, once the FanOperatingMode has been set to Auto you cannot then change the mode to either ContinuousOn or PeriodicOn via a luup.call_action command for some reason? Not sure why that is.
If I manually press the button in the UI to change it from Auto to say “Fan On” aka ContinuousOn. I can then send the luup.call_action command to set it to Auto OK.
I tried these commands:
luup.call_action("urn:upnp-org:serviceId:HVAC_FanOperatingMode1","SetMode",{ newModeValue="Auto" },597)
luup.call_action("urn:upnp-org:serviceId:HVAC_FanOperatingMode1","SetMode",{ newModeValue="ContinuousOn" },597)
luup.call_action("urn:upnp-org:serviceId:HVAC_FanOperatingMode1","SetMode",{ newModeValue="PeriodicOn" },597)
Maybe it was a bug? Have you searched the forum for “HVAC_FanOperatingMode1 SetMode” ?
cw-kid
May 15, 2024, 11:23am
3
I just watched the log whilst sending a “ContinousOn” command, every looks OK to me I can’t see an error yet the Mode does not change.
12 05/15/24 11:49:43.733 luvd_get_info_data_request starting /data_request?id=lu_action&output_format=json&DeviceNum=597&serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1&action=SetMode&NewMode=ContinuousOn&rand=0.3257086213222622 pMem 0x47fb000/75476992 diff: 58298368 <0x6c662520>
08 05/15/24 11:49:43.734 JobHandler_LuaUPnP::HandleActionRequest device: 597 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 action: SetMode <0x6c662520>
08 05/15/24 11:49:43.735 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=597 <0x6c662520>
08 05/15/24 11:49:43.735 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1 <0x6c662520>
08 05/15/24 11:49:43.735 JobHandler_LuaUPnP::HandleActionRequest argument action=SetMode <0x6c662520>
08 05/15/24 11:49:43.735 JobHandler_LuaUPnP::HandleActionRequest argument NewMode=ContinuousOn <0x6c662520>
08 05/15/24 11:49:43.735 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.3257086213222622 <0x6c662520>
12 05/15/24 11:49:44.131 luvd_get_info_data_request starting /data_request?id=status&Timeout=15&DataVersion=634224053&MinimumDelay=50&output_format=json&_r=1715770184131 pMem 0x47fb000/75476992 diff: 58298368 <0x6c662520>
12 05/15/24 11:49:44.197 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6c062520>
12 05/15/24 11:49:44.200 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6b811520>
12 05/15/24 11:49:44.206 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6b611520>
12 05/15/24 11:49:44.197 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6bc62520>
12 05/15/24 11:49:44.209 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6be62520>
12 05/15/24 11:49:44.217 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6ca62520>
12 05/15/24 11:49:44.242 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224053&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6c262520>
12 05/15/24 11:49:44.322 luvd_get_info_data_request starting /data_request?id=status&Timeout=15&DataVersion=634224055&MinimumDelay=50&output_format=json&_r=1715770184329 pMem 0x47fb000/75476992 diff: 58298368 <0x6c462520>
12 05/15/24 11:49:44.452 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224057&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6b0df520>
06 05/15/24 11:49:44.460 Device_Variable::m_szValue_set device: 597 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 variable: Mode was: EMPTY now: ContinuousOn #hooks: 0 upnp: 0 skip: 0 v:0x18e54d0/NONE duplicate:0 <0x76c9c520>
04 05/15/24 11:49:44.462 <Job ID="34450" Name="FAN_MODE node 111" Device="597" Created="2024-05-15 11:49:43" Started="2024-05-15 11:49:43" Completed="2024-05-15 11:49:44" Duration="0.725420000" Runtime="0.723537000" Status="Successful" LastNote="SUCCESS! Transmit was OK" Node="111" NodeType="ZWaveThermostat" NodeDescription="Underfloor Heating"/> <0x76c9c520>
12 05/15/24 11:49:44.491 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224057&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6ce82520>
12 05/15/24 11:49:44.529 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224057&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6c662520>
12 05/15/24 11:49:44.562 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224057&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6b811520>
12 05/15/24 11:49:44.618 luvd_get_info_data_request starting /data_request?id=status&Timeout=15&DataVersion=634224057&MinimumDelay=50&output_format=json&_r=1715770184624 pMem 0x47fb000/75476992 diff: 58298368 <0x6b611520>
12 05/15/24 11:49:44.694 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6c062520>
12 05/15/24 11:49:44.703 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6c262520>
12 05/15/24 11:49:44.708 luvd_get_info_data_request starting /data_request?id=lu_status2&output_format=json&Timeout=60&DataVersion=634224053 pMem 0x47fb000/75476992 diff: 58298368 <0x6c462520>
12 05/15/24 11:49:44.740 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6be62520>
12 05/15/24 11:49:44.797 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6b0df520>
12 05/15/24 11:49:44.798 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6c662520>
12 05/15/24 11:49:44.804 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6bc62520>
12 05/15/24 11:49:44.822 luvd_get_info_data_request starting /data_request?id=status&Timeout=15&DataVersion=634224060&MinimumDelay=50&output_format=json&_r=1715770184829 pMem 0x47fb000/75476992 diff: 58298368 <0x6ce82520>
12 05/15/24 11:49:44.842 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1713633164&DataVersion=634224060&Timeout=40&MinimumDelay=0 pMem 0x47fb000/75476992 diff: 58298368 <0x6ca62520>
12 05/15/24 11:49:45.128 luvd_get_info_data_request starting /data_request?id=lu_status&DataVersion=634224053&MinimumDelay=1000&Timeout=60&LoadTime=1713633164&rand=0.134468703214063 pMem 0x47fb000/75476992 diff: 58298368 <0x6b811520>
12 05/15/24 11:49:45.417 luvd_get_info_data_request starting /data_request?id=lu_status2&output_format=json&Timeout=60&DataVersion=634224060 pMem 0x47fb000/75476992 diff: 58298368 <0x6b611520>
12 05/15/24 11:49:47.347 luvd_get_info_data_request starting /data_request?id=lu_status&DataVersion=634224060&MinimumDelay=1000&Timeout=60&LoadTime=1713633164&rand=0.2898212405972682 pMem 0x47fb000/75476992 diff: 58298368 <0x6c462520>
12 05/15/24 11:49:55.318 luvd_get_info_data_request starting /data_request?id=lu_action&output_format=json&DeviceNum=597&serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1&action=SetMode&NewMode=ContinuousOn&rand=0.9848814128401571 pMem 0x47fb000/75476992 diff: 58298368 <0x6b811520>
08 05/15/24 11:49:55.320 JobHandler_LuaUPnP::HandleActionRequest device: 597 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 action: SetMode <0x6b811520>
08 05/15/24 11:49:55.320 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=597 <0x6b811520>
08 05/15/24 11:49:55.320 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1 <0x6b811520>
08 05/15/24 11:49:55.320 JobHandler_LuaUPnP::HandleActionRequest argument action=SetMode <0x6b811520>
08 05/15/24 11:49:55.320 JobHandler_LuaUPnP::HandleActionRequest argument NewMode=ContinuousOn <0x6b811520>
08 05/15/24 11:49:55.321 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.9848814128401571 <0x6b811520>
12 05/15/24 11:49:55.772 luvd_get_info_data_request starting /data_request?id=status&Timeout=15&DataVersion=634224061&MinimumDelay=50&output_format=json&_r=1715770195779 pMem 0x47fb000/75476992 diff: 58298368 <0x6b811520>
06 05/15/24 11:49:55.804 Device_Variable::m_szValue_set device: 597 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 variable: Mode was: ContinuousOn now: ContinuousOn #hooks: 0 upnp: 0 skip: 0 v:0x18e54d0/NONE duplicate:1 <0x76c9c520>
04 05/15/24 11:49:55.806 <Job ID="34451" Name="FAN_MODE node 111" Device="597" Created="2024-05-15 11:49:55" Started="2024-05-15 11:49:55" Completed="2024-05-15 11:49:55" Duration="0.483757000" Runtime="0.472184000" Status="Successful" LastNote="SUCCESS! Transmit was OK" Node="111" NodeType="ZWaveThermostat" NodeDescription="Underfloor Heating"/> <0x76c9c520>
cw-kid
May 15, 2024, 11:34am
4
Can you use a Scene instead? That seems to work. It did change the Thermostat Fan Mode from Auto to ContinuousOn when I ran the scene.
EDIT:
Here’s the log for when I RAN the Scene
08 05/15/24 12:50:04.477 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: RunScene <0x6ca03520>
08 05/15/24 12:50:04.477 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1 <0x6ca03520>
08 05/15/24 12:50:04.478 JobHandler_LuaUPnP::HandleActionRequest argument action=RunScene <0x6ca03520>
08 05/15/24 12:50:04.478 JobHandler_LuaUPnP::HandleActionRequest argument SceneNum=307 <0x6ca03520>
08 05/15/24 12:50:04.478 JobHandler_LuaUPnP::HandleActionRequest argument rand=0.6095897078313839 <0x6ca03520>
08 05/15/24 12:50:04.479 Scene::RunScene running 307 Test Thermostat FanOn <0x6ca03520>
08 05/15/24 12:50:04.479 JobHandler_LuaUPnP::HandleActionRequest device: 597 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 action: SetMode <0x6ca03520>
08 05/15/24 12:50:04.480 JobHandler_LuaUPnP::HandleActionRequest argument NewMode=ContinuousOn <0x6ca03520>
02 05/15/24 12:50:04.480 ZWave::HandleActionRequest is a scene with category 5 (HVAC), JobName 'FAN_MODE node 111' <> 'FAN_MODE' <0x6ca03520>
12 05/15/24 12:50:04.483 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779179&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6d203520>
12 05/15/24 12:50:04.484 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779184&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6ce03520>
06 05/15/24 12:50:04.510 Device_Variable::m_szValue_set device: 213 service: urn:rboer-com:serviceId:Harmony1 variable: IconSet was: 1 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x74ceb520>
12 05/15/24 12:50:04.511 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779184&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6cc03520>
06 05/15/24 12:50:04.543 Device_Variable::m_szValue_set device: 184 service: urn:rboer-com:serviceId:Harmony1 variable: LinkStatus was: Starting... now: Ok #hooks: 0 upnp: 0 skip: 0 v:0x1048a70/NONE duplicate:0 <0x74eeb520>
12 05/15/24 12:50:04.550 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779185&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6c603520>
12 05/15/24 12:50:04.570 luvd_get_info_data_request starting /data_request?id=lu_status&DataVersion=773779139&MinimumDelay=1000&Timeout=60&LoadTime=1715773779&rand=0.3297540571474342 pMem 0x2b86000/45637632 diff: 35713024 <0x6bffd520>
06 05/15/24 12:50:04.576 Device_Variable::m_szValue_set device: 213 service: urn:rboer-com:serviceId:Harmony1 variable: LinkStatus was: Starting... now: Ok #hooks: 0 upnp: 0 skip: 0 v:0x1048a70/NONE duplicate:0 <0x74ceb520>
12 05/15/24 12:50:04.579 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779185&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6c803520>
12 05/15/24 12:50:04.613 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779185&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6c2fe520>
12 05/15/24 12:50:04.650 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779187&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6ca03520>
12 05/15/24 12:50:04.680 luvd_get_info_data_request starting /data_request?id=status2&LoadTime=1715773779&DataVersion=773779191&Timeout=40&MinimumDelay=0 pMem 0x2b86000/45637632 diff: 35713024 <0x6bdfd520>
06 05/15/24 12:50:04.780 Device_Variable::m_szValue_set device: 597 service: urn:upnp-org:serviceId:HVAC_FanOperatingMode1 variable: Mode was: Auto now: ContinuousOn #hooks: 0 upnp: 0 skip: 0 v:0x11fbd68/NONE duplicate:0 <0x76f3c520>
04 05/15/24 12:50:04.787 <Job ID="2" Name="FAN_MODE node 111" Device="597" Created="2024-05-15 12:50:04" Started="2024-05-15 12:50:04" Completed="2024-05-15 12:50:04" Duration="0.301715000" Runtime="0.270517000" Status="Successful" LastNote="SUCCESS! Transmit was OK" Node="111" NodeType="ZWaveThermostat" NodeDescription="Underfloor Heating"/> <0x76f3c520>
cw-kid
May 15, 2024, 11:47am
5
It’s strange! Out of curiosity I just tried running some HTTP commands instead.
Auto command works:
http://VERA-IP:3480/data_request?id=lu_action&output_format=json&DeviceNum=597&serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1&action=SetMode&newModeValue=Auto
ContinuousOn command didn’t work:
http://VERA-IP:3480/data_request?id=lu_action&output_format=json&DeviceNum=597&serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1&action=SetMode&newModeValue=ContinuousOn
PeriodicOn command didn’t work:
http://VERA-IP:3480/data_request?id=lu_action&output_format=json&DeviceNum=597&serviceId=urn:upnp-org:serviceId:HVAC_FanOperatingMode1&action=SetMode&newModeValue=PeriodicOn
cw-kid
May 15, 2024, 12:09pm
6
Only other possible thing that might work is by sending a Raw Z-Wave command to the thermostat to control its Fan Mode. However I am not exactly sure how to do that?
Here is a more simple example of sending a raw data command to turn ON a device using Basic_Set
Hi @tinman ,
If this is on Vera, yes, you should be able to send raw Zwave data with the specific command class and command with a simple luup call
luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='56', Data='112 4 3 1 2'}, 1)
The structure of the Data key calls for the command class either in hex or dec format and the data holders that the command class supports. For instance, turning on device 50 with command class 0x20 BASIC_SET, would look like
luup.call_act…
And this is the Z-Wave command class info for Thermostat’s and Fan Mode.
You need to use the Node ID for these types of commands not the Device ID.
Node ID is the altid found in the devices advanced area of the UI.
Got it to work with the following code:
devNumber = 287 – device number of your thermostat
– Set the fan to ContinuousOn
luup.call_action( “urn:upnp-org:serviceId:HVAC_FanOperatingMode1”, “SetMode”, { NewMode=“ContinuousOn” }, devNumber )
devNumber = 287 – device number of your thermostat
– Set the fan to Auto
luup.call_action( “urn:upnp-org:serviceId:HVAC_FanOperatingMode1”, “SetMode”, { NewMode=“Auto” }, devNumber )
1 Like
Seems strange though? That declaring “devNumber” as a variable and then using that in the command instead should make it work.
When the commands we tried earlier did not work.
Ill try your code example later and see.
Your right it works!
devNumber = 597
luup.call_action( "urn:upnp-org:serviceId:HVAC_FanOperatingMode1", "SetMode", { NewMode="ContinuousOn" }, devNumber )
I also just got it working with a single line command like this:
luup.call_action("urn:upnp-org:serviceId:HVAC_FanOperatingMode1","SetMode",{ NewMode="ContinuousOn" },597)
Looks like the problem with the commands we tried earlier was “newModeValue” vs “NewMode”.
“NewMode” seems to be the one that works for setting it to “ContinuousOn”
This also works for setting it back to Auto
luup.call_action("urn:upnp-org:serviceId:HVAC_FanOperatingMode1","SetMode",{ NewMode="Auto" },597)