Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 27 forks source link

ConBeeII: Startup failed. retrying #142

Closed rayray4105 closed 1 year ago

rayray4105 commented 1 year ago

Hi,

As of this morning (after an rpi) update ConBeeII stopped working. I have rebooted, updated the plugin, enabled/disabled, etc but the error: Error: ConBeeII: Startup failed. retrying.... keeps popping up. I have posted the log below.

I can access the sensorlist using http://ip_address/api/XXXXXX/sensors

Am I missing something?

2022-12-23 13:10:18.739 Status: ConBeeII: Started. 2022-12-23 13:10:18.739 Status: ConBeeII: Entering work loop. 2022-12-23 13:10:19.394 ConBeeII: Domoticz and deCONZ are installed on the same machine. 2022-12-23 13:10:19.394 ConBeeII: Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE 2022-12-23 13:10:19.394 ConBeeII: Adding banned device : 00:15:8d:00:02:36:c2:3f-01-0500 2022-12-23 13:10:19.394 ConBeeII: Acquiring GIL for 'onStartCallback' 2022-12-23 13:10:19.382 Status: ConBeeII: Initialized version 1.0.26, author 'Smanar' 2022-12-23 13:10:19.394 Status: ConBeeII: Plugin custom pages in date 2022-12-23 13:10:28.007 ConBeeII: Pushing 'onHeartbeatCallback' on to queue 2022-12-23 13:10:28.058 ConBeeII: Processing 'onHeartbeatCallback' message 2022-12-23 13:10:28.058 ConBeeII: Acquiring GIL for 'onHeartbeatCallback' 2022-12-23 13:10:28.058 ConBeeII: Calling message handler 'onHeartbeat' on 'module' type object. 2022-12-23 13:10:28.058 ConBeeII: onHeartbeat called 2022-12-23 13:10:28.058 ConBeeII: ### Initialisation > config 2022-12-23 13:10:28.058 ConBeeII: ### Request config 2022-12-23 13:10:28.058 ConBeeII: Send Command /api/XXXXXXXX/config/ with None (0 in buffer) 2022-12-23 13:10:28.058 ConBeeII: Making Request: http://127.0.0.1:80/api/XXXXXX/config/ with params None 2022-12-23 13:10:28.081 ConBeeII: Request Return: {"UTC":"2022-12-23T12:10:28","apiversion":"1.16.0","backup":{"errorcode":0,"status":"idle"},"bridgeid":"00212EFFFF05EC7F","datastoreversion":"93","dhcp":true,"disablePermitJoinAutoOff":false,"factorynew":false,"fwversion":"0x00000000","gateway":"192.168.178.1","internetservices":{"internet":"connected","remoteaccess":"disconnected","swupdate":"connected","time":"connected"},"ipaddress":"192.168.178.52","lightlastseeninterval":60,"linkbutton":false,"localtime":"2022-12-23T13:10:28","mac":"e4:5f:01:0b:78:3a","modelid":"deCONZ","name":"Phoscon-GW","netmask":"255.255.255.0","networkopenduration":180,"panid":0,"portalconnection":"disconnected","portalservices":false,"portalstate":{"communication":"disconnected","incoming":false,"outgoing":false,"signedon":false},"proxyaddress":"none","proxyport":0,"replacesbridgeid":null,"rfconnected":false,"starterkitid":"","swupdate":{"checkforupdate":false,"devicetypes":{"bridge":false,"lights":[],"sensors":[]},"notify":false,"text":"","updatestate":0,"url":""},"swupdate2":{"autoinstall":{"on":false,"updatetime":""},"bridge":{"lastinstall":"2022-12-02T19:30:54","state":"noupdates"},"checkforupdate":false,"lastchange":"","state":"noupdates"},"swversion":"2.19.3","timeformat":"24h","timezone":"Europe/Amsterdam","uuid":"2bab0edc-bbe4-4e94-9d8e-1147f17f7a36","websocketnotifyall":true,"websocketport":443,"whitelist":{"2B11D007A3":{"create date":"2022-12-23T09:21:29","last use date":"2022-12-23T09:22:14","name":"Phoscon#B1470x887"},"79BEF4AA6A":{"create date":"2022-09-18T09:18:47","last use date":"2022-09-18T09:20:14","name":"Phoscon#B1627x794"},"7EE27383AE":{"create date":"2021-03-06T16:28:34","last use date":"2022-12-23T12:10:28","name":"Domoticz"},"A3DEB56F89":{"create date":"2022-10-11T18:48:11","last use date":"2022-10-15T12:02:45","name":"Phoscon#B1470x762"},"ADB2B95373":{"create date":"2022-10-04T17:53:52","last use date":"2022-10-11T17:32:51","name":"Phoscon#B2232x1049"},"B53CC77040":{"create date":"2022-10-04T18:06:20","last use date":"2022-10-04T18:17:05","name":"Phoscon#B390x664"},"F4CF203485":{"create date":"2022-09-18T10:09:45","last use date":"2022-09-26T15:15:52","name":"Phoscon#B1627x794"}},"zigbeechannel":0} 2022-12-23 13:10:28.082 ConBeeII: Classic Data : {'UTC': '2022-12-23T12:10:28', 'apiversion': '1.16.0', 'backup': {'errorcode': 0, 'status': 'idle'}, 'bridgeid': '00212EFFFF05EC7F', 'datastoreversion': '93', 'dhcp': True, 'disablePermitJoinAutoOff': False, 'factorynew': False, 'fwversion': '0x00000000', 'gateway': '192.168.178.1', 'internetservices': {'internet': 'connected', 'remoteaccess': 'disconnected', 'swupdate': 'connected', 'time': 'connected'}, 'ipaddress': '192.168.178.52', 'lightlastseeninterval': 60, 'linkbutton': False, 'localtime': '2022-12-23T13:10:28', 'mac': 'e4:5f:01:0b:78:3a', 'modelid': 'deCONZ', 'name': 'Phoscon-GW', 'netmask': '255.255.255.0', 'networkopenduration': 180, 'panid': 0, 'portalconnection': 'disconnected', 'portalservices': False, 'portalstate': {'communication': 'disconnected', 'incoming': False, 'outgoing': False, 'signedon': False}, 'proxyaddress': 'none', 'proxyport': 0, 'replacesbridgeid': None, 'rfconnected': False, 'starterkitid': '', 'swupdate': {'checkforupdate': False, 'devicetypes': {'bridge': False, 'lights': [], 'sensors': []}, 'notify': False, 'text': '', 'updatestate': 0, 'url': ''}, 'swupdate2': {'autoinstall': {'on': False, 'updatetime': ''}, 'bridge': {'lastinstall': '2022-12-02T19:30:54', 'state': 'noupdates'}, 'checkforupdate': False, 'lastchange': '', 'state': 'noupdates'}, 'swversion': '2.19.3', 'timeformat': '24h', 'timezone': 'Europe/Amsterdam', 'uuid': '2bab0edc-bbe4-4e94-9d8e-1147f17f7a36', 'websocketnotifyall': True, 'websocketport': 443, 'whitelist': {'2B11D007A3': {'create date': '2022-12-23T09:21:29', 'last use date': '2022-12-23T09:22:14', 'name': 'Phoscon#B1470x887'}, '79BEF4AA6A': {'create date': '2022-09-18T09:18:47', 'last use date': '2022-09-18T09:20:14', 'name': 'Phoscon#B1627x794'}, '7EE27383AE': {'create date': '2021-03-06T16:28:34', 'last use date': '2022-12-23T12:10:28', 'name': 'Domoticz'}, 'A3DEB56F89': {'create date': '2022-10-11T18:48:11', 'last use date': '2022-10-15T12:02:45', 'name': 'Phoscon#B1470x762'}, 'ADB2B95373': {'create date': '2022-10-04T17:53:52', 'last use date': '2022-10-11T17:32:51', 'name': 'Phoscon#B2232x1049'}, 'B53CC77040': {'create date': '2022-10-04T18:06:20', 'last use date': '2022-10-04T18:17:05', 'name': 'Phoscon#B390x664'}, 'F4CF203485': {'create date': '2022-09-18T10:09:45', 'last use date': '2022-09-26T15:15:52', 'name': 'Phoscon#B1627x794'}}, 'zigbeechannel': 0} 2022-12-23 13:10:28.083 ConBeeII: Acquiring GIL for 'onHeartbeatCallback' 2022-12-23 13:10:28.083 Error: ConBeeII: Startup failed. retrying....

