Ct100 rule not changing setpoint. Change from sitemap works

Trying to control changing the operating mode and setting the setpoint on a CT100 thermostat.
Controlling from a sitemap works as expected.
Controlling from a rule does not. Operating mode changes as expected. Heating setpoint does not.

Can folks take a look and tell me what I’m missing/forgetting/neglecting?

Thanks

First things first:

ct100.items:

/* Thermostat CT100*/
Group  gHVAC
Number:Temperature HVAC_HeatSetPoint "Set House Heating [%.0f %unit%]" (gHVAC) {channel="zwave:device:8601bb4d:node14:thermostat_setpoint_heating", autoupdate="false"  }
Number:Temperature HVAC_Cooling_SetPoint "Set House Cooling [%.0f %unit%]" (gHVAC) {channel="zwave:device:8601bb4d:node14:thermostat_setpoint_cooling", autoupdate="false" }
Number:Temperature Temperature_HVAC "Temperature [%.1f %unit%]" <temperature> (gHVAC,Temp_Chart) {channel="zwave:device:8601bb4d:node14:sensor_temperature"}
Number Humidity_HVAC "Humidity [%.1f %%]" <humidity> (gHVAC,Hum_Chart) {channel="zwave:device:8601bb4d:node14:sensor_relhumidity2"}
Group gHVACStatus
Number HVAC_Operating_Mode "Tstat Mode [MAP(thermostatOpMode.map):%s]" <flow> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_mode"[profile="transform:MAP", function="thermostatOpMode.map", sourceFormat="%s"]}
Number HVAC_Operating_State "Op State [MAP(thermostatOpState.map):%s]" <flow> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_state"[profile="transform:MAP", function="thermostatOpState.map", sourceFormat="%s"]}
Number HVAC_Fan_Mode "Fan Mode [MAP(thermostatFanMode.map):%s]" <fan> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_fanmode"[profile="transform:MAP", function="thermostatFanMode.map", sourceFormat="%s"] }
Number HVAC_Fan_State "Fan State [MAP(thermostatFanState.map):%s]" <fan> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_fanstate"[profile="transform:MAP", function="thermostatFanState.map", sourceFormat="%s"]}
Number HVAC_Battery "Battery State [%d %%]" <battery> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:battery-level"}

Controlling the ct100 from a sitemap works:

mobile.sitemap:

sitemap mobile label="23 Mobile Display"
{
    Text item=Door_Garage label="Garage Door" labelcolor=[Door_Garage=="OPEN"="red",Door_Garage=="CLOSED"="green"] 
    Text item=Presence_Sue_Phone label="Sue's Mobile"
    Text item=Door_Garage label="Garage Door" labelcolor=["red"] icon="error" visibility=[Door_Garage=="OPEN"]

    Text item=Temperature_HVAC label="Room Temp"
    Text item=HVAC_Operating_State label="Operating State"
    Selection item=HVAC_Operating_Mode label="Tstat Mode" mappings=[0="OFF", 1="HEAT"]
    Setpoint item=HVAC_HeatSetPoint label="Furnace Setpoint" minValue=55 maxValue=80 step=1
}

I can change the operating mode from ‘Heat’ (1) to ‘Off’ (0) and back, and see the mode on the thermostat’s display touch panel change.
I can change the heating setpoint, and watch it change on the thermostat’s display touch panel.

~ $ tail -f /var/log/openhab2/events.log -f /var/log/openhab2/openhab.log | grep -i HVAC

2019-10-22 13:06:52.965 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 0
2019-10-22 13:06:52.976 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 0
2019-10-22 13:06:52.985 [vent.ItemStateChangedEvent] - HVAC_Operating_Mode changed from 1 to 0
2019-10-22 13:06:55.589 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 93 to 100
2019-10-22 13:07:03.598 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 67 ?F
2019-10-22 13:07:08.802 [vent.ItemStateChangedEvent] - HVAC_HeatSetPoint changed from 7E+1 ?F to 67 ?F
2019-10-22 13:07:09.453 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 100 to 95
2019-10-22 13:07:10.790 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-22 13:07:10.797 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-22 13:07:10.809 [vent.ItemStateChangedEvent] - HVAC_Operating_Mode changed from 0 to 1
2019-10-22 13:07:17.105 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 95 to 96
2019-10-22 13:07:34.364 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 69 ?F
2019-10-22 13:07:36.164 [vent.ItemStateChangedEvent] - HVAC_HeatSetPoint changed from 67 ?F to 69 ?F
2019-10-22 13:07:36.935 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 96 to 100

