Crash after re-plugging CC2531
Hi,
I'm using zigbee2mqtt in a docker container with latest-dev tag from today. If I re-plug my CC2531 stick with coordinator firmware 20190109 and then restart the zigbee2mqtt container, the app crashes. If I wait the 60 seconds and restart the container again it's working, but I think it should try to self repair in a loop instead of crashing.
zigbee2mqtt logs: https://pastebin.com/Mc29fRuY /root/.npm/_logs/2019-01-30T14_51_11_830Z-debug.log: https://pastebin.com/kKpyubkZ
After replugging, before starting zigbee2mqtt, please press the reset button (the one close to the usb port). The green light should go off and you can now start zigbee2mqtt.
Is this behavior expected? If yes, then the message Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds) is a bit confusing / misleading.
Is there a place where this can be documented or is it already documented and I just haven't seen it?
@Koenkk I've fixed this bug in my last pull request to zigbee-shepherd
@ptvoinfo thanks, should be solved in the latest dev branch.
@Koenkk Could you indicate how to switch from master to dev branch? I think I have the exact same issue (error at npm start). Switching to dev does not require any re-pairing process, right? And finally, how to switch back to master eventually?
This doesn't require repairing devices.
git fetch
git checkout dev
should do it.
After replugging, before starting zigbee2mqtt, please press the reset button (the one close to the usb port). The green light should go off and you can now start zigbee2mqtt.
I have the same problem, pressing the button doesn't turn off the green light however
@sultanakaneel did you also replug it?
@sultanakaneel did you also replug it?
Yep. I stopped zigbee2mqtt, pulled the usb, put it back in, pressed button closest to usb (green light didn't change) and started zigbee2mqtt
@sultanakaneel strange, anyway, can you check if this has been fixed in zigbee2mqtt? Hassio 1.1.1 update is on it's way (should be available within an hour).
@Koenkk still experiencing the same problem, sort of. It now gets stuck on the following:
[Info] Configuration file found: /share/zigbee2mqtt/configuration.yaml [Info] Configuration written to /share/zigbee2mqtt/configuration.yaml 2019-02-03T17:43:48: PM2 log: Launching in no daemon mode 2019-02-03T17:43:48: PM2 log: App [npm:0] starting in -fork mode- 2019-02-03T17:43:48: PM2 log: App [npm:0] online
[email protected] start /zigbee2mqtt-1.1.1 node index.js zigbee2mqtt:info 2019-2-3 17:43:51 Logging to directory: '/share/zigbee2mqtt/log/2019-02-03.17-43-51' zigbee2mqtt:info 2019-2-3 17:43:52 Starting zigbee2mqtt version 1.1.1 (commit #unknown) zigbee2mqtt:info 2019-2-3 17:43:52 Starting zigbee-shepherd zigbee2mqtt:info 2019-2-3 17:43:56 Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds)
It never moves past this bit. And the longer I let it run the slower my pi becomes, which I can only solve by pulling the power
@sultanakaneel is it fixed by reflashing the stick?
@Koenkk I'm afraid I don't have the hardware to flash it, bought it preflashed
@sultanakaneel do you know what firmware was flashed on it? Maybe that's the reason of: https://github.com/Koenkk/zigbee2mqtt/issues/971#issuecomment-460009215 ?
@Koenkk I'm pretty sure it was flashed 2-3 days ago, so I assume it is the latest version. Is there any way I can check?
@sultanakaneel not if you cant get zigbee2mqtt to start (it's logged on startup). Could you perhaps try if it works on a different computer?
@Koenkk I have the same problem as @sultanakaneel. I just upgraded to 1.1.1 and I have the latest firmware flashed on my 2531. I tried flashing the newest firmware again on a new unused 2531 and I am still getting the same problem.
@roygbiv856 can you post the complete log? Does it also hang in your case?
@Koenkk Yes, sir. It just hangs. When I first updated to 1.1.1 today, it would tell me to press the reset button on the 2531 then hang. Now, it just says error while starting shepherd and hangs. I am not sure if this is completely related, but ever since I updated to 1.1.1, my entire hassio freezes up and I need to unplug and plug my pi. This has already happened twice today and it has never happened before in the 3 months I've used hassio.
https://pastebin.com/wQduw7aV
Can you post the debug log (zigbee_shepherd_debug options https://github.com/danielwelch/hassio-zigbee2mqtt)