Bosch MQTT

Good morning,

I’m currently relatively new to Openhab.
I have currently connected some Shellys and Philips HUE lamps via “mosquitto2mqtt”.

Now I have bought 6 Bosch Thoermosatet (BTH-RA) and have already integrated them.
I can already control the target temperature.

I have problems displaying the actual temperature and the battery. No values are shown to me here.
Can someone help me with this?

Thing

Thing mqtt:topic:******:Thermostat_Esszimmer "Thermostat_Esszimmer" (mqtt:broker:*******)
{
	Channels:
    		Type number : temperature 	"Raum Temperatur"   		[ stateTopic="zigbee2mqtt/Thermostat_Esszimmer/local_temperature" ]
    		Type number : setpoint    	"Gewünschte Temperatur" 	[ commandTopic="zigbee2mqtt/Thermostat_Esszimmer/setpoint-temperature", formatBeforePublish="{ \"occupied_heating_setpoint\":\"%s\"}", transformationPattern="JSONPATH:$.occupied_heating_setpoint" ]
		    Type number : battery     	"Batterie"     			    [ stateTopic="zigbee2mqtt/Thermostat_Esszimmer/battery" ]
}

Item

Group Thermostat_Esszimmer    "Thermostate_Esszimmer"                               (Esszimmer)                             ["HVAC"]
Number:Temperature   	temperature    "Esszimmer_Temperatur [%.1f °C]"     <temperature>   (Temperature, Thermostat_Esszimmer)     ["Measurement", "Temperature"] { channel="mqtt:topic:******:Thermostat_Esszimmer:temperature" [scale="Celsius"] }
Number               	setpoint       "Esszimmer_Setpoint [%.1f °C]"		<temperature>   (Thermostat_Esszimmer)                  ["Measurement", "TargetTemperature"] { channel="mqtt:topic:******:Thermostat_Esszimmer:setpoint" [scale="Celsius"] }
Number:Dimensionless 	batterie       "Esszimmer_Batterie [%d %%]"        	<battery>       (Battery, Thermostat_Esszimmer)         ["Battery"] { channel="mqtt:topic:******:Thermostat_Esszimmer:battery" }

Thank you =)

Best regards
FeatBoi

Welcome to our community!
In order to help you, we need to see the raw mqtt messages for the missing values.
At first sight seems that incoming transformation is missing.

Thanks for trying to help.

I Hope i got the right messages.

{
  "battery": 100,
  "boost": "OFF",
  "child_lock": "UNLOCK",
  "display_brightness": 7,
  "display_ontime": 10,
  "display_orientation": "normal",
  "displayed_temperature": "measured",
  "linkquality": 184,
  "local_temperature": 19.4,
  "linkquality": 188,
  "local_temperature": 19.5,
  "local_temperature_calibration": 0,
  "occupied_heating_setpoint": 18,
  "pi_heating_demand": 0,
  "remote_temperature": 0,
  "running_state": "idle",
  "system_mode": "auto",
  "update": {
    "installed_version": 889525524,
    "latest_version": 889525524,
    "state": "idle"
  },
  "update_available": false,
  "window_open": "OFF"
}

Not really, your channel definition shows individual topics for local_temperature and battery, but the message you posted shows a JSON response including them all.
Question is, does the device publish all values as individual topics, then you need to sho the messages published on them. if not, what‘s the topic you posted the message from?

I got only this message from my MQTT Explorer.
Sry, but i am a beginner at this moment :frowning:

Where can i find the relevant topic?

Ok, even this is completely not openHAB related, lets try to sort this out.
Can you post a screenshot from MQTT Explorer, so we can try to find out what topics the device publishes to.
Or even better, do you by chance have any mqtt documentation for the device?

Thanks for your help.

You can find a documentation on the following link “https://www.zigbee2mqtt.io/devices/BTH-RA.html

Exactly output:

zigbee2mqtt/bridge/logging {"level":"info","message":"MQTT publish: topic 'zigbee2mqtt/Thermostat_Esszimmer', payload '{\"battery\":100,\"boost\":\"OFF\",\"child_lock\":\"UNLOCK\",\"display_brightness\":7,\"display_ontime\":10,\"display_orientation\":\"normal\",\"displayed_temperature\":\"measured\",\"linkquality\":124,\"local_temperature\":19,\"local_temperature_calibration\":0,\"occupied_heating_setpoint\":18,\"pi_heating_demand\":100,\"remote_temperature\":0,\"running_state\":\"heat\",\"system_mode\":\"heat\",\"update\":{\"installed_version\":839193876,\"latest_version\":889525524,\"state\":\"available\"},\"update_available\":true,\"window_open\":\"OFF\"}'"}

Found that documentation in the meantime.

Seems, everything id published at one topic, so please try


{
	Channels:
    		Type number : temperature 	"Raum Temperatur"   		[ stateTopic="zigbee2mqtt/Thermostat_Esszimmer", transformationPattern="JSONPATH:$.local_temperature"  ]
    		Type number : setpoint    	"Gewünschte Temperatur" 	[ commandTopic="zigbee2mqtt/Thermostat_Esszimmer/setpoint-temperature", formatBeforePublish="{ \"occupied_heating_setpoint\":\"%s\"}", transformationPattern="JSONPATH:$.occupied_heating_setpoint" ]
		    Type number : battery     	"Batterie"     			    [ stateTopic="zigbee2mqtt/Thermostat_Esszimmer",  transformationPattern="JSONPATH:$.battery]
}

perfectly. It works =)

One more question. The percentage value of the battery is given as 10000. How do I get it calculated to 100?

I think the channel type is not correct, don‘t know a battery type. Try to set it to dimensionless too.

I got it. The itemtype is now only “number” not “Number:dimesionless”.

Thanks a lot for your help =)

Have a great day =)

And you!
Please mark this topic as solved…