You have to run npm start in the directory you installed Zigbee2MQTT
And here you have to change 2 lines
[Unit]
Description=zigbee2mqtt
After=network.target
[Service]
Environment=NODE_ENV=production
ExecStart=/usr/bin/npm start
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=inherit
# Or use StandardOutput=null if you don't want Zigbee2MQTT messages filling syslog, for more options see systemd.exec(5)
StandardError=inherit
Restart=always
RestartSec=10s
User=pi
[Install]
WantedBy=multi-user.target
On dietpi, there is no user pi, so change the line
User=pi
to
User=root
and this line
ExecStart=/usr/bin/npm start
should probably be (if you did exacly what was written here :Install NodeJS on a Raspberry Pi Zero)
ExecStart=/usr/local/npm start
When I’m in /opt/zigbee2mqtt I can start it manually with “npm start”
but
auto start in boot is not functioning, although /etc/systemd/system/zigbee2mqtt.service has been revised, as advised above.
in this how to in the section “Install Zigbee2MQTT and it’s dependencies”
instead of “sudo chown -R pi:pi /opt/zigbee2mqtt”
replaced with “sudo chown -R root:root /opt/zigbee2mqtt” and this is the only point that didn’t comply 100%
Edit: Just realized that the path of npn is /usr/local/bin/npm and revised the accordingly the /etc/systemd/system/zigbee2mqtt.service …and zigbee2mqtt is up and running. Now Im repeating reboot for test.
Edit2: it’s up and running again and again. Raspberry zero needs 1 min and 55 seconds from reboot to see again the web interface of zigbee2mqtt.
Now, the next step. How to connect it with HA? in which point is connected ? just one more serial in /config/zigbee2mqtt or what?
Edit3. I got the devices of the z2m of raspberry at MQTT list (integrations/MQTT/DEVICES).
Now is remaining only the mystery of non pairing cc2531(router) to cc2652p(coordinator) or the
cc2531(coordinator)
Thanks guys!!!