Smanar commented 1 year ago

Hello, you have a problem on the conbee itself (or the USB port) I think if you go on phoscon / gateway you wil not see a firmware number but instead "not connected"

To start, the plugin wait for a firmware number to be sure deconz is ready.

se,"fwversion":"0x00000000","gate

You have an headless setup ? or desktop ? You have changed the USB port ? (usb 3 to usb 2) A new SSD ? Are you using an USB extension cable ?

You have updated the PI ? not the conbee (to be sure its not a firmware corruption)

To be sure it's not the conbee (and more the OS) you can try the conbee on another machine like a PC.

rayray4105 commented 1 year ago

hi,

Thanks for pointing that out. I did not change or remove any hardware though. I only updated the rpi.

This morning I did a manual update of the firmware and the app itself and now it is working again. However after a rpi reboot it does not anymore. The phoscon app shows the stick but not the firmware. Restarting the deconz service will fix it again though.

Smanar commented 1 year ago

So at every restart the firmware number disapear, ad re appear when restarting the deconz service ?

Wich one command you are using to restart the deconz service ? You have headless or desktop OS ?

I have the same issue but on domoticz on my side ^^, I m using a script to delay the service start. Perhaps you can change the service launch order ?

rayray4105 commented 1 year ago

correct. sudo systemctl stop or start deconz

I have found a script in the deconz git.

sudo nano /etc/systemd/system/deconz-conbee-reset.timer

[Unit] Description=deconz-conbee-reset.timer [Timer] OnBootSec=20 Unit=deconz-conbee-reset.service [Install] WantedBy=timers.target then create the service with: sudo nano /etc/systemd/system/deconz-conbee-reset.service

[Unit] Description=deconz-conbee-reset.service Wants=network.target [Service] Type=oneshot User=pi ExecStart=/usr/bin/sudo GCFFlasher_internal -r [Install] WantedBy=multi-user.target now activate the timer with : sudo systemctl enable deconz-conbee-reset.timer

rayray4105 commented 1 year ago

will implement it somewhere in the next days ;)

Smanar commented 1 year ago

But this script reset the gateway, not the service.

Can make a new try, just unplug and replug the device, it will restart the gateway (the device firmware)

correct. sudo systemctl stop or start deconz

So you have an headless setup ?

On my side for my issue I use this script https://easydomoticz.com/forum/viewtopic.php?p=82382#p82382 Nothing to see with your issue, but it wait for the OS time was set before launching ddomoticz

I have tried to see if there is a way to set the order for services start, but I don't understand the system, I think it will be easier to add a delay in the service script

But why you have this issue after a Rpi update ? what have you updated ?