domoticz-zigbee2mqtt-plugin
domoticz-zigbee2mqtt-plugin copied to clipboard
The plugin does not start after restarting the raspberry pi
Hi all! Great job Stanislav! I have such a problem. The plugin works perfectly but, after a power outage or restart from Domoticz or console or reboot raspberry pi, the plugin does not start. I have to enter the devices (in Domoticz) and manually disable and enable the plugin, then it starts working again.
Additional information Zigbee2MQTT version: 1.6.0. Python version: 3.7.3 Domoticz version: V4.10717 Plugin version: 0.19
Hi, I've got the same problem. I reboot my Raspberry 03:00 AM and after that the plugin doesn't work anymore. The log starts with a long list of mqtt errors. When I disable and enable the plugin it reads the devices correctly from mqtt and enables all devces without any errors.
Additional information Zigbee2MQTT version: 1.6.0. Python version: 3.5.3 Domoticz version: V4.10717 Plugin version: 0.19
Most likely it happens because your MQTT server starts after Domoticz initialize plugin. Could you please try to start Domoticz after MQTT server and check if everything is ok?
You're right. If I run domoticz after mosquitto, everything is OK.
Hello, I've got the same problem. How can I modify the order of starting MQTT server and domoticz plugin initialization ? Thank you and sorry for my english !!
I have the same problem. Every reboot the zigbee2mqtt is not working with domoticz...must be restarted the domoticz.service. What can i do?
Please make sure you have such order of starting services: MQTT -> zigbee2mqtt -> Domoticz
First start it is Domoticz and after mqtt,but i don't know how to change the stratup order. If mqtt server started first everyfing works fine.
Faced the same problem this week. I run zigbee2mqtt, mosquitto, and domoticz via LXC so maybe the details will differ a bit. p.s. This should work if you followed the Domoticz Wiki.
Do a 'systemctl edit domoticz' and save the following:
[Unit] After = zigbee2mqtt
This will override the After option from the original domoticz service file to start after zigbee2mqtt. @stas-demydiuk IMHO this should be handled by the plugin. In this scenario, mosquitto and zigbeee2mqtt run on the same host. This is not applicable when someone has f.e. a dedicated pi-mosquitto broker running on the local LAN. Is trying to reconnect (for X nr of times) plugin wise an option?
Agree, would be great if someone create PR to add such behavior
I have the same problem. Modifying the service start order does not solve it in my setup. I suspect the real problem is that even if the zigbee2mqtt service is started, it might still be waiting for the ZigBee usb controller to connect/start. Would be great if the plugin recognizes this state and reconnects when zigbee2mqtt is actually ready.
I have the same problem. Modifying the service start order does not solve it in my setup. I suspect the real problem is that even if the zigbee2mqtt service is started, it might still be waiting for the ZigBee usb controller to connect/start. Would be great if the plugin recognizes this state and reconnects when zigbee2mqtt is actually ready.
This is not plugin problem. This is Domoticz problem...
Some solution ?
Hi Stanislav, I have the same problem. After rebooting the Pi, domoticz is unable to connect to the Zigbee2MQTT devices. changing the startup order does not solve this. When I simply change the 'Zigbee pairing' setting in the hardware setting of the Zigbee2MQTT device, all devices can be reached. A domoticz domoticz.txt log file is attached that shows the behaviour.
this help https://domoticz.com/forum/viewtopic.php?t=30846 :)
sudo nano /etc/init.d/domoticz.sh
locate the line that starts with DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME insert this after that line (20 is an example)
DAEMON_ARGS="$DAEMON_ARGS -startupdelay 20"
save the file and do sudo systemctl daemon-reload
this help https://domoticz.com/forum/viewtopic.php?t=30846 :)
sudo nano /etc/init.d/domoticz.sh
locate the line that starts with DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME insert this after that line (20 is an example)
DAEMON_ARGS="$DAEMON_ARGS -startupdelay 20"
save the file and do sudo systemctl daemon-reload
Hi Kevin, this seemed to do the trick, but after a reboot through crontab, the plugin needed a reset by changing the setting again. Does anyone have a way to automate this reset?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.