Status of ZHA integration?

  • and it turns-out it’s happening very frequently ! I have an issue to sort-out obviously.

I found an old powered USB hub (probably only USB 1 it’s that old) and connected the USB hard drive to that. No Raspberry Pi power supply issues for 7 hours and counting - previously was struggling to go an hour). Have a USB 3 powered hub on order (boot-up was painfully slow through the old hub).

USB 3 hub may cause more problems than it solves - they create a lot of interference. You really need a USB 2.0.

Thinking I had found the problem, I had disabled debug logging on ZHA :frowning:

I arrived back at the computer to find every single Zigbee device was unavailable, and just caught ZHA saying “Initialising” - then everything came good.

Seems maybe ZHA is the issue.

I have re-enabled debug logging.

Hi Ian,

Can you confirm the voltage and amperage of the power supply you’re using to power the Pi ?
Power (Watts) = Volts X Amps
Have a read around on the web for recommendations

https://forums.raspberrypi.com/viewtopic.php?t=270378

I can’t without shutting the system down, but I bought a power supply specific for the Pi4. Also, since using the powered USB hub for the hard drive, I have had no more power errors reported by the raspberry Pi Power Supply Checker integration.

I shut HA down and checked the PSU specs: it’s a Labists PSU, 5V @ 3A. All it powers other than the Pi4 is the NabuCase SkyConnect Zigbee Coordinator. The other connections are to the (now powered) USB hub for the hard drive, and a USB data connection to the UPS for UPS status.

I had another Zigbee shutdown today which I captured with the ZHA logging on. My interpretation of what is happening is that ZHA is unable to detect the ApplicationType.EZSP. My guess is that this is something inside the SkyConnect and it is having trouble talking to the SkyConnect to retrieve the information.

Probably the most likely cause of this problem might be noise on the USB interface. I have confirmed that the SkyConnect is plugged into a USB 2 port. The next step will be to wait for my 3m extension cable to arrive and see if that helps.

I wish I hadn’t shut it down to get the PSU specs now - won’t come back up again !

Edit: cut-out the old USB 1 hub and all good (might leave it that way until the new hub arrives - and suffer the power glitches)

Status update:

  1. Installed the SkyConnect on my 3m USB3 extension cable (plugged into a USB-2 port on the Pi) and it doesn’t seem to have helped at all.

  2. USB 3 hub arrived and Pi wouldn’t boot at all until I cut the power to the USB 5V pin to stop the hub back-feeding the Pi. Once I did that, it started to boot, then got to a point where it couldn’t read off the hard disc. I have put that hub aside and ordered another (different) one. Mean-time, the USB HD is directly connected to a USB 3 port on the Pi, but for some unknown reason, the RPi Power Status is not reporting any power issues (as it was when I first started investigating the problem).

I have looked at many examples of the Zigbee network crash & recovery in the logfiles. The first sign of trouble is always something like this: 2024-03-10 12:54:34.298 ERROR (bellows.thread_0) [bellows.uart] Lost serial connection: ConnectionResetError(‘Failed to transmit ASH frame after 4 retries’). The fact that it is failing to send (doesn’t get an Ack) suggests to me this is a problem between the Pi/HA and the SkyConnect module itself (rather than failing to get a response back from a device over the wireless).

I have the same with ZHA going into initializing after running for a while. restarting HA clears it. I had enabled debug logging for a while but then all was fine :-S… Is there a way to check if ZHA (or any other integration for that matter) is in state ‘initializing’ (so that I can perhaps re-start HA after ZHA being in initialising state for 30 min or so?

You would think it wouldn’t be too hard to make the integration status (as seen in Settings/Integrations) available as an entity to HA. It would be useful to send oneself an email to alert me of a problem that needs to be fixed.

I would like to come back to the very simple question, how can I check with a script (Automation/Node-RED) whether my ZHA/MQTT/Homematic network is down (for whatever reason)?

I also would not like to get 20+ messages of devices which are not available anymore (I check that), I rather would like to notify myself if the network is down.

In addition to that, for whatever reason my ZHA network “initialize” itself several times a month. It is unavailable for a few seconds and than availability again. Avoiding messages for every unavailable device in the case, that the device is only unavailable for a view seconds, needs to be reflected in any script which checks for unavailable devices (I check for 5 minutes unavailability, before I send myself a message).

yep - the question that started this discussion.

My network keeps going down a few times per week for up to 5 or 10 minutes at a time.

Does the ZHA author read this thread? If so, does the annotated diagnostics I reported indicate anything useful - or a place in the code where some intervention could be made ?

I’ve tried delaying reporting on individual device failures until I have time to see whether they are ALL down. (In whch case, I just report the system is down and suppress the individual errors - but sometimes that doesn’t work and I get a flood of emails)