ZHA is not stable please help

I’ve had IKEA outlets in my mesh for over a year never had any issues on Smartthings why would they now be causing issues on HA?

SmartThings does a LOT behind the scenes to abstract problems away from the end user. For instance, real chatty devices will have messages squashed or rate limited to contain the chaos. HA doesn’t do any of that (particularly through the ZHA integration). It really boils down to target audience. SmartThings tries to be the hub that is built “for the masses” while HA is still in development and geared more towards those who know tech.

For instance, if you look through the older SmartThings forums, you’ll see a lot of users that were using XBees and sniffing their mesh and then exposing a bunch of points where the ST coordinator would just quash messages for seemingly no reason at all. This would lead to delays in automations running.

3 Likes

Just be aware of you have Aqara or Xiaomi, some of those outlets will knock them offline.

1 Like

I stay well away from them. I’d rather spend more for sensors and not have to chase offline cheap crap. Lol

1 Like

Hi @code-in-progress. Thanks for your explanation about the whole ZHA thing. I was running deconz for a year and didn’t have such a problem. However since I switched to ZHA about a week ago I’ve got so many problems with devices losing connection. I have ~6 IKEA bulbs and just 1 outlet in my home and many aqara sensors. With ZHA this setup is incredibly unstable. Do you know how can I increase stability of the network? If there’s no other options it might worth checking the possibility to switch back to deconz. It looks like you have experience with that stuff, what do you think?

Do you happen to know if this is only something the Ikea outlets do, or do their lights do this as well? I’m currently using only Hue lights, but after switching to ZHA it troubles me that they don’t report their status back right away, so I want to try another brand and the Ikea ones seam reasonably priced. But I ofcourse don’t want them if they are going to disrupt my network.

Regarding knowing the technology and optimize Zigbee network mesh + devices for stability, checkout:

https://www.reddit.com/r/homeassistant/comments/eym1h8/state_of_zigbee_in_2020_zha_z2m_deconz/fgisfu3/

1 Like

This effectively a great post. Now I noticed that a ZHA coordinator can have a maximum 32 child devices and 6 per router. I have currently 50+ zigbee devices in my network. I have some stabilities issues but currently it’s up for a few days. Anything I should do specifically ?
I’m planning to extend my network further as I want to eliminate my HUE hub. That said, I have a lot of trouble with getting the IKEA and HUE bulbs into ZHA. Any suggestions ?

If you have a newer more powerful Zigbee coordinator hardware (newer Silicon Labs EFR32 Series 1/2, Texas Instruments CC26X2 and CC1352, or whatever chip is used in ConBee II, with the latest firmware) then you should be able to have a couple of hundred child devices without any issues.

But you should first understand that there is a difference between a “direct child” device and “child”. Zigpy used by ZHA that has the limitation of 32 child devices, however, that limitation only applies to “direct child”, meaning child devices directly connected to the Zigbee coordinator without going through a router device.

As long as you meet the requirement of newer more powerful Zigbee coordinator hardware and firmware then just make sure that you also add children to your routers too and not only to your Zigbee coordinator. The reason for this is that the idea with a Zigbee mesh network is that only your permanently powered devices in each room acts as Zigbee routers and all other devices acts as their children. This concept of mesh interconnected devices is what extends the range of a Zigbee network.

Suggest you check out this thread about “advice on Zigbee range extending” as range-extending via the use of Zigbee routers (a.k.a. repeaters) is one of the major things that make a Zigbee network stable.

1 Like

Under the advice of the ZHA team, I bought a new coordinator from ELELABS and waiting now for it to arrive. Hope this will sort out my problems

FYI, an alternative is the Sonoff ZBBridge Gateway flashed with other firmware for remote serial access. It has a more powerful Zigbee chip, plus being a Zigbee to WiFi bridge means that can place it better.

@hedda This is the tutorial I used and the Zigbee gateway I have been running on since the last few weeks. It crashed totally last sunday - no recovery. Support indicated to move away from this one. Also it looks like the community doesn’t use it. Instability with the wifi. Hence I moved away

@Hedda I’ve successful got all my zigbee devices paired in Home Assistant but for some I notice a delay (most likely due to the distance to the coordinator).
I’m now looking for a way to get my CC2531 to be a sniffing device so I can optimize my network. However I haven’t been really successful till now. Any advice you can give ?
Jens

Zigbee2MQTT community have much more tips on using CC2531 with sniffing firmware and Wireshark, however before you do that suggest you install Zigzag (and ZHA-MAP) to help optimize Zigbee routing.

Note that some brands of Zigbee devices (like Xiaomi/Aqara) will not route though some other brands. If you have a lot of Xiaomi/Aqara devices then recommend using CC2530 or CC2531 as Zigbee routers.

Previously I’ve installed this addon previously but didn’t dare to do this time based on the feedback for elelabs. I got the wireshark to work with the different needed encryption keys. Now trying to figure out more about my network. Anything you can suggest ?

