Z2M + Many Hue lights, random drop-outs

Hi all, I have a couple years’ experience playing with HA, but this is my first real, big, serious deployment. I have an HA Yellow with a ZBT-2 attached. I just did a remodel and installed 55 hue wafer lights (HWCA Slim Downlight US 6-INCH R579573-6). I paired them all and OTA updated them on the bench before putting them in, and they all behaved normally. Now that they’re all installed in the house, each light has something like 60% chance of being online at any given time.

Z2M comes up fine, and if I have availability turned on, I start to see most of them coming online…up to around 40-45 most times…and then some start dropping out. Usually lands around 20-25 connected. There are a few specific ones that seem to never show up, but nearly all of them do go online sometimes…but when they drop out, they’re definitely unreachable, it’s not just the availability showing wrong, commands will fail undeliverable.

The coordinator has 16 siblings every time I check. Density is super high, all these are in less than 2000sqft. I have tried TX power at 20, and also at 12, with no changes. I’m kind of at a loss, any advice would be most appreciated.

Are you ensuring that power is always present to these lights?

If any are switched off that can cause massive connection ripple effects on the mesh (assuming they are actually routing devices and not end devices). What does your zigbee map look like?

Well, they have certainly been turned off and on plenty over the last few weeks. But they have been powered continuously all day today, at least 8 hours without turning any of them off.

Here’s a pic of one of my zigbee maps. I apparently don’t know how to interpret it though…it looks like the coordinator only has one connection, but the data view shows it with 16.

I don’t have a practical way to keep all the lights powered all the time from right now. I hope to eventually get them all onto smart switches and have them powered all the time…but it’s going to be several days at least and I can’t leave them on all the time. And at the moment I can’t reliably turn them off from HA.

Wow. Yeah that is one fractured network.

Sticky tape on the switches. Or my favourite: the loop side of hook and loop adhesive tape (“Velcro”). It feels awful and reminds people not to touch the switch. The lights need to always have power.

This is the main reason I recommend not using smart lights and using smart switches/dimmers and dumb lights instead. It you want a bit of colour in the room then use a smart bulb in a table or floor lamp, not the main room lights. Doing it this way also has the advantage of the lights still being able to be manually operated if HA or your zigbee network is down.

This is what your mesh needs to look like:

Also try this mapping tool, it does a better job at showing all the routes than the Z2M map: Zigbee Map - Visualize your mesh network

Thanks for the tips. My eventual setup will have all smart switches (Inovelli blue), and all the lights will be permanently powered. Right now though, I don’t have smart control of the lights and I do need to sleep. So I have to switch them off sometimes. It’s not practical to just tape them on for however long the rest of this build takes. I feel like leaving them on for 12hr today should have been plenty to rule that out as a cause of this problem.

Just now I went around and turned off all the dumb switches. I restarted Z2M, then selectively turned them on room by room. After each room was powered I saw logs for each bulb announcing its brightness, and I could control all the lights in that room. But after I got them all turned on, some of the first ones to pair were no longer responsive.

I feel like it’s running up against some kind of limitation, but I’m at a loss for what.

You don’t have to leave the light on (making photons), you just have to ensure power is always running to the light even with the light set to off (i.e. brightness 0).

When you install your smart switches they should not cut power to the lights. They should operate in “bypass mode” where power is always sent to the light. The light can be controlled by linking the switch to the light with Z2M if it allows it (some manufacturers do not work well together). Or by using HA automations. When the switch turns off send the light.turn_off command and vice versa. However 100% of the time power musts be uninterrupted to the light fitting.

As I said earlier the issue with this is that you lose control of your lights if Z2M or HA is down. this is not a good way automate your lighting. Use dumb bulbs with your smart switches/dimmers and you do not have this issue.

However this:

Points to another issue. Possibly interference. How did you choose your zigbee channel?

What 2.4GHz wifi channels do you or close neighbours use?

I really don’t have any documentation or facts to back this statement, just my experience working with Hue and Zigbee for while (like before Hue existed) :

“I paired them all and OTA updated them on the bench before putting them in”

I always add Zigbee device as near to their final location as possible, and try to “add via” Zigbee routers in proximity.

Zigbee routing and how devices are held in routing tables is probably the nearest thing to “ancient black arts” that there is in Home Automation.

I would reset every device and start with a layout of “x” core routers “added in there final location”, never move these again. You want a basic mesh of router devices that have “the best possible” RF connections to other devices in this core and will offer RF coverage in their “local” areas to devices added around each of these core routers.

Never take one of these “core routers” and move it without removing it from your Zigbee network first (and it needs to be a “clean” removal, not a “forced” one). This statement really goes for any device in a Zigbee network, especially ones acting as routers, which Hue bulbs are.

I do not see that you mention the make of your Coordinator device and its firmware version.

Also, your statement “I don’t have a practical way to keep all the lights powered all the time from right now.” is a recipe for failure when it comes to the “core router” devices I mentioned above that will form the base for your mesh network. I would not start building a network of the size you are doing, if these devices are going to be power cycled randomly or “whenever” someone forgets" and turns off a switch.

Good hunting!

Not my experience at all, unless Hue is a special case. I’ve moved smart plugs to different locations in my house and the routes sort themselves out no problem.

From my experiences, “it works until it does not” on some random day.

Just going to echo the idea that removing power to the devices is likely the cause of your troubles. With a ZBT-2, Philips Hue devices, and Zigbee2MQTT; you can put certain things lower on the diagnosis priority (like poorly implemented protocols).

