I copied your configuration into my setup, so that it looks like below. The only thing I changed is the reference to my Broker Thing, as mine is called MosquittoMqttBroker
.
Thing
Thing mqtt:topic:ThermoBureau "Thermostat Bureau" (mqtt:broker:MosquittoMqttBroker) @ "Bureau" {
Channels:
Type number : SetPoint "SetPoint" [
stateTopic="tele/THERMO_BUREAU/SENSOR",
transformationPattern ="JSONPATH:$.THERMO_BUREAU.OccupiedHeatingSetpoint",
commandTopic="cmnd/THERMO_BUREAU/ZbSend",
formatBeforePublish="{\"Device\":\"THERMO_BUREAU\",\"Write\":{\"OccupiedHeatingSetpoint\":%s}}"
]
}
Item
Number ThermoBureau_SetPoint "SetPoint " <temperature> (pBureau) {channel="mqtt:topic:ThermoBureau:SetPoint"}
Sitemap
Setpoint item=ThermoBureau_SetPoint
I change the Setpoint
on the sitemap to 2
:
I can see in MQTT Explorer that the expected string is sent to cmnd/THERMO_BUREAU/ZbSend
So for me at least the expected string is being sent to the expected topic, and makes it way all the way to my MQTT broker. Is your openHAB Broker Thing correctly configured? Is your device Thing pointing to the correct Broker Thing?
What did that show this time?
Note that you may have fallen victim to the annoying bug where openHAB sometimes doesn’t properly register changes made to Things files. You can restart openHAB, or do this.