Zigbee stopped working... Depressed

HI,

I spend the best part of two weeks programming Home Assistant 4 months ago. After reading some stories of systems going down I put a simple USB battery backup on it, as NEVER want to tough it again. So much to remember… All ran fine until the other night the Immersion heater blew the RCD. The Rasberry Pi everything was running on kept going but I noticed the green light was no longer on the Zigbee2MQTT Z-Stack CC2531 with USB Interface. Rebooted and most of the Zigbee devices showed as unavailable. Then at some point later they all became unavailable. Just tried a new Zigbee2MQTT Z-Stack CC2531 but the light went off after a while, and not sure if it would recognise the devices since its a different controller. Despite being a computer programmer it not my area of expertise, and I struggle with this UNIX based stuff.

Tried searching, and many articles seem out of date. Tried upgrading HS. Restored to a know good backup. No joy… Mistifying. Nothing had been changed.

tried this code here How to switch to the dev branch | zigbee2mqtt.io but said “sudo” is not a command in terminal. Not sure why.

The first error in the log says:
Logger: custom_components.hacs
Source: custom_components/hacs/repositories/integration.py:64
Integration: HACS (documentation, issues)
First occurred: 2:40:38 PM (1 occurrences)
Last logged: 2:40:38 PM

<Integration hacs/integration> Could not read manifest.json [encoding without a string argument]

AND THEN

Logger: homeassistant.setup
Source: setup.py:138
First occurred: 2:41:25 PM (1 occurrences)
Last logged: 2:41:25 PM

Setup failed for mqtt: Integration failed to initialize.

Which I guess is the start of the problem. Not sure if the two are connected

Any ideas?

If I swap the Zigbee CC2531 for a new one do I lose the connectivity to current devices?

No. You can switch them without having to repair.

This message sounds like the root of the problem. In fact based on that message I’m not convinced there is anything wrong with Zigbee2MQTT at all. My guess its its chugging along happily not realizing no one is listening to it.

Keep in mind with Z2M the way it works is this:

  1. Z2M receives messages from your many Zigbee devices
  2. Z2M translates those messages into MQTT messages and writes them to your MQTT broker
  3. HA reads messages from your MQTT broker and translates those into state_changed events
  4. Your lights, switches, etc. update in HA as it updates their state

Since HA can’t talk to your broker then #3 and #4 are not going to work. But that doesn’t say anything about #1 and #2, those steps may be working just fine.

So please do the following:

  1. Go to your Zigbee2MQTT logs. If you have a supervised install you can get to those by going to Supervisor → Zigbee2MQTT → logs. If you have a container install then you can use docker logs. Does everything look like its working correctly or is there a stream of errors about being unable to connect to your MQTT broker?
  2. If Z2M looks like it cannot connect to your broker then go to your MQTT broker. What do its logs say? Sounds like you didn’t change anything so what did change? Did an update break it? Did it crash? Did it fail to start for some reason and now has to be manually started? Hopefully logs give insight.
  3. If Z2M looks like its working fine then the problem is with HA. What’s your MQTT configuration look like? You said you just updated HA, did you review the breaking changes related to MQTT in recent updates? Any of them affect you? Did something about your network configuration changed that makes HA unable to talk to the broker?

There’s a lot of possible things wrong so step one is narrow the scope and determine if its your broker or HA. There’s no evidence in what you’ve sent that the problem is Z2M so I would stop focusing on and adjusting that.

1 Like

Forgive me, but is the inbuilt ZHA (Zigbee Home Automation) integration different to the older Zigbee2MQTT?

And I guess no MQTT broker either.

As I don’t see Supervisor → Zigbee2MQTT → logs.’

Just noticed that HA is displaying the values from a temperature sensor in the Garden, but none of several closer to the Zigbee receiver. Not sure how I see any logs regarding inbuilt ZHA (Zigbee Home Automation) integration.

Does not want to pair any new or orignal devices if I put into pairing mode either

Fond this log:

