Hello,
New user here. Actually this is my 3rd time trying OpenHab and so far I had given up given its complexity. This time I believe I got good progress but still far from having a useful system, so I’m trying my luck here, so please be gentle
I have implemented IoTStack on a RPI4 4G (Linux/6.1.21-v8+ (aarch64)) with slaeh’s cc2652rb_stick Zigbee dongle, and containerized Mosquitto, NodeRed, ZigBee2MQTT, InfluxDB2, Grafana, and OpenHab 4.1.3.
I’ve been surviving in the last years with some physical remotes, Z2MQTT GUI and Google home integration in NodeRed but now I’m trying (again) OpenHab. In other words, the zigbee layer is working fine with mosquitto/NodeRed (and also with InfluxDB2). I have some basic graphs in grafana, so the flows are working.
In OpenHab was able to set a basic model with locations and groups. There is “apartment” as root and then “living room”, “kitchen”, “bedroom”, etc. even though not sure if I classified it correctly (group, location, semantic classes? Seems too many parameters for a newbie).
I installed the MQTT binding and got all of my Zigbee devices in the inbox. I “created thing” from a few of these and associated to some of the different rooms in my apartment. It looks really great.
Now the problem is that I can’t seem to get information from Temp/Hum Sensors. I don’t think it is a wrong binding with MQTT because I can change actuators (switches, lamps) from OpenHab Equipment tab. The problem is only receiving (and displaying) the data. I’ve tried influxdb persistence as well as RRD4J, but no luck. Not a single piece of data shows in these “points”. The channel links show as “offline” but I’m getting the data in my original influxDB as well as I can see the last update some minutes ago in Z2MQTT.
(BTW, When I switch some actuators in OpenHab its status are updated in Z2MQTT, but when I switch the same switch in Z2MQTT, the status isn’t updated in OpenHab).
So I guess I have configured something wrong in the sensors.
UID: mqtt:homeassistant_zigbee2mqtt_5F0xa4c1385fdd2c5eab:4fc98e3aee:zigbee2mqtt_5F0xa4c1385fdd2c5eab
label: T&H Sensor
thingTypeUID: mqtt:homeassistant_zigbee2mqtt_5F0xa4c1385fdd2c5eab
configuration:
topics:
- sensor/0xa4c1385fdd2c5eab/battery
- sensor/0xa4c1385fdd2c5eab/humidity
- sensor/0xa4c1385fdd2c5eab/linkquality
- sensor/0xa4c1385fdd2c5eab/temperature
- sensor/0xa4c1385fdd2c5eab/voltage
basetopic: homeassistant
bridgeUID: mqtt:broker:4fc98e3aee
channels:
- id: 0xa4c1385fdd2c5eab_5Fvoltage_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0xa4c1385fdd2c5eab_5Fvoltage_5Fzigbee2mqtt_sensor
label: MQTT Sensor
description: null
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c1385fdd2c5eab"],"manufacturer":"TuYa","model":"Temperature
& humidity sensor with display (TS0201)","name":"T&H Sensor JP
room","via_device":"zigbee2mqtt_bridge_0x00124b0021cc3d98"},"device_class":"voltage","enabled_by_default":false,"entity_category":"diagnostic","json_attributes_topic":"zigbee2mqtt/T&H
Sensor JP
room","object_id":"t&h_sensor_jp_room_voltage","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/T&H
Sensor JP
room","unique_id":"0xa4c1385fdd2c5eab_voltage_zigbee2mqtt","unit_of_measurement":"mV","value_template":"{{
value_json.voltage }}"}'
nodeid: "0xa4c1385fdd2c5eab"
objectid: voltage
- id: 0xa4c1385fdd2c5eab_5Fhumidity_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0xa4c1385fdd2c5eab_5Fhumidity_5Fzigbee2mqtt_sensor
label: MQTT Sensor
description: null
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c1385fdd2c5eab"],"manufacturer":"TuYa","model":"Temperature
& humidity sensor with display (TS0201)","name":"T&H Sensor JP
room","via_device":"zigbee2mqtt_bridge_0x00124b0021cc3d98"},"device_class":"humidity","enabled_by_default":true,"json_attributes_topic":"zigbee2mqtt/T&H
Sensor JP
room","object_id":"t&h_sensor_jp_room_humidity","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/T&H
Sensor JP
room","unique_id":"0xa4c1385fdd2c5eab_humidity_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{
value_json.humidity }}"}'
nodeid: "0xa4c1385fdd2c5eab"
objectid: humidity
- id: 0xa4c1385fdd2c5eab_5Ftemperature_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0xa4c1385fdd2c5eab_5Ftemperature_5Fzigbee2mqtt_sensor
label: MQTT Sensor
description: null
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c1385fdd2c5eab"],"manufacturer":"TuYa","model":"Temperature
& humidity sensor with display (TS0201)","name":"T&H Sensor JP
room","via_device":"zigbee2mqtt_bridge_0x00124b0021cc3d98"},"device_class":"temperature","enabled_by_default":true,"json_attributes_topic":"zigbee2mqtt/T&H
Sensor JP
room","object_id":"t&h_sensor_jp_room_temperature","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/T&H
Sensor JP
room","unique_id":"0xa4c1385fdd2c5eab_temperature_zigbee2mqtt","unit_of_measurement":"°C","value_template":"{{
value_json.temperature }}"}'
nodeid: "0xa4c1385fdd2c5eab"
objectid: temperature
- id: 0xa4c1385fdd2c5eab_5Fbattery_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0xa4c1385fdd2c5eab_5Fbattery_5Fzigbee2mqtt_sensor
label: MQTT Sensor
description: null
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c1385fdd2c5eab"],"manufacturer":"TuYa","model":"Temperature
& humidity sensor with display (TS0201)","name":"T&H Sensor JP
room","via_device":"zigbee2mqtt_bridge_0x00124b0021cc3d98"},"device_class":"battery","enabled_by_default":true,"entity_category":"diagnostic","json_attributes_topic":"zigbee2mqtt/T&H
Sensor JP
room","object_id":"t&h_sensor_jp_room_battery","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/T&H
Sensor JP
room","unique_id":"0xa4c1385fdd2c5eab_battery_zigbee2mqtt","unit_of_measurement":"%","value_template":"{{
value_json.battery }}"}'
nodeid: "0xa4c1385fdd2c5eab"
objectid: battery
- id: 0xa4c1385fdd2c5eab_5Flinkquality_5Fzigbee2mqtt#sensor
channelTypeUID: mqtt:0xa4c1385fdd2c5eab_5Flinkquality_5Fzigbee2mqtt_sensor
label: Linkquality
description: null
configuration:
component: sensor
config: '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0xa4c1385fdd2c5eab"],"manufacturer":"TuYa","model":"Temperature
& humidity sensor with display (TS0201)","name":"T&H Sensor JP
room","via_device":"zigbee2mqtt_bridge_0x00124b0021cc3d98"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/T&H
Sensor JP
room","name":"Linkquality","object_id":"t&h_sensor_jp_room_linkquality","origin":{"name":"Zigbee2MQTT","sw":"1.38.0","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/T&H
Sensor JP
room","unique_id":"0xa4c1385fdd2c5eab_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{
value_json.linkquality }}"}'
nodeid: "0xa4c1385fdd2c5eab"
objectid: linkquality
Any idea what am I doing wrong?
Thanks,
Joao