By the way, my general tips on improving Zigbee network range which might relieve issue with delays:

  1. Add more Zigbee routers between the far away devices and the next nearest router, distributing more Zigbee routers around areas with poorer reception. Zigbee network topology uses a “mesh network” design which means that each device that acts as a Zigbee router will extend the range of your Zigbee network. While there are exceptions, as a rule of thumb, almost all permanently powered devices will serve as a router. This is a part of Zigbee design concept, simple add more powered permanently Zigbee devices to get better coverage, (there are purpose-specific Zigbee routers which you can find by doing a community search for “Zigbee signal repeater” or “Zigbee range extender”). Devices that can not act as routers are known as “end devices” and you should know that some end device models from brands like Xiaomi/Aqara have issues connecting through routers.
  2. Utilize a USB extension cable to move Zigbee coordinator adapter and place your Zigbee coordinator adapter in a sensible position, away from WiFi access-points/routers or other sources of 2.4GHz signals in a location that it is relatively free from strong signal interference. The best location will depend on your building’s floorplan though normally you want to place it somewhere in the middle. Building materials are also very relative as example dense/thick concrete, bricks, masonry, etc. dampen will all wireless signals and therefore it is best to place your Zigbee coordinator adapter some distance from walls, ceilings and floors. You could also try different orientation of your Zigbee antenna (or your whole Zigbee coordinator adapter if it has an internal antenna). This is because the connection between the Zigbee coordinator radio and your other devices also depends on the way the antenna oriented in space. Note! A bad USB extension cable may lead to connection issues between the system and the Zigbee coordinator adapter, symptoms of this are disconnection messages.
  3. Check your WiFi access-points/routers channels in use to see if your router/access point is overlapping the channel your Zigbee network is using. If so change the channel of the access-points/routers and lock it. It will normally be easier than changing the channel of your Zigbee network and then you will have to re-join/re-pair all of your Zigbee devices. A busy WiFi access-points/routers that are operating the same frequency range (overlapping channels) as your Zigbee coordinator will drown out the Zigbee traffic, and even more so if they are located close to each other. See this article for WiFi and Zigbee channels coexistance to avoid using overlapping frequency ranges.
  4. Update the firmware on your Zigbee coordinator adapter and your Zigbee devices. Note that depending on your hardware the latest Zigbee coordinator firmware might not always be the one recommended by the community so it is advised to ask before upgrading.
  5. If you Zigbee coordinator adapter a removable antenna with an SMA-connector then you have the option of buying a high-gain antenna as an upgrade. In addition, you also have the option to use an antenna extension-cable if needed (though for various reasons that is not a good alternative to only using a USB extension cable with your Zigbee coordinator adapter if possible). This should really only be needed if you are trying to cover a long distance, like to another building or very dense/thick walls, ceilings and floors.
  6. Buy more powerful Zigbee radio hardware with better radio range, preferably with an external antenna. If you are not only experimenting but want a permanently stable and healthy Zigbee network with potentially many devices then you should consider upgrading to a more powerful Zigbee coordinator USB adapter. Generally, those with an external antenna will have better range, therefore you will also want to avoid buying an internal adapter unless it has an external antenna.

The fact is that bad signal reception can be due to many different things and experienced Zigbee users in the community will normally advise that there are a few simple fundamental things that you should really attempt to do first in order to better optimize your Zigbee devices equipment which can resolve many basic problems related to signal strength or interference issues. Note that there are always exceptions, however, if possible to try to follow at least some of these general recommendations before you take more advanced steps like reporting issues to developers and submitting debug logs. Just following these simple tips below should help improve signal strength and reduce signal interference which can normally many problems with a Zigbee network.

1 Like

@Hedda, since your last post. I moved towards Elelabs (followed the different suggestions by the community) as my main coordinator and about 90+ zigbee devices (most of these are connected to the mains)
This was a whole journey. As I moved towards a dongle, I had trouble with VirtualBox/windows. After I got it to work finally, the results weren’t that great. A lot of instability which led me to move towards Proxmox and a 2m USB cable (located on the bottom of the stairs but clean line of sight to 1st and 2nd floor. Better results but still instability on devices on the 2nd floor (mostly Feibit and A3). Mostly routing type of devices and none of the routing devices actually routes any traffic. This came out of my sniffing exercise with Wireshark. I spend days trying to push the network to do this without success. Based on what I’ve read, a self healing network will do whatever it wants to do.
Most of the endpoints work quite well, sometimes one goes off mostly further from the coordinator.
My conclusions but need some advice from a specialist like yourself. The routers that I have are

  • Lights : HUE, IKEA, A3

  • In switches : A3 (in line) and Feibit

  • Curtain switches : _TYZB01_dazsid15

for end-points I have HUE switches, Aqara (Opple, Smoke sensors, window sensors), Tuya window sensors, motion sensors from Sonoff. I’m waiting for additional switches from Lonsonho and Elelabs.

I’ve now put my HUE hub on the 2nd floor to take some load from Elelabs for the devices that were problematic (Feibit and A3 devices). The only issue I’m facing is the update of the state of the device has significant latency (meaning when you press the switch, it only gets updated a 10+ seconds later).
One of the feibit devices that is not responding at all, I’m planning to change with a new one.

Questions remaining are

  1. Is HUE going to interfere with the ZHA network ?

  2. Is ZHA really the network for me with 100+ devices in the end ? Or going towards Z2M (with a ZZH! stick) would be a better idea. As I’m intending to run it on a separate RPI, it won’t get disrupted by the rebooting of the HA machine every other day due to updates or whatever.

  3. Should I add separate routers to the mix ? If so, is IKEA (currently closed due to Corona) the way to go or do you think TUYA is a better or similar solution ?

i am in the same boat as you re. i was a user of deconz for many years, but i read good thing about zha, so i decided to switch to zha. with deconz, i ll probably need to restart once a month due to devices losing connection, but with zha, i find it requires reload every two days. now i m thinking of going back to deconz if cant manage to figure this out, as apparently for me, i had better experience with deconz… btw i use conbee 2.

Try zigbee2mqtt! works much more stable than zha or deconz. Yet to repair all the devices but this pain is only once. It works with conbee 2 btw. That’s how I’m running it.

Every since adding the following to my zha section in the configuration.yaml everything has been super stable.

zigpy_config:
source_routing: true