2021-04-28 18:39:48 ERROR (MainThread) [homeassistant.components.zha.core.gateway] Couldn't start ZNP = Texas Instruments Z-Stack ZNP protocol: CC253x, CC26x2, CC13x2 coordinator
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 157, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.8/site-packages/zigpy/application.py", line 69, in new
    await app.startup(auto_form)
  File "/usr/local/lib/python3.8/site-packages/zigpy_znp/zigbee/application.py", line 206, in startup
    return await self._startup(auto_form=auto_form)
  File "/usr/local/lib/python3.8/site-packages/zigpy_znp/zigbee/application.py", line 215, in _startup
    await znp.connect()
  File "/usr/local/lib/python3.8/site-packages/zigpy_znp/api.py", line 199, in connect
    self._uart = await uart.connect(self._config[conf.CONF_DEVICE], self)
  File "/usr/local/lib/python3.8/site-packages/zigpy_znp/uart.py", line 169, in connect
    transport.serial.dtr = False
  File "/usr/local/lib/python3.8/site-packages/serial/serialutil.py", line 473, in dtr
    self._update_dtr_state()
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 715, in _update_dtr_state
    fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
TimeoutError: [Errno 110] Operation timed out
2021-04-28 18:39:48 WARNING (MainThread) [homeassistant.config_entries] Config entry 'TI CC2531 USB CDC, s/n: __0X00124B0018E332F4 - Texas Instruments' for zha integration not ready yet. Retrying in 5 seconds
2021-04-28 18:39:49 ERROR (MainThread) [custom_components.hacs] <Integration hacs/integration> Could not read manifest.json [encoding without a string argument]

Also unplugged the USB card and plugged back in and got:

Logger: zigpy_znp.api
Source: /usr/local/lib/python3.8/site-packages/zigpy_znp/api.py:368
First occurred: 6:55:14 PM (13 occurrences)
Last logged: 6:55:49 PM

Received an unhandled command: ZDO.MgmtNWKUpdateNotify.Callback(Src=0x72E1, Status=<Status.SUCCESS: 0>, ScannedChannels=<Channels.ALL_CHANNELS: 134215680>, TotalTransmissions=20, TransmissionFailures=17, EnergyValues=[246, 190, 221, 187, 186, 173, 200, 202, 205, 195, 182, 194, 184, 208, 192, 177])
Received an unhandled command: ZDO.MgmtNWKUpdateNotify.Callback(Src=0x1A7C, Status=<Status.SUCCESS: 0>, ScannedChannels=<Channels.ALL_CHANNELS: 134215680>, TotalTransmissions=20, TransmissionFailures=10, EnergyValues=[233, 196, 206, 188, 199, 188, 177, 200, 174, 200, 192, 195, 181, 176, 209, 209])
Received an unhandled command: ZDO.MgmtNWKUpdateNotify.Callback(Src=0x8A39, Status=<Status.SUCCESS: 0>, ScannedChannels=<Channels.ALL_CHANNELS: 134215680>, TotalTransmissions=20, TransmissionFailures=19, EnergyValues=[185, 189, 178, 169, 190, 186, 193, 216, 167, 168, 167, 193, 192, 165, 172, 188])
Received an unhandled command: ZDO.MgmtNWKUpdateNotify.Callback(Src=0xD77B, Status=<Status.SUCCESS: 0>, ScannedChannels=<Channels.ALL_CHANNELS: 134215680>, TotalTransmissions=20, TransmissionFailures=19, EnergyValues=[188, 163, 187, 167, 174, 179, 170, 182, 188, 180, 178, 174, 192, 180, 164, 193])
Received an unhandled command: ZDO.MgmtNWKUpdateNotify.Callback(Src=0x6EEA, Status=<Status.SUCCESS: 0>, ScannedChannels=<Channels.ALL_CHANNELS: 134215680>, TotalTransmissions=20, TransmissionFailures=12, EnergyValues=[199, 185, 198, 189, 204, 185, 204, 204, 205, 199, 201, 201, 176, 181, 196, 204])

Ah. Yes the native ZHA integration is not the same as Zigbee2MQTT. That one doesn’t use MQTT at all so that error about the broker is probably unrelated.

Unfortunately this is now looking a bit beyond me. I don’t use the ZHA integration and am definitely not familiar with the details of how it interacts with the coordinator. Are you on the HA discord? There’s a channel specifically for Zigbee in there. I feel like in this situation it might be best to hop on there and share what you’re seeing. This seems like something that might need a bit of back and forth to get resolved so chat might work better then the forum.

I for one am thoroughly confused about whether you are using ZHA or zigbee2mqtt.

Please clarify.

Thanks for the help… I will follow your suggestion

ZHA… But perhaps I did install Zigbee2MQTT at some point and then uninstalled but it still leaves a message in logs. Christ it’s a minefield unless you are on every day… Thanks everyone

waves
ADMIN - Admin over here. Are bots using ChatGPT now? Because there is enough in that reply that it vaguely sounds related to the thread. But it’s obviously not.

1 Like