My main automation system is Home Assistant on Raspberry Pi4 but I currently access Nest Protect via the HA plugin and Homebridge on another Pi4.
I already use ZHA on HA for a Conbee II but have just recently bought a SONOFF Zigbee 3.0 USB Dongle Plus in an attempt to integrate a few Sonoff Zigbee buttons, which appear to have no actions available in Home Assistant. I thought the Sonoff dongle would help with compatibility.
As I do not want to use Deconz with my Conbee i HA (this has been very unreliable whereas I have had no issues with ZHA), I thought I would integrate the Sonoff dongle and buttons via Homebridge.
I have been following the instructions via this post but have come unstuck with installing [Zigbee2MQTT] (Linux | Zigbee2MQTT) on the Homebridge Pi4.
I have successfully started Zigbee2MQTT manually with just 3 warnings but looks ok :
pi@homebridge:/var/lib/homebridge $ cd /opt/zigbee2mqtt
pi@homebridge:/opt/zigbee2mqtt $ npm start
> [email protected] start
> node index.js
Zigbee2MQTT:info 2022-01-29 20:10:02: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2022-01-29.20-10-00' filename: log.txt
Zigbee2MQTT:info 2022-01-29 20:10:02: Starting Zigbee2MQTT version 1.22.2 (commit #1a0a9a6e)
Zigbee2MQTT:info 2022-01-29 20:10:02: Starting zigbee-herdsman (0.13.188)
Zigbee2MQTT:info 2022-01-29 20:10:03: zigbee-herdsman started (resumed)
Zigbee2MQTT:info 2022-01-29 20:10:03: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info 2022-01-29 20:10:03: Currently 0 devices are joined:
Zigbee2MQTT:warn 2022-01-29 20:10:03: `permit_join` set to `true` in configuration.yaml.
Zigbee2MQTT:warn 2022-01-29 20:10:03: Allowing new devices to join.
Zigbee2MQTT:warn 2022-01-29 20:10:03: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info 2022-01-29 20:10:03: Zigbee: allowing new devices to join.
Zigbee2MQTT:info 2022-01-29 20:10:03: Connecting to MQTT server at mqtt://192.168.1.xxx:1883
Zigbee2MQTT:info 2022-01-29 20:10:04: Connected to MQTT server
Zigbee2MQTT:info 2022-01-29 20:10:04: MQTT publish: topic 'core-mosquitto/bridge/state', payload 'online'
However, when attempting to run as a daemon, I have had no success. Initially I got a 205 error but lately have just got the following:
pi@homebridge:/opt/zigbee2mqtt $ sudo systemctl start zigbee2mqtt
Warning: The unit file, source configuration file or drop-ins of zigbee2mqtt.service changed on disk. Run 'systemctl daemon-reload' to reload units.
pi@homebridge:/opt/zigbee2mqtt $
My service code is as follows:
[Unit]
Description=zigbee2mqtt
After=network.target
[Service]
ExecStart=/usr/bin/npm start
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=null
# Or use StandardOutput=null if you don't want Zigbee2MQTT messages filling syslog, for more options see systemd.exec(5)
StandardError=inherit
Restart=always
User=pi
[Install]
WantedBy=multi-user.target
I did try the “ExecStart=/usr/local/bin/npm start” as well, even though my Pi is version 4B.
The suggested daemon reload results in the following:
pi@homebridge:/opt/zigbee2mqtt $ systemctl daemon-reload
Failed to reload daemon: Interactive authentication required.
pi@homebridge:/opt/zigbee2mqtt $
Any ideas what I am doing wrong?