Hey there,
currently I try to integrate a SONOFF SNBZ-02 temperature and humidity sensor via mosquitto → zigbee2mqtt → mqtt-Binding in Openhab3. The sensor is already connected to the MQTT-Broker (friendlyname “Luftsensor”) and frequently publishes data like
MQTT publish: topic 'zigbee2mqtt/Luftsensor', payload '{"battery":100,"humidity":53.69,"linkquality":75,"temperature":22.56,"voltage":3200}'
In Openhab3 itself the MQTT-Broker-Think (mqtt:broker) has been set up successfully (status “online”) and is working with tradfri lights.
Yet i’m struggleing to get this particular sensor running as “Generic MQTT Thing” (mqtt:topic). I create the think with the following code:
UID: mqtt:topic:mqtt_broker:EG_Flur_Luftsensor
label: EG Flur Luftsensor
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:mqtt_broker
location: Flur
channels:
- id: temperatur1
channelTypeUID: mqtt:number
label: Temp1
description: ""
configuration:
stateTopic: zigbee2mqtt/Luftsensor/temperature/state/
According to the zigbee2mqtt docs, this should work.
From the docs:
Temperature (numeric)
Measured temperature value. Value can be found in the published state on the temperature property. It's not possible to read (/get) or write (/set) this value. The unit of this value is °C.
I’m losing my head with this… can some please enlighten me?
Cheers