core icon indicating copy to clipboard operation
core copied to clipboard

ZHA + Conbee 2 fails to start

Open mikelock opened this issue 1 year ago • 1 comments

The problem

Not sure what goes wrong. After I updated the HA container to the mighty februari release, ZHA fails to start. It just displays 'Error setting up entry Conbee II for zha' and/or 'Watchdog failure'.

I can see the Conbee 2 device at the configured location in the container (/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_xxxxxxx)

What version of Home Assistant Core has the issue?

2024.2.0

What was the last working version of Home Assistant Core?

2024.1.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Diagnostics information

home-assistant_zha_2024-02-07T23-22-29.041Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Yes, the following errors:
- Error setting up entry Conbee II for zha
- Watchdog failure

Additional information

No response

mikelock avatar Feb 07 '24 23:02 mikelock

Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

home-assistant[bot] avatar Feb 07 '24 23:02 home-assistant[bot]

I also get a lot of the following warnings:

2024-02-08 12:29:00.424 WARNING (MainThread) [zigpy_deconz.zigbee.application] Unexpected transmit confirm for request id 190, Status: TXStatus.SUCCESS

mikelock avatar Feb 08 '24 11:02 mikelock

FWIW I had a similar with my Sonoff ZHABridge (running 13.3.0(zbbridge)) It was reporting that the initialisation had failed. Reloading the Zigbee integration worked for me, and I could see ZHA events after that.

In my case the Zigbee was taking a very long time to startup. I had seen a similar behaviour when enabling ZHA OTA updates in 2024.1.6.

You could try reloading the Zigbee integration as a workaround for now.

frawau avatar Feb 08 '24 14:02 frawau

FWIW I had a similar with my Sonoff ZHABridge (running 13.3.0(zbbridge)) It was reporting that the initialisation had failed. Reloading the Zigbee integration worked for me, and I could see ZHA events after that.

In my case the Zigbee was taking a very long time to startup. I had seen a similar behaviour when enabling ZHA OTA updates in 2024.1.6.

You could try reloading the Zigbee integration as a workaround for now.

I have tried to reload the integration many times without success. Have gone back to 2024.1.6 and ZHA worked instantly.

mikelock avatar Feb 08 '24 14:02 mikelock

You could try adding

#ZHA OTA updates
zha:
  zigpy_config:
    ota:
      ikea_provider: true
      sonoff_provider: true
      thirdreality_provider: true

to your configuration.yaml file and restarting to see if the same problem is triggered. This could possibly point to an issue with the new OTA update support.

Just delete that bit and restart if you don't like it.

frawau avatar Feb 09 '24 02:02 frawau

Nice, you pointed me in the right direction. I can successfully reproduce the problem, it is caused by HomeAssistant not handling the blocking of a firewall correctly. I have very strict firewall rules, especially outbound from my server.

I previously had OTA setup, but only for select providers which I whitelisted. But with the new update, all providers are configured and thus it tries to connect to every provider. The failing to connect crashes the connection attempt and stops the loading of the integration.

mikelock avatar Feb 09 '24 07:02 mikelock

I also had this issue. Although Home Assistant should be able to reach every Update URL, adding the following to my configuration fixed it and ZHA is starting without issues:

zha:
  zigpy_config:
    ota:
      ikea_provider: false
      inovelli_provider: false
      ledvance_provider: false
      salus_provider: false
      sonoff_provider: false
      thirdreality_provider: false

It could be that my ISP(AS3320) has issues with Cloudflare(and various other CDNs) and the connection to one of the Update Servers just times out during startup. Still is a bug and ZHA should start regardless. If my assumptions are correct this would also mean that ZHA will fail to start without internet.

shellyeah avatar Feb 10 '24 13:02 shellyeah

Thank you @shellyeah! This resolved the issue for me. This issue cascades across HA and causes issues with Automations among other things.

mpkossen avatar Feb 13 '24 01:02 mpkossen

Thanks @shellyeah , it is now working! Still a little bit worries as my server shouldn't reboot when internet is down, as this renders HA useless.

All the automations are also visible again.

mikelock avatar Feb 13 '24 22:02 mikelock

I noticed the Watchdog failure spontaneously during the day, as ZHA restarted for some reason

erkr avatar Feb 14 '24 14:02 erkr