Hey everybody,
im currently trying to “listen” to my Hue devices at home (especially the smart buttons) using a CS2531 USB dongle. I am running HA in a python virtual machine linked to systemd to autostart. The zigbee2mqtt is running on the same device (Pi) (later also with systemd, but currently not).
I installed the Zigbee2mqtt component following this guide:
Afterward, I followed the zigbee2mqtt guide for Home Assistant:
However, I do have problems understanding the part that has to be done in HA. Where do I define the devices that should be listend to? Or is this done by the zigbee2mqtt?
My configuration.yaml file of zigbe2mqtt looks like this:
# Home Assistant integration (MQTT discovery)
homeassistant: true
# allow new devices to join
permit_join: true
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://localhost'
# MQTT server authentication, uncomment if required:
# user: my_user
# password: my_password
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0
Info: The zigbee2mqtt is running on the pi as HA
My logs look like this:
> [email protected] start /opt/zigbee2mqtt
> node index.js
zigbee2mqtt:info 2020-02-17 19:58:45: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-02-17.19-58-45' filename: log.txt
zigbee2mqtt:info 2020-02-17 19:58:46: Starting zigbee2mqtt version 1.10.0 (commit #8df6be8)
zigbee2mqtt:info 2020-02-17 19:58:46: Starting zigbee-herdsman...
zigbee2mqtt:info 2020-02-17 19:58:48: zigbee-herdsman started
zigbee2mqtt:info 2020-02-17 19:58:48: Coordinator firmware version: '{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}}'
zigbee2mqtt:info 2020-02-17 19:58:48: Currently 0 devices are joined:
zigbee2mqtt:warn 2020-02-17 19:58:48: `permit_join` set to `true` in configuration.yaml.
zigbee2mqtt:warn 2020-02-17 19:58:48: Allowing new devices to join.
zigbee2mqtt:warn 2020-02-17 19:58:48: Set `permit_join` to `false` once you joined all devices.
zigbee2mqtt:info 2020-02-17 19:58:48: Zigbee: allowing new devices to join.
zigbee2mqtt:info 2020-02-17 19:58:48: Connecting to MQTT server at mqtt://localhost
zigbee2mqtt:info 2020-02-17 19:58:48: Connected to MQTT server
zigbee2mqtt:info 2020-02-17 19:58:48: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
zigbee2mqtt:info 2020-02-17 19:58:48: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.10.0","commit":"8df6be8","coordinator":{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}},"log_level":"info","permit_join":true}'
Given, that I understand it correctly this is telling me, that I should set permit_join = true
which I have.
So, how do I add devices to zigbee2mqtt and then send publish a mqtt message to HA?
I really struggle with this whole exercise
I hope somebody can help me figure out what I have to do in order to make this working. Thank you!
Cheers,
Christian