-
Platform information:
- Hardware: Docker
- OS: Docker
- Java Runtime Environment: Not sure, hoping it’s not needed
- openHAB version: 4.1.1
- mosquito version 2.0.18
- zwavejs2mqtt version 9.6.0
-
Device info
- Thermostat model: GoControl GC-TBZ48
I decided to redo my openHab install. I had one before mostly working that used Z-wave to control lots of things, but as MQTT becomes more ubiquitous in the smart home ecosystem, I wanted to use MQTT as my primary bus to control all things via mosquito and zwavejs2mqtt. (I know that’s more of a Home Assistant thing, and it did work out of the box in HA, but I frankly like OH far more for various reasons.)
It’s taken months, but I think I’m 99% done. Most everything works: lights can be turned on and off, I’ve gotten my garage door communicating through MQTT (ditching the MyQ setup and moving to a ratgdo was actually the the impetuous for this change), and I can access my thermostats. Well, kinda.
Reading the various values and such works fine. I can see the temp, etc. I can even control Off / Heat / Cool modes from OH. But for some reason whenever I try to adjust the setpoint it fails to work. Nothing is sent to MQTT, and I get a fun error in OH:
0014:54:44.032 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KitchenThermostat_Climate_Control_4x_Sensor_Zwavejs2mqtt_5F0xd8b47b39_5FNode5_5Fclimate_Temperature' received command 52
0014:54:44.033 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KitchenThermostat_Climate_Control_4x_Sensor_Zwavejs2mqtt_5F0xd8b47b39_5FNode5_5Fclimate_Temperature' predicted to become 52
0014:54:44.036 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenThermostat_Climate_Control_4x_Sensor_Zwavejs2mqtt_5F0xd8b47b39_5FNode5_5Fclimate_Temperature' changed from 51 °F to 52 °F
0014:54:44.060 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler@4352f228': 52 is out of range
00java.lang.IllegalArgumentException: 52 is out of range
00at org.openhab.binding.mqtt.generic.values.NumberValue.parseCommand(NumberValue.java:110) ~[?:?]
00at org.openhab.binding.mqtt.generic.ChannelState.publishValue(ChannelState.java:369) ~[?:?]
00at org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantChannelState.publishValue(HomeAssistantChannelState.java:72) ~[?:?]
00at org.openhab.binding.mqtt.generic.AbstractMQTTThingHandler.handleCommand(AbstractMQTTThingHandler.java:153) ~[?:?]
00at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
00at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
00at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
00at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
00at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) [bundleFile:?]
00at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
00at jdk.proxy90.$Proxy208.handleCommand(Unknown Source) [?:?]
00at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:95) [bundleFile:?]
00at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [bundleFile:?]
00at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
00at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
00at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
00at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
00at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) [bundleFile:?]
00at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
00at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
00at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
00at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
The most interesting part of that seems to be the 5th line, where it says “52 is out of range”. Thinking it was some sort of issue with OH trying to send a string instead of a number or vice versa, I experimented changing the item type from Number:Temperature to Number and String, but so far nothing seems to work. I’ve tried removing and re-adding the device. I’ve tried creating a custom rule and sending variations of “63”, 63, “63.0”, 63.0, etc.
Also, I think it should be a number anyway. As a test I spun up a Home Assistant container and added the thermostat. It successfully adjusted the setpoint no problem, and when I snoop the traffic sent over MQTT, I see the following:
Topic: homeassistant/Kitchen/Thermostat/thermostat_setpoint/endpoint_0/setpoint/1 QoS: 0
{
"time": 1705337544491,
"value": 54
}
That seems to be some good news at least. It looks like a number, and doesn’t seem to need any sort of horrible translation either. Now I just need to get OH to send it.
So, I’m currently at a loss. I’ve thrown everything I can think of at the wall but nothing has stuck. I don’t know what range OH seems to think the number should be in, or how I would adjust that setting since according to the MQTT event, normal ranges are expected by the thermostat anyway.
For completeness’ sake, here is the item definition:
"KitchenThermostat_Climate_Control_4x_Sensor_Zwavejs2mqtt_5F0xd8b47b39_5FNode5_5Fclimate_Temperature": {
"class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
"value": {
"groupNames": [
"KitchenThermostat_Climate_Control_4x_Sensor"
],
"itemType": "Number:Temperature",
"tags": [
"Point",
"Temperature"
],
"label": "Kitchen Thermostat Setpoint",
"category": ""
}
},
I expect I made some kind of newbie mistake here when adding the device, or there’s some sort of esoteric metadata I have to add someplace that a wizard knows of. Thanks in advance for any help you can provide, and thanks for reading my boring book.