However, if I use a rule to try and change the ct100:

rule "pre-wakeup-set-thermostat"

when 
//   Time cron "0 00 06 ? * MON,WED *"
   Time cron "00 */5 * ? * * *"
then 
   HVAC_Operating_Mode.sendCommand(1)
   logInfo("Status", "Enable Heating")

   HVAC_HeatSetPoint.sendCommand(74)
   logInfo("Status", "Set Furnace Setpoint to 74F")
end

I can watch the operating mode change as expected on the ct100’s display touch panel:

~ $ tail -f /var/log/openhab2/events.log -f /var/log/openhab2/openhab.log | grep -i HVAC

<snip>
      I changed the Operating Mode to 'OFF' from mobile.sitemap to prepare for the test:

2019-10-22 13:17:13.716 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 0
2019-10-22 13:17:13.724 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 0
2019-10-22 13:17:13.739 [vent.ItemStateChangedEvent] - HVAC_Operating_Mode changed from 1 to 0

      The rule changes the mode, and I see the ct100 go into heating mode at the ct100's display touch panel

2019-10-22 13:20:00.042 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-22 13:20:00.056 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-22 13:20:00.082 [vent.ItemStateChangedEvent] - HVAC_Operating_Mode changed from 0 to 1

      But the rule doesn't change the setpoint.  It doesn't change on the ct100 display, nor is there an 'HVAC_HeatSetPoint changed' 
      line in the log.

2019-10-22 13:20:00.101 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 74

      and again:

2019-10-22 13:25:00.090 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-22 13:25:00.100 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-22 13:25:00.149 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 74
2019-10-22 13:25:02.787 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 100 to 95


Here are the primary sources and examples I followed to try this out:

  • BK Hobby’s youtube on rules. At 9:59 is the exact format I used. I believe (tho I’m not sure) that he’s using a CT100 also.

  • the heating boilerplate

ct100 or ct100 plus? we have 2 different database entries.

It’s a CT100.

PaperUI entry:

Z-Wave Node 014: CT100 Z-Wave Thermostat

CT100 Z-Wave Thermostat

Z-Wave Thermostat

modelId CT100

This Item has UoM, units of measurement

This command, from the sitemap, takes the pre-existing state’s UoM into account and so includes a UoM (?F representing °F in your log character set)

This command from your rule does not include any UoM.
Consequently, it doesn’t work.
I expect the openHAB framework, or maybe the binding rejects it - you may see that in openhab.log

I put in the degree-F measure. Of course, had to make it a string.

No change. Setpoint still not changed.

There was no rejection in the openhab.log, but I don’t have debug set up either.

The HVAC_HeatSetPoint is cast as a Number, but the sendCommand is sending it a string. Is this a problem?

rule "pre-wakeup-set-thermostat"

when 
//   Time cron "0 00 06 ? * MON,WED *"
   Time cron "00 */5 * ? * * *"
then 
   HVAC_Operating_Mode.sendCommand(1)
   logInfo("Status", "Enable Heating")

   HVAC_HeatSetPoint.sendCommand("74°F")
   logInfo("Status", "Set Furnace Setpoint to 74F")
end
2019-10-22 18:10:00.046 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-22 18:10:00.059 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-22 18:10:00.105 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 74 ?F
2019-10-22 18:10:02.183 [vent.ItemStateChangedEvent] - Temperature_HVAC changed from 71.5 ?F to 71 ?F
2019-10-22 18:10:03.217 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 93 to 95

