Core: ZHA no longer starts: Error setting up entry ConBee1 for zha

Created on 8 May 2020  路  17Comments  路  Source: home-assistant/core

The problem

ZHA won't start anymore with the following Python error logged:

image

I use a Dresden electronics ConBee 1 stick on a serial-by-id port.

Possibly caused by #35161

Environment

  • Home Assistant Core release with the issue: Home Assistant 0.110.0.dev20200508 & 0.110.0.dev20200507
  • Last working Home Assistant Core release (if known): Home Assistant 0.110.0.dev20200504 (didn't upgrade my production system in those days between)
  • Operating environment (Home Assistant/Supervised/Docker/venv): Supervisor based system.
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Traceback/Error logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 216, in async_setup
    hass, self
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 98, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 141, in async_initialize
    self.application_controller = await app_controller_cls.new(
AttributeError: type object 'ControllerApplication' has no attribute 'new'

Additional information

zha

Most helpful comment

All 17 comments

what environment? can you

  1. pip3 uninstall zigpy-homeassistant
  2. pip3 insttall zigpy

I'm running Home Assistant (Supervisor based). The above-used images are the nightly Docker builds.

let me test in venv upgrade from 0.109.6 to current dev with a clean venv.
We did change library name and there is an incompatible change in the library.
can you do docker exec -i homeassistant pip3 freeze | egrep -e '(zigpy|bellows)' ?

image

zigpy-homeassistant needs to be uninstalled.
But I can't reproduce it with a clean venv running 0.109.6 and being updated to latest dev. Here's the log:

(hass-zigpy) lex@debba:~/lex/src/ha-configs/dev-conz$ egrep -e '(package|zha|zigpy)' home-assistant.log 
2020-05-08 11:39:50 INFO (SyncWorker_4) [homeassistant.loader] Loaded zha_map from custom_components.zha_map
2020-05-08 11:39:50 INFO (SyncWorker_6) [homeassistant.loader] Loaded zha_custom from custom_components.zha_custom
2020-05-08 11:39:50 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for zha_map which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-05-08 11:39:50 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for zha_custom which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-05-08 11:39:50 INFO (SyncWorker_4) [homeassistant.loader] Loaded zha from homeassistant.components.zha
2020-05-08 11:39:50 INFO (SyncWorker_4) [homeassistant.util.package] Attempting install of bellows==0.16.1
2020-05-08 11:39:53 INFO (SyncWorker_5) [homeassistant.util.package] Attempting install of zigpy-cc==0.4.2
2020-05-08 11:39:55 INFO (SyncWorker_2) [homeassistant.util.package] Attempting install of zigpy-deconz==0.9.1
2020-05-08 11:39:58 INFO (SyncWorker_9) [homeassistant.util.package] Attempting install of zigpy-xbee==0.12.1
2020-05-08 11:40:01 INFO (SyncWorker_3) [homeassistant.util.package] Attempting install of zigpy-zigate==0.6.1
2020-05-08 11:40:03 INFO (MainThread) [homeassistant.setup] Setting up zha
2020-05-08 11:40:03 INFO (MainThread) [homeassistant.setup] Setup of domain zha took 0.0 seconds.
2020-05-08 11:40:03 INFO (SyncWorker_1) [homeassistant.util.package] Attempting install of home-assistant-frontend==20200505.0
2020-05-08 11:40:03 DEBUG (MainThread) [homeassistant.components.zha] Migrating from version 1
2020-05-08 11:40:03 INFO (MainThread) [homeassistant.components.zha] Migration to version 2 successful
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.appdb] Loading application state from /home/lex/lex/src/ha-configs/dev-conz/zigbee.db
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.appdb] Attribute id: 4 value: OSRAM
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.appdb] Attribute id: 5 value: LIGHTIFY A19 RGBW
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.appdb] Attribute id: 4 value: 46592
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for None None (00:21:2e:ff:ff:01:b9:90)
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {1} {1, 242}
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
...
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy_deconz.uart] Connection made
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy_deconz.api] Command Command.read_parameter (1, <NetworkParameter.protocol_version: 34>, b'')
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x0a02000800010022
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0a02000a000300220b01
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy_deconz.api] Read parameter protocol_version response: [267]
2020-05-08 11:40:04 DEBUG (MainThread) [zigpy_deconz.api] Command Command.version ()

Is there a way to mark a python package obsolete?

Hrm, after venv upgrade to dev i have

(hass) lex@debba:~/lex/src/ac-hass$ pip3 freeze | egrep -e '(zigpy|bellows)'
bellows==0.16.1
bellows-homeassistant==0.15.2
zigpy==0.20.1
zigpy-cc==0.4.2
zigpy-deconz==0.9.1
zigpy-homeassistant==0.19.0
zigpy-xbee==0.12.1
zigpy-xbee-homeassistant==0.11.0
zigpy-zigate==0.6.1

It leaves all old packages...

image

It comes in as a dependency of zha-quirks

https://github.com/zigpy/zha-device-handlers/pull/342

It has been changed, however, not been released/bumped.

I know a guy who could fix it ;)

Ok that made me LOL

I now have:

image

Edit: I can't read 馃う re-trying...

image

Ok, so managed to use 0.0.39 for the quirks now, ditched the zigpy-homeassistant, however, no cigar...

image

hrm. Did you uninstall zigpy-homeassistant? Could it be zigpy needs re-installation in this case?
Can you
docker exec -i homeassistant pip3 uninstall zigpy
docker exec -i homeassistant pip3 install zigpy==0.20.1

Re-opening till hear from Frenck

Confirmed fix on my installation (I had the same issue)

Sounds good. Closing then

Was this page helpful?
0 / 5 - 0 ratings