ZHA Mess Network

*Mesh Network. Apologies, however, the title is not incorrect. I have more repeaters (plugs) than I do endpoints (bulbs) in my network. I have a 3100sq/ft home running HA on an RPi4 4Gb 250Gb SDD OS drive mod and HUSBZB-1 on a 6ft extension around a corner from the RPi. All plugs are Sengled E1C-NB7 and all bulbs are Sengled E11-N1EA. Honestly I’ve had nothing but issues from the get go. I programmed up a zigbee sniffer, but I have no idea what I’m looking at, as I’m a hardware guy not a software guy. Any suggestions to improve the stability of my network would be MASSIVELY appreciated. I’ve done just about everything except upgrade to a NUC, which I cannot afford at this time. I have not been able to successfully change the zigbee channel on the controller. Every guide that I tried to use failed to change the channel. Regardless, most everything works…eventually. It can take devices up to 10 seconds (or sometimes infinity seconds) to change state. Scenes are completely unreliable. Automations are completely unreliable. I’ve tried reinstalling HA from scratch. It did not seem to improve anything other than my ability to waste time. I’m going crazy here.

Somewhat related question: Is there a way to update the firmware on these bulbs and plugs OTA via HA? It’s a big ask, but it would be awesome. I do not own a Sengled hub nor do I plan to buy one.

Have you considered running a VM off of a current computer that you own to see if that is really the problem. I did that when I was first setting up HA as I had HomeSeer running on a used old server. Moving to a VM will let you know if the Pi is the problem and won’t cost you anything.

I don’t run zigbee but do run z-wave. Are you using ZHA or MQTT? Others may be able to give you advice here.

I am running ZHA, apologies for omitting that from the original post. I have not tried it in a VM yet. I do have an old laptop that I could fire up. Thank you, I’ll give it a shot!

I’m running ZHA on a PI3b+ with a ConbeeII transceiver. Approx. 90 devices, 3/4 of them hardwired plugs/switches/bulbs the rest are sensors. All is working fine now after lots of piddling around with occasional bratty behavior of occasional devices. One thing that I learned the hard way is when you move/add/subtract something… ya gotta give your mesh some time to heal for consistent operations again… and sometimes that can take a day or two.
Too many late evenings I have quit piddling for the night and magicly, the next morning, that brat device is working flawlessly.

I really appreciate the info, but there has to be something straight up wrong with my network to have that much latency. In several instances, repeating plugs are less than 5 feet from another plug and yet the ping time is well over 100ms. I do have a Conbee stick that I’ve never used, but I don’t want to go through the hassle of re-pairing everything to the Conbee if it’s just going to end up like the HUSBZB. I’d really like to figure out what is causing my latency issues. It’s been this way from day 1 and no amount of piddling has stabilized anything whatsoever.

Do you have source routing enabled in your ZHA config?

If not, look into doing that as your next step in troubleshooting.

I do not think so, no. I have no idea how to turn it on. I shall use my best Google Foo. I should have some time in the next few days. What should I do once I enable it?

Alright, I believe that I have enabled it by adding:

# Zigbee
zha:
  zigpy_config:
    source_routing: true
    ezsp_config:
      CONFIG_SOURCE_ROUTE_TABLE_SIZE: 75

to my configuration.yaml file. I have absolutely no idea what to do at this point. I have a USB sniffer available that I programmed a couple of weeks ago. I can connect and see everything via WireShark but I don’t know what to do after that, either. I’m dangerous enough with code that I can futz my way through most of these things. The tutorials are absolutely fantastic. The explanations as to what/why you are doing what you are doing are…not. They’re there, but you have to slog through page after page of possibly-outdated wiki entries and I’m lucky if I have more than a couple of hours to work on my system per week.

You are off to a good start.

Make sure CONFIG_SOURCE_ROUTE_TABLE_SIZE is greater than the number of Zigbee devices that you have. A rule of thumb I use is (n + 10) where n is the actual number of devices plus another 10 to give room for a little growth.

zha:
  zigpy_config:
    source_routing: true
    ezsp_config:
        CONFIG_SOURCE_ROUTE_TABLE_SIZE: 75
        CONFIG_NEIGHBOR_TABLE_SIZE: 16
        CONFIG_MAX_END_DEVICE_CHILDREN: 16
        CONFIG_BINDING_TABLE_SIZE: 32
        CONFIG_ROUTE_TABLE_SIZE: 32

The other options are just for tuning and may not have any noticeable impact on your system.

Give you system a day to settle down and report back on how it’s running.

Thank you so much for your help! I have added the lines to my config and restarted. I have CONFIG_SOURCE_ROUTE_TABLE_SIZE set to 75 because I have 59 actual devices on the network, 5 more waiting to be installed and I’m giving myself a 10 device buffer.

Would you mind possibly explaining what each does a little bit better than what I can find in forums or wikis? What are the default values for all of these and why do you want to change them? What does each impact?

I was finally able to get ZBoss working correctly but I only have a faint idea of what I’m looking at and I have absolutely no idea what I’m looking for. I am definitely noticing that there is a decent amount of traffic on the mesh at any given time. It almost seems like too much traffic, but I have no frame of reference, either.

Now I’m noticing a phantom Zigbee device showing up in my list. I’ve deleted it five times now over the course of three days and it keeps popping back up. It’s never available but shows history of being “ON” and “OFF” as well. Here is a screen shot of the visualizer after several days of nominal use.


As you can see not much has improved. Some of my repeaters are trying to connect to other repeaters in opposite corners of the house as well on opposite floors. I wish there was a way that you could tell each device to only connect with others if it can get a “green” connection.

Between this issue and the issue where everything hangs for 1 to 5 seconds before performing an action I cannot rely on HA much at all. I’m using HA Cloud for convenience. Tell Alexa to turn on a light and the ring spins for 1 to 5 seconds, followed by, “Sorry, [device] isn’t responding.” usually while the device then performs the action. Not always, though. I cannot trust the state reporting in the Amazon Alexa app, either. Every time I log into the app it seems to “rediscover” my devices.

Have you looked at interference as a possibility? Do you have ANY USB 3.0 ports in use anywhere in the house? You are using an extension cable, which is good. But what about other sources?

An example that killed my network, I plugged an Echo Dot directly into a USB 3.0 port for power on an Xbox One console. It was always powered, so thought it would be put to use. My network became insanely unreliable within a day. I traced the Echo Dot to being my only change, so unplugged it. It took about a week for the damage to be undone and the mesh to heal up. I’ve since plugged that Dot into a regular power source in the exact same location and now it’s fine.

Also, while you’ve been unable to change your ZigBee channel, what about your router’s 2.4Ghz channel?

I bumped the router up to channel 11 which is the farthest away from Zigbee channel 15 that I can get it. I did that a couple of months ago with no noticeable improvements or deterioration of the mesh network. I am not using any USB3.0 devices that I wasn’t using before this issue began. It’s almost acting like I need to completely wipe the zigbee tables and let the devices rewrite them. The phantom device that keeps showing up in my list is suggesting to me that something is messed up with the tables, but I don’t know how to fix it.

Hi @Delorean14,

Did you ever get this issue fixed? I’m having the same problem. I have a SONOFF 3D dongle plus installed and that has worked great for a couple of months. Flawless actually. After 2022.12.0 however it is totally screwed up. I keep getting devices added that are not mine and that act the way you mentioned in your first post.

I’m running HA supervised on a 256 SSD and using ZHA for Zigbee network.