I have an ESP8266 with esp easy installed which delivers mqtt data like temperature and humidity to my mosquitto broker on a raspberry. On this rasp there is also openhab installed. I can see that my mqtt messages from my esp8266 arrive.
tail -f /var/log/mosquitto/mosquito.conf
1740407003: Received PUBLISH from wohnzimmer_1 (d0, q0, r0, m0, ‘/wohnzimmer_1/BMx280/Temperature’, … (4 bytes))
1740407003: Sending PUBLISH to wohnzimmer_1 (d0, q0, r0, m0, ‘/wohnzimmer_1/BMx280/Temperature’, … (4 bytes))
1740407003: Received PUBLISH from wohnzimmer_1 (d0, q0, r0, m0, ‘/wohnzimmer_1/BMx280/Humidity’, … (3 bytes))
1740407003: Sending PUBLISH to wohnzimmer_1 (d0, q0, r0, m0, ‘/wohnzimmer_1/BMx280/Humidity’, … (3 bytes))
I created a Thing an Item and linked them together. Unfortunately I can’t see the temperature value but only a NULL in openhab. Why does my temperature not arrive in openhab?
The Code looks like this
UID: mqtt:topic:MQTTBroker:WohnzimmerMeasurements
label: Wohnzimmer Measurements
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:MQTTBroker
channels:
- id: WohnzimmerTemperature
channelTypeUID: mqtt:number
label: Wohnzimmer Temperature
description: “”
configuration:
stateTopic: wohnzimmer_1/BMx280/Temperature
Thank you very much for your help.
Greetings Manuel