Sonoff coordinator + hue hub, devices unavailable. Which path does my sent commands take?

I’m trying to troubleshoot my zigbee network. I’ll try to summarize in a list in the hopes that it will increase readability:

Background:

  • I was having issues with a node red flow, a motion sensor was targeting a group of lights but often failing to switch them off afterwards.
  • When I checked the logbook the lights were often listed as unavailable. I started out with a hue hub, and when I wanted to try out HA I got a Rpi a sonoff zigbee 3.0 dongle. So almost all of my lights are paired to the hue hub, and HA accesses the lights via the hue integration.
  • I noticed that even though HA often lists the lights as unavailable, I never have any trouble controlling them from the hue app itself. I had both HA and the hue hub in a corner right next to the router so after reading the zigbee + wifi coexistance guide here on the forum i decided to start moving things around.
  • I tried moving the HA sonoff dongle up to ~5 metres away, but if anything the problems are actually increasing.
  • I had actually totally forgotten about the hue hub at all up to this point, before reading up on it I thought that the HA sonoff dongle did all the communication directly with directly the hue lights and I just kept the hue hub because my SO liked using the hue app.

Question:

  • I’m trying to understand how my commands travel, when HA tells a light to turn on/off for example. Does the image below look correct?

    I installed a MQTT broker as per a “get started with HA” guide, but I’m not using zigbee2mqtt so I’m not actually sure if my broker is doing anything or not(?). Anyway, when I send a command via HA does the message need to travel to the hue hub, which then sends the message to the lights? If so my issues are likely related to a failure to send the message to the hue hub, which also might explains why the hue hub never have any issues controlling the lights whereas HA often lists them as unavailable.

What still doesn’t make sense is that there are specific lights that are unavailable, they are in different places around the house and the one with the most issues are located about 3 metres away from both the hue hub and the sonoff dongle.

You can run a Hue hub and a Zigbee dongle at the same time, but your lights need to be on one or the other - they can’t belong to more than one Zigbee network.

As far as the question in the title goes… If you’re talking about the Zigbee network, the answer is “the most efficient one”. Messages bounce around between mains-powered router devices until they reach their destination and routes can be different every time.

To diagnose problems, to start with I’d suggest turning off either the Hue hub or the dongle. If you split your lights between both you will have two weak networks, which just makes things confusing.