home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.28k stars 30.6k forks source link

All Zigbee devices go unavailable when going from 2023.1.1 to 2023.2.1 #87275

Closed AnthonyKNorman closed 1 year ago

AnthonyKNorman commented 1 year ago

The problem

When going from 2023.1.1 to 2023.1.2 I had the same issue, but put this down to an incompatibility with my SonOff Wifi ZigBee controller. I have successfully moved to SonOff USB 3.0 stick. Moving to 2023.2.1 still causes the issue. A restore of the backup has everything working again.

What version of Home Assistant Core has the issue?

2023.2.1

What was the last working version of Home Assistant Core?

2023.1.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @dmulcahey, @adminiuga, @puddly, 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` Change the title of 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.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

rjkruit commented 1 year ago

I'm having the same issue here after upgrading from 2023.1.6 to 2023.2.0. Restoring the backup I made prior to upgrading fixed things. This morning I've tried upgrading to 2023.2.1 and the same thing happened again so I yet again restored the backup. This is what my logs say:

`Logger: homeassistant.config_entries Source: components/zha/core/gateway.py:174 First occurred: 14:25:52 (1 occurrences) Last logged: 14:25:52

Error setting up entry USB Serial, s/n: n/a for zha Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 111, in async_setup_entry await zha_gateway.async_initialize() File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 189, in async_initialize raise exc File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 174, in async_initialize self.application_controller = await app_controller_cls.new( File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 163, in new await app._load_db() File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 80, in _load_db await self._dblistener.load() File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 581, in load await self._load_unsupported_attributes() File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 634, in _load_unsupported_attributes ep = dev.endpoints[endpoint_id] KeyError: 4`

`Logger: homeassistant.components.zha.core.gateway Source: components/zha/core/gateway.py:174 Integration: Zigbee Home Automation (documentation, issues) First occurred: 14:25:45 (3 occurrences) Last logged: 14:25:52

Couldn't start ZNP = Texas Instruments Z-Stack ZNP protocol: CC253x, CC26x2, CC13x2 coordinator (attempt 1 of 3) Couldn't start ZNP = Texas Instruments Z-Stack ZNP protocol: CC253x, CC26x2, CC13x2 coordinator (attempt 2 of 3) Couldn't start ZNP = Texas Instruments Z-Stack ZNP protocol: CC253x, CC26x2, CC13x2 coordinator (attempt 3 of 3) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 174, in async_initialize self.application_controller = await app_controller_cls.new( File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 163, in new await app._load_db() File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 80, in _load_db await self._dblistener.load() File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 581, in load await self._load_unsupported_attributes() File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 634, in _load_unsupported_attributes ep = dev.endpoints[endpoint_id] KeyError: 4`

puddly commented 1 year ago

@rjkruit Your issue is unrelated. Can you open a separate one?

puddly commented 1 year ago

@AnthonyKNorman Please post/email me ZHA debug logs of:

  1. ZHA working with 2023.1.1
  2. ZHA not working with 2023.2.1

In each one, let ZHA run for 10 minutes so it fully starts up.

AnthonyKNorman commented 1 year ago

v2023.1.1 home-assistant_zha_2023-02-04T11-07-32.458Z.log v2023.2.1 home-assistant_zha_2023-02-04T11-34-18.364Z.log Hi Log files attached. Thank you

orensuch commented 1 year ago

Hi I have the exact same problem. I know it definitely started after the update because I was using one of my Zigbee switches few moments before the update. Here is the error log details (very similar to the one @rjkruit sent):

Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus, s/n: 523f773ef921ec11be4221c32c86906c - ITead for zha Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 111, in async_setup_entry await zha_gateway.async_initialize() File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 189, in async_initialize raise exc File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 174, in async_initialize self.application_controller = await app_controller_cls.new( File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 163, in new await app._load_db() File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 80, in _load_db await self._dblistener.load() File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 581, in load await self._load_unsupported_attributes() File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 634, in _load_unsupported_attributes ep = dev.endpoints[endpoint_id] KeyError: 2

Log file attached.

I tried to load a previous configuration backup but it didn't help. Thanks

home-assistant_2023-02-04T19-08-19.318Z.log

Adminiuga commented 1 year ago

File "/usr/local/lib/python3.10/site-packages/zigpy/appdb.py", line 634, in _load_unsupported_attributes ep = dev.endpoints[endpoint_id] KeyError: 2

Looks like zigbee.db got corrupted.

orensuch commented 1 year ago

I tried to copy the zigbee.db and the zigbee.db-wal files from a backup, and reloaded the integration. It still isn't working. I tried to delete the files and reload the integration, and the integration is able to reload. I can see all my devices but they are all unavailable. The new zigbee.db is of course much smaller. Again, the issue started with the upgrade. It doesn't seem like the db is corrupted, but some problem with the readout.

Adminiuga commented 1 year ago

Still isn't working won't get any help. Do you get the same error? Does downgrading work?

orensuch commented 1 year ago

I get the same error (with the same bad key:2). I haven't try to downgarde the system back to 2023.1. As far as I understand, this is a matter of reinstalling the system and loading a backup. I will do that as a last resort since it takes too much time. I only tried to load previous backups, but it didn't change the error. I of course tried all the basics - full restart (and unplugging from power), changing the usb port several times etc. I can wait few days to see if an update fixes the issue. If not, I'll have to downgrade.

Adminiuga commented 1 year ago

@puddly were there any quirks changes removing endpoints?

If you know SQL, you could try deleting rows from unsupported_attributes_v11 table where endpoint=2 but it would help to pinpoint the device IEEE, model and manufacturer which is causing the issue.

puddly commented 1 year ago

None that I'm aware of. Please post the database before deleting rows or messing with it, I'd like to know if it's corrupted.

orensuch commented 1 year ago

I used DB browser to look into the database. This is the unsupported_attributes_v11 table, filtered by endpoint_id=2 image I tried to delete both, and reload the integration and got the same error.

orensuch commented 1 year ago

How can I send you the database? github does not allow me to upload the file here

Adminiuga commented 1 year ago

Find the same IEEE in the attributes cache with attr Id 4 and 5, those are model and manufacturer.

orensuch commented 1 year ago

I restored the database from the backup. I traced the two devices and disconnected them: one device a 1 gang switch (named TS0041 by _TZ3000_x7mej5oc) the other device is a power socket+usb (named TS011F by _TZ3000_cymsnfvf) Both worked perfectly before the update. after reloading the integration I get the same error. After again removing the lines from the unsupported_attributes_v11 I reloaded the integration, and again got the same error.

orensuch commented 1 year ago

@puddly - Please download the zigbee.db file from: https://1drv.ms/u/s!AgPhJ0wMHR3jl6dIHzxwISpUpeeIcg?e=3j6BO4

puddly commented 1 year ago

@AnthonyKNorman You're running an outdated custom quirk:

2023-02-04 11:18:21.852 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry socket://192.168.68.143:8888 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 100, in async_setup_entry
    setup_quirks(config)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/__init__.py", line 409, in setup
    importer.find_module(modname).load_module(modname)
  File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1063, in load_module
  File "<frozen importlib._bootstrap_external>", line 888, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 719, in _load
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_zha_quirks/ts0601_trv_beca.py", line 558, in <module>
    class BecaWindowDetection(LocalDataCluster, OnOff):
  File "/config/custom_zha_quirks/ts0601_trv_beca.py", line 601, in BecaWindowDetection
    command_id: Union[foundation.Command, int, t.uint8_t],
AttributeError: module 'zigpy.zcl.foundation' has no attribute 'Command'

Custom quirks are code that you manually installed and thus only fixable on your end. Either delete the custom quirk, or help it get merged into ZHA quirks so that it will be updated in the future.

puddly commented 1 year ago

@orensuch I'm able to load your database just fine on my system so something else is broken. Are there any other zigbee.db-shm or zigbee.db-wal files?

After stopping Home Assistant, can you try:

orensuch commented 1 year ago

Both of the file exist (you can see them here: https://1drv.ms/u/s!AgPhJ0wMHR3jl6dM3RSd7gXBUkBfJg?e=w5X52f) I did something similar to what you suggested - I deleted the file and restored it from a backup. I still get the same error. Should I restart between deletion and restoring? I again emphasize that this is totally related to the update. this db worked perfectly and I haven't add new devices lately. I also saw at least another one report in the home-assistant forum about this issue after the latest update. Is there any other log I can send to help pin-point this issue?

levma commented 1 year ago

The 2023.2.1 update broke my zigbee configuration. Downgrading with ha core update --version 2023.1.1 didn't help. Integration and system restart didn't help either. I've got a warning and an error message in the core log. It seems, the device itself is unavailable. I searched for it via the shell (ls /dev/serial/by-id/) and can't find the previously available usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00.

WARNING:

Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:172
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 4. Februar 2023 um 11:47:23 (6 occurrences)
Last logged: 4. Februar 2023 um 15:48:13

Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 1 of 3)
Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 2 of 3)
Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 3 of 3)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 131, in startup
    await self.connect()
  File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 124, in connect
    self._ezsp = await bellows.ezsp.EZSP.initialize(self.config)
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 101, in initialize
    await ezsp.connect(use_thread=zigpy_config[conf.CONF_USE_THREAD])
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 118, in connect
    self._gw = await bellows.uart.connect(self._config, self, use_thread=use_thread)
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 389, in connect
    protocol, connection_done = await thread.run_coroutine_threadsafe(
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 368, in _connect
    transport, protocol = await zigpy.serial.create_serial_connection(
  File "/usr/local/lib/python3.10/site-packages/zigpy/serial.py", line 40, in create_serial_connection
    transport, protocol = await pyserial_asyncio.create_serial_connection(
  File "/usr/local/lib/python3.10/site-packages/serial_asyncio/__init__.py", line 448, in create_serial_connection
    serial_instance = serial.serial_for_url(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00'

ERROR:

Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:172
First occurred: 4. Februar 2023 um 11:47:29 (2 occurrences)
Last logged: 4. Februar 2023 um 15:48:13

Error setting up entry SONOFF Zigbee 3.0 USB Dongle Plus V2 for zha
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 111, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 185, in async_initialize
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 131, in startup
    await self.connect()
  File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 124, in connect
    self._ezsp = await bellows.ezsp.EZSP.initialize(self.config)
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 101, in initialize
    await ezsp.connect(use_thread=zigpy_config[conf.CONF_USE_THREAD])
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 118, in connect
    self._gw = await bellows.uart.connect(self._config, self, use_thread=use_thread)
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 389, in connect
    protocol, connection_done = await thread.run_coroutine_threadsafe(
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 368, in _connect
    transport, protocol = await zigpy.serial.create_serial_connection(
  File "/usr/local/lib/python3.10/site-packages/zigpy/serial.py", line 40, in create_serial_connection
    transport, protocol = await pyserial_asyncio.create_serial_connection(
  File "/usr/local/lib/python3.10/site-packages/serial_asyncio/__init__.py", line 448, in create_serial_connection
    serial_instance = serial.serial_for_url(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00'
JohnMoor commented 1 year ago

My Zigbee devices also have problems after installing the 2023.2.1 update Friday. I just update to 2023.2.2 but problems still exist.

Logger: homeassistant.components.zha.core.channels.base Source: components/zha/core/channels/base.py:486 Integration: Zigbee Home Automation (documentation, issues) First occurred: 9:05:08 AM (19 occurrences) Last logged: 9:19:37 AM

[0x5064:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')] [0xFC65:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')] [0xFC65:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')] [0x58C9:1:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')] [0x58C9:1:0x1000]: Couldn't get list of groups: Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>

alexanderphoenix commented 1 year ago

I managed to get ZigBee working again by downgrading to 2023.1.1 and updating my conbee II stick's firmware to the latest (I believe the latest update was may 2022) not sure if I got lucky but at least we don't have up reach out for those pesky light switches any more!

The downside of doing this is all the history has been converted with the upgrade to a new format and therefore it's showing no historical data for all entities.

not sure what will happen when I upgrade next, but I won't be doing so until this issue has been addressed

julianjwong commented 1 year ago

Watching this one as my Sonoff ZigBee USB 3.0 dongle also disappeared with both the 2023.2.0 and 2023.2.2 updates throwing similar errors to the above. Removed my custom quirks as well just in case but no luck

AnthonyKNorman commented 1 year ago

@AnthonyKNorman You're running an outdated custom quirk:

2023-02-04 11:18:21.852 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry socket://192.168.68.143:8888 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 100, in async_setup_entry
    setup_quirks(config)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/__init__.py", line 409, in setup
    importer.find_module(modname).load_module(modname)
  File "<frozen importlib._bootstrap_external>", line 548, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1063, in load_module
  File "<frozen importlib._bootstrap_external>", line 888, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 719, in _load
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_zha_quirks/ts0601_trv_beca.py", line 558, in <module>
    class BecaWindowDetection(LocalDataCluster, OnOff):
  File "/config/custom_zha_quirks/ts0601_trv_beca.py", line 601, in BecaWindowDetection
    command_id: Union[foundation.Command, int, t.uint8_t],
AttributeError: module 'zigpy.zcl.foundation' has no attribute 'Command'

Custom quirks are code that you manually installed and thus only fixable on your end. Either delete the custom quirk, or help it get merged into ZHA quirks so that it will be updated in the future.

@puddly that fixed it. Thanks for your help!

JohnMoor commented 1 year ago

v2023.1.1 home-assistant_zha_2023-02-04T11-07-32.458Z.log v2023.2.1 home-assistant_zha_2023-02-04T11-34-18.364Z.log Hi Log files attached. Thank you

@AnthonyKNorman stupid question, perhaps, but where did you find these logs? I've just enabled debugging in configuration and can see all details /config/home-assistant.log but gives too much info. Just looking for ZHA relevant info.

AnthonyKNorman commented 1 year ago

@JohnMoor there are no stupid questions. I had to do my homework! When you disable debugging HA automatically downloads the debug log. Good luck.

AnthonyKNorman commented 1 year ago

@julianjwong in order to help the experts to help you, you need to open your own issue and attach your own debug logs. In that way I got very quick assistance to solve my issue. They can scan all the posts for all the supplementary questions attached.

Adminiuga commented 1 year ago

@levma you get the

FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00'

Error. Your device is not there and this is not related to any other errors reported here. Physically unplug and plug the USB stick. If not fixed, you need to figure out why the system and/or container does not see it

levma commented 1 year ago

@Adminiuga i'd like to be more specific: when i remove the dongle, nothing is shown in /dev/serial/... ... when i put it back i get: usb-1a86_USB_Single_Serial_54DC011999-if00 … so it seems that maybe a different / wrong (?) driver was loaded

Adminiuga commented 1 year ago

The name is reported by the USB serial chip. Where did usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811115608-if00 go? Did you update itead's firmware and it changed the port name? If the new name is correct, then you could try manually editing the .storage/core.config_entries file and updating the serial path, but if you break the JSON structure of the file,not would break the ha. This file is not supposed to be edited manually.b

levma commented 1 year ago

I didn't update the firmware. I just made the update, afterwards the name / device path changed. --- Edit --- Update 2023.2.3 brought back the "real" device name / path! (The error messages are gone, but the zigbee devices don't react. Maybe i have to reset everything. But i think that's another issue)

dslam734 commented 1 year ago

All my zigbee devices are "unavailable" as well. ZHA is loading and I can add new devices. HELP! Already flashed ConbeeII to newest firmware with no success. Running on Raspberry3

home-assistant.log

puddly commented 1 year ago

@dslam734 From your log, it looks like you started Zigbee2MQTT with your Conbee on 2/5. This erases all of your network settings and overwrites them with Zigbee2MQTT's defaults.

Go to the ZHA integration's configuration page, click "Migrate Radio", and then "Re-configure current radio". When it asks you to to restore an automatic backup, pick the one from 2/2 (should be something like ffec:0bb6c0751ee0b0d4).

dslam734 commented 1 year ago

@puddly That did the trick! Thanks a lot! I'd buy you a beer if I could. I went back from z2m to ZHA but didn't delete z2m. Somehow it started automatically on startup after the upgrade and this explains why ZHA would not work afterwards. Very low wife acceptance factor the last couple of days but now the peace is restored....

Moustik2002 commented 1 year ago

Still there is some issue starting w/ 2023.1.7. I fight a lot trying to find out a solution to control my Zigbee devices using new versions but no luck. So after trying to swith Channel to 25, switch to another coordinator (from conbee 2 to Sonoff) which lead me to pair all my 35 devices twice ... the only stable solution was to get back to 2023.1.6....

I've tested so far until 2023.2.2. Does someone know if 2023.2.3 fix the issue or still hapenning ( do not want to go to the pairing hell again )?

puddly commented 1 year ago

@dslam734 I think the error should resolve on its own if you either wait for a while or unplug the coordinator and plug it back in:

zigpy.exceptions.DeliveryError: Failed to deliver packet: <TXStatus.NWK_BT_TABLE_FULL: 210>
puddly commented 1 year ago

I'm going to close this issue because the original problem was resolved and there are now way too many unrelated issues piled onto this one. If you have a specific problem, open a separate issue.

Bimboboy007 commented 1 year ago

Habe das gleiche Problem aber nur auf einer bestehenden Installation die ich gerade Verwende. Hab noch eine 2te Installation auf einer Synology auf die ich wechseln möchte da wird der Stich auch sofort erkannt und da funktioniert es.

emil568 commented 1 year ago

The problem is custom_quirks. If you delete from configuration file custom_quirks_path zigbee start working but the devices that need quiks will stop workin :( I need custom_quirks for PIR with luminance sensor. Now Zigbee works but no PIR sensors :(