Hi
I need help with Xiaomi Aqara door sensor integration in Home Assistant using ZigbeeToMQTT.
I’m using hassio and have installed zigbee2mqtt addon.
Addon connects with mqtt broker (I’m using Mosquitto) and from log it seems to be connected
zigbee2mqtt:info 7/5/2019, 11:50:01 PM Connected to MQTT server
When sensor is activated, message is seen in log
zigbee2mqtt:info 7/5/2019, 11:50:18 PM MQTT publish: topic 'zigbee2mqtt/door_sensor', payload '{"contact":false,"linkquality":157,"battery":100,"voltage":3055}'
zigbee2mqtt:info 7/5/2019, 11:50:23 PM MQTT publish: topic 'zigbee2mqtt/door_sensor', payload '{"contact":true,"linkquality":157,"battery":100,"voltage":3055}'
Added binary sensor to configuration.yaml
binary_sensor:
- platform: mqtt
name: "vrata"
state_topic: "zigbee2mqtt/door_sensor"
value_template: "{% if value_json.contact %}Closed{% else %}Open{% endif %}"
But nothing happens with sensor in home assistant
It’s off all the time, activating sensor does nothing there
One more thing that seems odd to me is, in node red i try to listen to same topic
But don’t see any messages on it (like message was never published although zigbetomqtt log claims it is)
Have no idea what am I doing wrong
EDIT:
Don’t know does this matter, but for this to work, I had to add to Mosquitto configuration
"anonymous": true,
ZigbeeToMQTT wasn’t able to connect to mosquitto before that