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
69.89k stars 28.98k forks source link

ZHA wont configure unknown error with skyconnect #121316

Open rampestamper opened 5 days ago

rampestamper commented 5 days ago

The problem

SkyConnect isnt automatically detected. when i want to manualy configure ZHA it is giving me a unknown error.

What version of Home Assistant Core has the issue?

core-2024.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Detected blocking call to glob with args ('/dev/ttyACM*',) inside the event loop by integration 'zha' at homeassistant/components/zha/radio_manager.py, line 221: probe_result = await radio.controller.probe(dev_config) (offender: /usr/local/lib/python3.12/site-packages/serial/tools/list_ports_linux.py, line 95: devices.extend(glob.glob('/dev/ttyACM*')) # usb-serial with CDC-ACM profile), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22 For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#glob Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 415, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 204, in async_step_choose_serial_port probe_result = await self._radio_mgr.detect_radio_type() File "/usr/src/homeassistant/homeassistant/components/zha/radio_manager.py", line 221, in detect_radio_type probe_result = await radio.controller.probe(dev_config)

Additional information

No response

SGC1990 commented 5 days ago

I am having the same problem mine started when i updated to core-2024.7.0

home-assistant[bot] commented 5 days ago

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)

puddly commented 5 days ago

Are you currently using ZHA already with a SkyConnect?

rampestamper commented 5 days ago

Are you currently using ZHA already with a SkyConnect?

No in have only Z2MQTT running now. Moved yesterday with a partial backup to a fresh ha install from docker.

puddly commented 5 days ago

The SkyConnect integration doesn't actually know that you're currently using the SkyConnect with Z2M so you will have to either ignore the discovery or stop Z2M to finish setting it up.

SGC1990 commented 5 days ago

Are you currently using ZHA already with a SkyConnect?

I am using it with silicon lab multiprotocol addons with the good open thread border router then added it to ha, I downgrade back to 2024.6

rampestamper commented 5 days ago

I am not using the sky connect with z2m i am using the sonoff dongle - P for z2m i want to use the sky connect for thread and zha but homeassistant gives a unknown error when i want to setup zha with the sky connect.

puddly commented 5 days ago

@rampestamper and just to confirm, you have nothing running that could possibly be communicating with the SkyConnect, right? No other addons (OpenThread, Multiprotocol, HomeMatic/RaspberryMatic, etc.) or integrations?

rampestamper commented 5 days ago

@rampestamper and just to confirm, you have nothing running that could possibly be communicating with the SkyConnect, right? No other addons (OpenThread, Multiprotocol, HomeMatic/RaspberryMatic, etc.) or integrations?

That is correct. I have nothing that is communicating with the skyconnect. Just this evening i also upgraded the firmware of the skyconnect tot the latest version just to make sure that wasn't the problem.

puddly commented 5 days ago

Moved yesterday with a partial backup to a fresh ha install from docker.

Did you upgrade the firmware with the web flasher or a flasher addon? If you're manually managing your Home Assistant instance with Docker (and possibly a VM), I would double check that the serial port (not just the USB device) is actually usable by HA and permissions are correctly set up for device communication.

rampestamper commented 5 days ago

Moved yesterday with a partial backup to a fresh ha install from docker.

Did you upgrade the firmware with the web flasher or a flasher addon? If you're manually managing your Home Assistant instance with Docker (and possibly a VM), I would double check that the serial port (not just the USB device) is actually usable by HA and permissions are correctly set up for device communication.

I did upgrade through the webflasher. And I don't run docker anymore I just run HAOS now.

rampestamper commented 4 days ago

@puddly any idea what i can still try?

sorgi88 commented 2 days ago

Hello together, I have the same problem. I think it startet with version 2024.6. Unfortunately 2024.7 didn't fix it. I only use ZHA with skyconnect on an intel nuc. I also use a homematic system with a ccu2 whitch is located in another room in the house. I dit not change anything on the setup.

Edit: It also runs in combination with the Silicon Labs Multiprotocol Addon.

hsmalley commented 2 days ago

I started having the problem with 2024.6. I just haven't had the time to really dig into it and it's been driving me crazy since I have a TON of zigbee devices.

I had some time tonight to look into it and I'm seeing the thing as reported.

I'm using the home assistant blue (odroid-n2) and the skyconnect. I've re-flashed using the web flasher. I've tried both the stable and multi-protocol versions too. Nothing seems to make a difference. I set the logger to debug for zha and attached the errors I'm seeing over and over in the log.

Let me know if you need/want me to test anything, gather more logs, etc. I'm pretty motivated given the amount of zigbee devices I have and frustration I'm having not being able to use anything :smile:

zha_logger.txt

puddly commented 2 days ago

Revert your SkyConnect back to Zigbee firmware. Can you enable debug logging for ZHA and post the log after letting ZHA try to set up a few times? The error messages alone unfortunately don't contain much context.

rampestamper commented 2 days ago

So i added 3 logs. the first after i put the debugging in the configuration.yaml with the multi firmware still in the skyconnect. after i updated the firmware to zigbee and rebooted home assistant i was able to configure ZHA. After this worked i updated the skyconnect back to multi to see what homeassistant would do. i rebooted homeassistant but after that i had a configuration error on ZHA. but after removing ZHA to try and configure it again i had 2 options. 1 to add a zigbee device (while ZHA was deleted???) and the option to configure ZHA. but after trying to configure ZHA i still got the same error as before. Log With multi firmware Time.7.38.59 .log home-assistant_2024-07-09T05-54-54.661Z.log

puddly commented 2 days ago

After this worked i updated the skyconnect back to multi to see what homeassistant would do. i rebooted homeassistant but after that i had a configuration error on ZHA.

Multiprotocol firmware isn't compatible with ZHA directly. You can only run multiprotocol via the addon. I would advise against it either way, it's unstable even when it does run.

hsmalley commented 1 day ago

I flashed it back to the zigbee firmware via the web flasher and power cycled. That didn't help so I took a look at the hardware tab and searched under all hardware. It looks like it's not being detected at all.

For S&Gs I tried the zigbee2mqtt addon and was getting the same kind of problems.

The dongle shows up on any other system I connect it too. So I think it's something to do with HA /HA OS itself?