tail -f openhab.log and event.log (ungrepped):

2019-10-22 18:09:23.758 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node13_meter_voltage changed from 122.95 to 123.33
2019-10-22 18:10:00.046 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1

==> /var/log/openhab2/openhab.log <==
2019-10-22 18:10:00.050 [INFO ] [clipse.smarthome.model.script.Status] - Enable Heating

==> /var/log/openhab2/events.log <==
2019-10-22 18:10:00.059 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1

==> /var/log/openhab2/openhab.log <==
2019-10-22 18:10:00.073 [INFO ] [clipse.smarthome.model.script.Status] - Set Furnace Setpoint to 74F

==> /var/log/openhab2/events.log <==
2019-10-22 18:10:00.105 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 74 ?F
2019-10-22 18:10:02.183 [vent.ItemStateChangedEvent] - Temperature_HVAC changed from 71.5 ?F to 71 ?F
2019-10-22 18:10:02.190 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node14_sensor_temperature changed from 71.5 ?F to 71 ?F
2019-10-22 18:10:03.213 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node14_battery_level changed from 93 to 95
2019-10-22 18:10:03.217 [vent.ItemStateChangedEvent] - HVAC_Battery changed from 93 to 95
2019-10-22 18:10:03.538 [vent.ItemStateChangedEvent] - LastSeen_Sue_Phone changed from 2019-10-22T18:09:02.109-0800 to 2019-10-22T18:10:03.518-0800
2019-10-22 18:10:37.088 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node12_meter_voltage changed from 126.49 to 127.19
2019-10-22 18:10:37.092 [vent.ItemStateChangedEvent] - Meter_Volts12 changed from 126.49 to 127.19
2019-10-22 18:10:38.702 [vent.ItemStateChangedEvent] - Temperature_HVAC changed from 71 ?F to 70.5 ?F
2019-10-22 18:10:38.713 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node14_sensor_temperature changed from 71 ?F to 70.5 ?F
2019-10-22 18:10:40.640 [vent.ItemStateChangedEvent] - Meter_KWH11 changed from 247.58 to 247.59
2019-10-22 18:10:40.643 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node11_meter_kwh changed from 247.58 to 247.59
2019-10-22 18:10:41.764 [vent.ItemStateChangedEvent] - Meter_Watts11 changed from 50.38 to 50.46
2019-10-22 18:10:41.768 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node11_meter_watts changed from 50.38 to 50.46
2019-10-22 18:10:42.637 [vent.ItemStateChangedEvent] - Meter_Volts11 changed from 122.78 to 123.58
2019-10-22 18:10:42.639 [vent.ItemStateChangedEvent] - zwave_device_8601bb4d_node11_meter_voltage changed from 122.78 to 123.58
2019-10-22 18:11:03.569 [vent.ItemStateChangedEvent] - Latency_Sue_Phone changed from 10.0 to 17.0

Not the way to do it. Need a bit of magic to designate a QuantityType
I think this should do it -
HVAC_HeatSetPoint.sendCommand(74|°F)

The pipe | character is useful in rules with UoM for ad-hoc units.

EDIT -

The .sendCommand method tries to parse whatever it is given into something suitable for the target Item. It’s not foolproof; string “22.35” will work for a Number, “X22.35” won’t. It often needs help.

The target here is not a Number, it is a Number:Temperature, so it wants a QuantityType not just a numeric. I think .sendCommand("74|°F") should work as well/instead.

1 Like

I tried variations on what rossko57 was suggesting. Findings below.

ct100.items

