core: Zigbee Home Automation - RaspBee II doesn't work after HA OS 8.0 upgrade

The problem

Hi, I updated today my HA on OS 8.0 and 2022.5.4 core and Raspbee II device and Zigbee integration doesn’t work since the upgrade. Any suggestions?

Thanks, Petr

What version of Home Assistant Core has the issue?

2022.5.4

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

Zigbee Home Automation

Link to integration documentation on our website

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

Diagnostics information

How to get diagnostic file?

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Messages from log:
Logger: homeassistant.config_entries
Source: config_entries.py:366
First occurred: 16:48:00 (1 occurrences)
Last logged: 16:48:00

Config entry '/dev/ttyS0' for zha integration not ready yet; Retrying in background

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:96
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 17:06:34 (4 occurrences)
Last logged: 17:06:41

[547224274928] Received invalid command: zha/configuration
[547224274928] Received invalid command: zha/groups
[547224274928] Received invalid command: zha/devices

Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:182
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 16:48:00 (21 occurrences)
Last logged: 17:07:13

Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 182, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.9/site-packages/zigpy/application.py", line 69, in new
    await app.startup(auto_form)
  File "/usr/local/lib/python3.9/site-packages/zigpy_deconz/zigbee/application.py", line 84, in startup
    self.version = await self._api.version()
  File "/usr/local/lib/python3.9/site-packages/zigpy_deconz/api.py", line 464, in version
    (self._proto_ver,) = await self[NetworkParameter.protocol_version]
  File "/usr/local/lib/python3.9/site-packages/zigpy_deconz/api.py", line 429, in read_parameter
    r = await self._command(Command.read_parameter, 1 + len(data), param, data)
  File "/usr/local/lib/python3.9/site-packages/zigpy_deconz/api.py", line 314, in _command
    return await asyncio.wait_for(fut, timeout=COMMAND_TIMEOUT)
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 49 (7 by maintainers)

Most upvoted comments

I also had this problem. In my case the root cause was the serial ports for my Zigbee and ZWave USB dongles got switched.

I was using the invariant device name for my Zigbee controller (ConBee II), so after the upgrade to HA OS 8.0 I had

  • Zigbee at /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2499961-if00
  • Zigbee aka /dev/ttyACM0
  • ZWave configured to /dev/ttyACM0

Before the upgrade, the invariant Zigbee name was mapped to /dev/ttyACM1.

With both protocols trying to use the same port, Zigbee and ZWave both didn’t work.

I was able to fix Zigbee by reconfiguring the port used by Z-Wave JS to MQTT. I pasted in the invariant name for the ZWave controller, which for me is /dev/serial/by-id/usb-0658_0200-if00 . For details of where to do this, see here, though note that the instructions recommend using a raw device name, which would likely cause this issue to recur.

To see the device names in all their glory, go to Settings > System > Hardware > 3 Dots Menu > All Hardware

I resolved the issue without downgrading.

  1. Delete ZHA integration
  2. Hardware reboot
  3. Add ZHA integration Note: all ZigBee devices are back online but I lost Device and Entity renaming. I had to rename them again to what they were. If this works for you no need to downgrade.

@NAP141, the comment above solved it for me. I configured the Zigbee integration to use “the other” serial device (now ttyAMA0). Worked for both ZHA and Deconz.

For ZHA, remove the integration and add it again.

For Deconz, go to Add-Ons -> deCONZ -> Configuration and select the correct device.

…not for me, though; see above: https://github.com/home-assistant/core/issues/71950#issuecomment-1128182180

After removing and adding the ZHA integration again, the setup offered /dev/ttyAMA0 as default, but no connection can be made. /dev/ttyS0 was shown as device, but also resulted in no connection. Downgrading to hassio 7.6 instantly solves this problem (see above).

@cahaverl With hassio, there is no “invariant device name”: /dev/serial is simply empty…

NB: After reverting to Hassio 7 Build 6 from haos_rpi4-64-7.6.img.xz, ZHA works flawlessly with Raspbee II.

Back to business: Solved for me by appending the following lines to config.txt in root partition (via Windows PC):

enable_uart=1
dtoverlay=disable-bt

After reboot, change “/dev/ttyS0” to “/dev/ttyAMA0” in /config/.storage/core.config_entries (used Studio Code Server plugin with disabled “.storage”-exclusion via settings):

                "data": {
                    "device": {
                        "path": "/dev/ttyAMA0"
                    },
                    "radio_type": "deconz"
                },

The config.txt of the rasbian provided by dresden electronics says:

dtoverlay=pi3-miniuart-bt-overlay
enable_uart=1

So, I am a little confused.

The pi3- prefixed overlays have been removed long time ago (see raspberrypi/linux@e8d411f). In theory, this should have stopped working in 7.x already. If rpi3- prefixed overlays did work, then it was maybe some work around Raspberry Pi had in the firmware, I am not sure.

In any case, please remove this prefix. For those using RaspBee II, it’s likely that this prefix prevented the overlay from being applied correctly, which leads to a different device name for the RaspBee II.

This worked for me. Thank you very much. 😃

config_entries raspbee

As far as I can tell the config_entries file is basically a record of all devices and where to find them. If you scroll down you should be able to find the entry for the raspbee as seen above. The main line you need to change is the “path:” string, however, I also changed my “title:” string for consistency sake. The title is what is shown in the interface throughout home assistant.

If it helps, my error log is exactly the same as pes001. I am on Raspberry Pi3 and in System / Hardware / All Hardware

I see the following:

Drop Down ttyAMA0

Subsystem: tty Device path: /dev/ttyAMA0 Attributes: DEVLINKS: /dev/serial0 DEVNAME: /dev/ttyAMA0 DEVPATH: /devices/platform/soc/3f201000.serial/tty/ttyAMA0 MAJOR: ‘204’ MINOR: ‘64’ SUBSYSTEM: tty TAGS: ‘:systemd:’ USEC_INITIALIZED: ‘7806671’

Drop down tyS0

Subsystem: tty Device path: /dev/ttyS0 Attributes: DEVLINKS: /dev/serial1 DEVNAME: /dev/ttyS0 DEVPATH: /devices/platform/soc/3f215040.serial/tty/ttyS0 MAJOR: ‘4’ MINOR: ‘64’ SUBSYSTEM: tty TAGS: ‘:systemd:’ USEC_INITIALIZED: ‘7826601’

Power cycle raspBee. Make sure the configuration to expose the serial port on GPIO header is still in place.

Sorry, power cycle don´t work. The “configuration to expose” IS in place:

enable_uart=1
dtoverlay=pi3-disable-bt

Had the same issue. For me it worked by changing the device in the deCONZ app-configuration.

In other words: what is “the deCONZ app-configuration”, since PHOSCON isn ´t installed!? I´m relying on ZHA only…

Had the same issue. For me it worked by changing the device in the deCONZ app-configuration.

How did you do that?