core: `Error setting up entry /dev/ttyUSB1 for zha` after upgrading to 0.88
Home Assistant release with the issue:
0.88
Last working Home Assistant release (if known): 0.87
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io running on RaspberryPI 3 B+. I’m using the HUSBZB-1 USB stick and have a bunch of ZigBee as well as ZWave devices.
Component/platform:
Description of problem:
After upgrading to 0.88 (and now to 0.88.1) all the ZigBee (zha) devices show as Unavailable.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
zha:
usb_path: /dev/ttyUSB1
database_path: /config/zigbee.db
Traceback (if applicable):
Error setting up entry /dev/ttyUSB1 for zha
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/config_entries.py", line 260, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/zha/__init__.py", line 176, in async_setup_entry
await asyncio.gather(*init_tasks)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/zha/core/gateway.py", line 159, in async_device_initialized
await zha_device.async_initialize(from_cache=(not is_new_join))
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/zha/core/device.py", line 192, in async_initialize
BASIC_CHANNEL).get_power_source()
AttributeError: 'NoneType' object has no attribute '
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 41 (16 by maintainers)
This is consistent with what I experienced. You need to remove the following device.
This would need to be done manually via SQLite.
I’d leave it up to you to decide whether the issue should be closed or not, given the amount of activity here.
@dmulcahey yes. Thanks for all the support!
@dmulcahey @prairiesnpr Thank you. This seem to have improved a bunch. Removed zigbee.db and started everythinig from scratch. Quirks are so far all detected nicely - i have about 3 sensors left i think that i need to set up, but everything looks great so far.
@mkartak http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/
Removing and readding is the ONLY way. The device is not joined correctly. Quirks work by matching cluster definitions to what is in zigbee.db. If they don’t match, they don’t apply and that probably isn’t going to change. The device probably didn’t finish pairing, Xiaomi is notorious for this. I posted instructions on the forum topic that you’ve been posting to that help mitigate this. While joining, press the button every 3-5 seconds until you see all the sensors in the UI
@mkartak there is an issue with manufacturer and model not being ready for HA when joining devices. I have to dig deeper to see where it is. My suspicion is that it’s in Zigpy. The solution is just don’t do anything with the UI until after a restart. They’ll be there with the correct name at that point.
Also, if you haven’t set a static name for the USB stick you’re going to have this issue again at some point. You should look at setting up a symbolic name for it so it survives restarts and removing and reading the usb device.
@mkArtak please provide the entire log from HA on pastebin or something similar and let me determine if it is useful.