/* Thermostat CT100*/
Group  gHVAC
Number:Temperature HVAC_HeatSetPoint "Set House Heating [%d %unit%]" (gHVAC) {channel="zwave:device:8601bb4d:node14:thermostat_setpoint_heating", autoupdate="false"  }
Number:Temperature HVAC_Cooling_SetPoint "Set House Cooling [%.0f %unit%]" (gHVAC) {channel="zwave:device:8601bb4d:node14:thermostat_setpoint_cooling", autoupdate="false" }
Number:Temperature Temperature_HVAC "Temperature [%.1f %unit%]" <temperature> (gHVAC,Temp_Chart) {channel="zwave:device:8601bb4d:node14:sensor_temperature"}
Number Humidity_HVAC "Humidity [%.1f %%]" <humidity> (gHVAC,Hum_Chart) {channel="zwave:device:8601bb4d:node14:sensor_relhumidity2"}
Group gHVACStatus
Number HVAC_Operating_Mode "Tstat Mode [MAP(thermostatOpMode.map):%s]" <flow> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_mode"[profile="transform:MAP", function="thermostatOpMode.map", sourceFormat="%s"]}
Number HVAC_Operating_State "Op State [MAP(thermostatOpState.map):%s]" <flow> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_state"[profile="transform:MAP", function="thermostatOpState.map", sourceFormat="%s"]}
Number HVAC_Fan_Mode "Fan Mode [MAP(thermostatFanMode.map):%s]" <fan> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_fanmode"[profile="transform:MAP", function="thermostatFanMode.map", sourceFormat="%s"] }
Number HVAC_Fan_State "Fan State [MAP(thermostatFanState.map):%s]" <fan> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:thermostat_fanstate"[profile="transform:MAP", function="thermostatFanState.map", sourceFormat="%s"]}
Number HVAC_Battery "Battery State [%d %%]" <battery> (gHVACStatus) {channel="zwave:device:8601bb4d:node14:battery-level"}
rule "pre-wakeup-set-thermostat"

when 
//   Time cron "0 00 06 ? * MON,WED *"
   Time cron "00 */5 * ? * * *"
then 
   HVAC_Operating_Mode.sendCommand(1)
   logInfo("Status", "Enable Heating")

//   HVAC_HeatSetPoint.sendCommand(74)
   HVAC_HeatSetPoint.sendCommand(74|°F)
   logInfo("Status", "Set Furnace Setpoint to 74F")
end

this:

   HVAC_HeatSetPoint.sendCommand(74|°F)

gives this log:

2019-10-24 12:50:00.042 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-24 12:50:00.057 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-24 12:50:00.071 [ome.event.ItemCommandEvent] - Item 'HVAC_HeatSetPoint' received command 74 °F

No entry about the setpoint being changed, and it doesn’t change on the thermostat’s display.

changing to this (double quotes):

  HVAC_HeatSetPoint.sendCommand("74|°F")

gives this log:

2019-10-24 13:00:00.241 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-24 13:00:00.250 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-24 13:00:00.255 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert '74|°F' to a command type which item 'HVAC_HeatSetPoint' accepts: [DecimalType, QuantityType, RefreshType].

Which is different! There’s a warning there with some information that actually looks usable. No mention that strings are valid inputs here. Also, the setpoint on the thermostat display is unchanged (so that’s ‘no change’)

Continuing, just for completeness, use single quotes:

   HVAC_HeatSetPoint.sendCommand('74|°F')

gives this log. Same warning. Also, the setpoint on the thermostat display is unchanged (so that’s ‘no change’)

2019-10-24 13:05:00.181 [ome.event.ItemCommandEvent] - Item 'HVAC_Operating_Mode' received command 1
2019-10-24 13:05:00.187 [nt.ItemStatePredictedEvent] - HVAC_Operating_Mode predicted to become 1
2019-10-24 13:05:00.198 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert '74|°F' to a command type which item 'HVAC_HeatSetPoint' accepts: [DecimalType, QuantityType, RefreshType].

So I put it back to the (I assume) ‘Quantity Type’ format

   HVAC_HeatSetPoint.sendCommand(74|°F)

So, not wanting to dive into zwave debug (apologies, I don’t really have it in me anymore to learn Yet Another Controls Protocol) last night I decided to simply do a fresh install on another SDcard and start all over again from base. Where I crashed and burned into the Zulu Java not installing wall (referred to here, and probably other places as well)

At this time it’s time to set this aside and move on to other things. I appreciate the active assistance and help and wish this project the best going forward.