It’s possible that the Zigbee channel might be causing an issue if it’s overlapping with other things in a similar frequence (Wi-Fi, Thread, etc.). So it probably wouldn’t hurt to check that out. See Zigbee network optimization: a how-to guide for avoiding radio frequency interference + adding Zigbee Router devices (repeaters/extenders) to get a stable Zigbee network mesh with best possible range and coverage by fully utilizing Zigbee mesh networking for an in-depth guide.

I would guess that until you can sort out some way to control the lights physically without removing power to them via a switch, you’re just going to have to live with the lights not working reliably via Zigbee. But you can still control them via switches. Like, yes, it would be ideal for things to self-heal. But the lights still function as lights right now: they turn on and off when you turn the switch on and off, so you’re just missing extra stuff on top of them being usable, functional lights.

You could try adding more routers that do not get turned off around the house. The idea being that maybe the Hue lights will find a route through something else instead of through each other. Sometimes it only takes a few well-placed devices to make a difference. Many smart plugs work as routers (Shelly, ThirdReality, etc.) so that can be an economical approach. You could also get dedicated routers, as those tend to work better.

As far as how to control them before you get Inovelli Blues, you could look into something like remotes. There are a number of remotes that work with Zigbee2MQTT (and more, the search for Zigbee2MQTT leaves much to be desired).

And once you do get Inovelli Blues, you can bind them to the Philips Hue lights so you don’t have to worry about any of the issues @tom_l was mentioning about smart bulbs.

I wouldn’t rule it out just yet. I’ve noticed that it sometimes takes days or weeks for the network topology to change. But I have some Philips Hue Gos, and they act as routers both when plugged in, and when unplugged. If I move them elsewhere for some hours, the network doesn’t change topology. Maybe all this anecdote is showing is that the Philiips Hue Go doesn’t cause network toplogy changes when it’s unplugged, or maybe that I need to wait more hours. But, my point is more that it might take a longer time than 12 hours for the network topology to change. I think that like @dproffer mentioned, the devices might be causing issues because they weren’t paired in (or at least near) their present location.

To clarify the Inovellis are all here in a box and I’m ready to wire them. The only reason they aren’t installed is that home assistant doesn’t work. So if I install them I no longer have control of my lights.

I do not see the evidence pointing to this being a problem with the lights having been power cycled. I feel like folks heard “dumb switch” and just immediately went “aha!” without considering whether the behavior fits. As I said I had them powered continuously all day yesterday. They did not get better during that time.

Every time I restarted Z2M the behavior was the same…they would mostly come online, but some would drop out, with the number peaking 15min or so after Z2M start and then settling well below that peak number.

At the end of the day I tried powering every light down, then bringing them back room by room. It seemed like it eventually hit some kind of limit.

Does that description really sound like the lights are just confused by having been power cycled the day before? Or is something else going on?

You will still have as much control over your lights with the Inovelli switches as you do now with non-Inovelli switches. Inovelli switches are still switches. Meaning that they can turn the load on and off just like your current switches do (assuming the same type of switch: regular vs. dimmer). You can put them in Smart Bulb Mode, where they detach the switch control from the load. But they aren’t forced to be that way, and do not come from the factory that way. So whether you’re using an Inovelli switch (that isn’t in Smart Bulb Mode) or your current switch, they’re going to turn off the load the same when you press turn them off (with caveats about dimmers and the way they control loads vs. the way a regular switch controls loads). But you’d have routers that are on all the time, which should make the network more stable.

If you do put the Inovelli switches in Smart Bulb Mode, you would want to bind the switches to the lights/groups of lights. That way, even if the network is still busted, the switches will control the lights directly. Bindings (can? do?) bypass the mesh, so it shouldn’t matter if some light isn’t meshing with others (as long as the switch can directly connect to the light).

What I’d do if I were in your situation is:

  1. First, peruse Zigbee network optimization: a how-to guide for avoiding radio frequency interference + adding Zigbee Router devices (repeaters/extenders) to get a stable Zigbee network mesh with best possible range and coverage by fully utilizing Zigbee mesh networking, if you haven’t already. It’s long, but for this sort of diagnosis, the information is useful.
  2. Then add a couple of Inovelli switches following @dproffer’s layout suggestion.

You might have to re-pair the some lights. Or if you change channels you might have to re-pair everything. It’s unfun, but I’d imagine it’s less unfun than having 55 lights installed that you can’t fully control.

My anecdote about the Philips Hue Gos was supposed to provide more credence that sometimes Zigbee doesn’t work the way it seems like it should. Here’s another one.

I had a Sonoff SWV set up. It worked fine, reported properly, was able to be controlled. I installed a second Sonoff SWV less than a foot away from it, both of them started having problems. The first one that worked fine minutes before would drop off the network regularly. A friend suggested adding more routers, which I thought would be a waste of money. I thought, “Why would a perfectly working device fail when I added another one next to it? Surely there’s something else wrong.” I struggled trying to sort it out for a few weeks before getting another router. They were right! I added a router a few feet away, and both started working reliably. Neither Sonoff SWV has dropped off the network since (that I can tell, anyway).

Much like my other anecdote, this isn’t to say that everything is going to behave like this. And I fully understand that I’m talking about two end devices, not 55 routers. But the anecdote is only to say that Zigbee doesn’t always behave the way it seems like it should.

It’s entirely possible that your lights are fine, and power cycling them isn’t the problem. But it’s also entirely possible that power cycling them is exactly the problem. We don’t know what logic Philips put into the firmware of these lights. Maybe when they’re power cycled they take a long time to change topology after coming back on-line? Maybe they act light end devices for 48 hours after coming back on-line, and don’t router for the other devices? Maybe they do something else? Without a stable mesh, it’s hard to diagnose.