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