Migration from Hue to ZHA

Has anyone migrated from Hue to ZHA? Is there any way to migrate existing Hue scenes to HA? I have couple non Hue devices that I’d love to add to my network but I’m a bit worried about the effort to reconfigure everything with ZHA. Also is there a straightforward way to get the switches to rotate between scenes just like the original switches do?

As far as I know there is no migration path to migrate existing Hue scenes to Home Assistant’s own scenes. And do note that Home Assistant’s “scenes” are not directly related to ZHA as Home Assistant’s “scenes” can be used with any type of devices and are not specific to ZHA or Zigbee.

As such you can use Hue devices in ZHA just like you can use any Zigbee devices with it, but ZHA does not integrate with Hue ecosystem in any way and those Hue scenes only exist in Hue ecosystem. So I think that you have to replicate those scenes from scratch with Home Assistant’s own scenes and automations.

Thanks - I don’t think this is an issue. But what about the switches? How do the Hue switches integrate with ZHA? What kind of device do they show up as and how do the 4 buttons appear as?

Erik.

Not exactly sure what you mean by “switches” in this context as the words/terminology that Philips/Signify uses in this Philips Hue ecosystem app may or may not be the exactly same as the words/terminology that is used in the standard Zigbee specifications and in Home Assistant’s integrations or UI.

First, understand that each separate physical device (like a smart-lightbulb or a smart-switch) always shows up in the ZHA (Zigbee Home Automation) integration as a single device with multiple entities, then it depends on each different device how many entities and which types of entities are exposed for that specific.

In the world of Zigbee a “switch” can be either a basic single or dual-button ON/OF (like for example a smart wall-switch) or multi-button switches in remote control/fobs style also informally known as “controllers”). For a simple relay “switch” without a built-in relay, such as the “Philips Hue Wall Switch Module”, will likely show up as a single device with probably only one entity for ON/OFF exposed, while a more advanced/complex switches with multiple buttons (e.g. remote controls and keyfobs, like Philips Hue Dimmer Switch) will show up as a single device with multiple entities, and therefore it is usually a good idea to do a search in the Blueprints Exchange to see if there are Blueprints for any such advanced/complex which you then will also import/install to create a dummy device which organizes all its entities into something that is simpler to control in the UI, like for example this Blueprints → ZHA - Philips Hue Dimmer Switch (RWL020, RWL021) (search there for “ZHA” and/or model/brand of the product).

Controller Blueprints will basically create a new more user-friendly virtual device that is nicer in the UI, and they have already done the work of mapping entities to device types such as switches, etc.

Other than searching the Blueprints Exchange when you got advanced/complex controller switches with multiple buttons (e.g. remote controls and keyfobs) you might also be interested you check out EPMatt’s Awesome HA Blueprints which includes a collection or Blueprints for controllers, see → Blueprints Overview | Awesome HA Blueprints and Controllers | Awesome HA Blueprints touch recommend check his GitHub repository to see if there are any known issues for your specific controllers → https://github.com/EPMatt/awesome-ha-blueprints/

I strongly suggest you just buy a Zigbee Coordinator USB adapter as they only cost about $20 and try with ZHA which is super easy to get started so should normally be up and running in just 1-minute, see:

https://community.home-assistant.io/t/iteads-sonoff-zigbee-3-0-usb-dongle-plus-model-zbdongle-p-based-on-texas-instruments-cc2652p-20dbm-radio-mcu-now-sold-for-19-99/340705

Oh, and note that the few batteryless energy harvesting switches that Philips have (like “Philips Hue Tap”) use “ZGP (Zigbee Green Power)” technology which is not yet supported by the zigpy library that the ZHA integration depends on, see → ZHA integration support for ZGP (Zigbee Green Power) devices via zigpy?

Regarding how many migrated from Philips Hue to the ZHA (Zigbee Home Autoamtion) integration you can make guesses based from analytics statistics → https://analytics.home-assistant.io/#integrations

Note that those analytics/statistics are only collected from those who choose to “opt-in” and are estimated to only be a fifth of all Home Assistant actual userbase → https://community.home-assistant.io/t/home-assistant-founders-believe-there-is-currently-around-50-000-installations-of-zha-integration-what-do-you-zigbee-users-in-the-community-think-about-those-statistics/357305/

As @Hedda suggests, grab an inexpensive usb stick and start experimenting. You don’t have to move everything at once. Start with just a device or two and see what you think.

Whatever anyone says here, there are going to be nuances to the implementations that aren’t easily conveyed. You might consider something i find trivial as unacceptable.

1 Like

@ottawahacker Highly recommend that you read and follow this guide before starting to build a new Zigbee network → https://github.com/zigpy/zigpy/wiki/Generic-best-practice-tips-on-improving-Zigbee-network-range-and-general-stability

It is not a god idea to begin by adding just a few battery-powered Zigbee devices to a new network.

Most importantly is that you should add mains-powered “Zigbee Router” devices closer to the Zigbee Coordinator to extend the range and coverage before trying to add battery-powered devices further away from the Zigbee Coordinator, as that is a common mistake that can lead to a bad experience.

Zigbee uses mesh networking topology, which means that most mains-powered devices are a “Zigbee Router” that can act as signal repeater and range extended by transmitting data over long distances by passing data messages through the Zigbee network mesh of intermediate devices to reach more distant Zigbee devices. Thus to have a healthy Zigbee network you need many Zigbee Router devices relativly close to each other in order to achieve good coverage and range.

Simply start by adding mains-powered Zigbee devices (i.e. “Zigbee Router” devices) and/or decrease the distance between Zigbee Router devices in Zigbee network mesh to get better range and coverage:

  • Zigbee uses mesh networking and depends on having many “Zigbee Router” devices to extend range and coverage:
  • Recommendation is to add additional mains-powered Zigbee devices known to be good Zigbee Router devices.
  • Add more Zigbee Router devices and reduce their distances to extend network mesh coverage and range.
  • Note that not all mains-powered devices have firmware that make it act as a Zigbee Router device.
  • Some brands/models of Zigbee Router devices are know to only work well with same brand of devices.
  • Buy a few known good dedicated Zigbee Router product (like example the “IKEA Tradfri Signal Repeater”).
  • Search community forums for more “Zigbee signal repeater” or “Zigbee range extender” Zigbee Router tips.
  • Buy a few additional new Zigbee USB adapters to use after re-flashing them with Zigbee Router firmware.
  • Reflash/reuse modern Zigbee USB adapters to act as Zigbee Router by updating to other Zigbee firmware.
2 Likes

For a real deployment I agree. For “kick the tires” bench testing a lot can be learned without building out a real mesh.

Just be aware testing a lonely door sensor on the opposite the house may have issues without a supporting mesh.

FYI, this video shows quickly covers how to create new scenes in Home Assistant

1 Like

from what i know, i think dont think there is a way to export the date from Hue to Home Assistant. But i wont worry that much, the majority of the automations and scenes are really easy to replicate.

Should I go with the HUE Integration or ZHA?
I am using HA primarily with KNX devices. I bought a Philips Hue Bridge with the idea of using Hue switches (Tap Dial and Smart Button). I see that ZHA has some great blueprints, and I don’t see much of support for the Tap Dial otherwise. My HA is running on Docker (Windows Desktop Docker Linux containers), so I would not like to add a USB Zigbee controller. Can I use the Hue Hub I already have?

You’ll need a separate controller if you go with ZHA. The Hue hub will be a paperweight. There are network connected controllers for ZHA if you don’t want USB.

At this point, if otherwise happy with the Hue hub and Hue integration, I might wait and see what Matter support brings.

1 Like

I’ve migrated most of my lights to ZHA + Sonoff Zigbee controller and added several Sonoff zigbee sensors. The adaptive lightning extension + HA scenes has been a great combination which ended up removing the need for most of my Hue scenes. The only part that is sometimes tricky is the zigbee binding with switches (which connects your switches directly to the lights).

1 Like

Thanks. I misunderstood that I could use the Hub.
I will play with it a bit more, hoping to find the optimal way to utilize nice-looking Hue Tap Dial switch.

I did this manually. Just made a note of the entity names and replicated them once the were recreated in ZHA. This way, they stayed in the Automations/Scripts they were part of when they were under Hue. Literally took minutes to remove them from Hue and discover by ZHA.

1 Like

For those that have already migrated from Hue to ZHA, how did you recreate the smoothness of Room functionality operations like turning on a room of lights from HUE with ZHA in HA?

After getting a SkyConnect and installing a few Sonoff Zigbee devices, I realized that I now have two Zigbee mesh networks. So, I’ve started testing a Hue migration to ZHA, but I’m finding that manually created Scenes in HA send individual commands to each light (and even when the lights are grouped via a helper), so Room lights turn on individually instead of all together like they do via the Hue Hub. Has anyone found a good solution to this?

Keeping two Zigbee networks makes little sense, so I’d like to migrate fully to ZHA from Hue, but if this means automations like my theater lights coming on individually instead of all at once when I press pause, I’m not sure I’m willing to sacrifice the current smooth experience that I have with the Hue Hub.

You can create zigbee groups which will let your switches and light operate without HA but some of the older hue switches have been a pain to configure. It’s so simple to add an automation and there are also good blueprints for all the hue switches so I’ve been running everything through HA (the blueprints will let you select a room). Also I really recommend Adaptive Lightning - this thing is so good that I really end up only using few scenes.

For Zigbee Groups are you seeing the same kind of response for actions on the group entity? e.g. all lights turn on and off at the same time and rate?

I’m testing one now, but I think I need to have my entire network migrated so I benefit from the network effects of the mesh network.

If I’m understanding the migration path clearly, here’s what I believe I have to do:

  1. Recrate Hue Scenes in HA while bulbs are still managed by Hue - this is a manual process of activating each scene in Hue, then saving it as a new Screne in HA. Rinse and repeat to capture all desired Hue Scenes.
  2. Migrate each bulb from Hue to ZHA - this is also manual in that it requires deleting from Hue and hoping it’s in pairing mode to be discovered by ZHA. If not, you’ll have to perform one of the manual pairing steps (e.g. with Hue Dimmer switch via this method or similar process). To ensure Scenes work with new ZHA managed bulb, each new added bulb must be named exactly as it was when managed by Hue.
  3. Manually create Zigbee Groups via ZHA interface in HA - match these to the former room names from Hue.
  4. Update new HA Scenes with Zigbee Group Entities - activate the scene, then edit it by adding the new Zigbee Group entity and removing the individual light entities.
  5. Update existing automations, dashboard entities, and 3rd party tools - ensure all previous automations and dashboards reflect the new entities and not the old ones. For 3rd party tools like Alexa and Google Assistant, ensure the items are matched as well.

Anything else I may be missing?

Couple notes:

  • Yes I did delete the bulbs from Hue - but otherwise the dimmer switch trick is the easiest
  • the Zigbee groups do not support scenes. A group really means that you send the same command to all members - e.g. on/off. You really need to be careful on this one. The older Hue switches can only be paired with one coordinator, so either you set them in a group (aka only on/off will work) or you link them to HA but you can’t have both. I suspect that the original Hue system doesn’t leverage groups.
  • If you skip the groups - you can easily address all the items of a room without any special group in automations

Thanks, but now I’m a little confused about Zigbee Groups because I’m seeing some different results in my testing. My original question about the smoothness of functionality was not about the group entity itself, but rather about how well it works when a collection of Hue bulbs are managed by ZHA instead of Hue Hub. Here’s what I’ve observed so far:

  • A Hue Room (aka Group) of Hue Bulbs managed by Hue Hub - selecting a scene, on/off, and all adjustments have all of those lights in the room smoothly respond to the command and the change is consistent and at the same time for every bulb. It’s smooth and looks great.

  • HA Scene of Individual ZHA managed Hue Bulbs - selecting the scene appears to send individual commands to each bulb sequentially, so the transition to the scene is not coordinated like it was with Hue.

  • HA Scene that uses a Helper Group that consists of those same Hue Bulbs managed by ZHA - instead of the scene having each bulb individually, it only consists of the one HA Helper Group as one entity. My initial test of this showed sequential commands to each bulb and inconsistent responsiveness, so it did not provide a Hue Hub equivalent experience.

  • HA Scene that uses a Zigbee Group entity instead of HA Helper entity using same Hue Bulbs managed by ZHA - after creating a Zigbee Group from my SkyConnect controller in HA of those same Hue Bulbs, there’s now a new entity in HA for that Zigbee Group (similar to the HA Helper Group). If I take that existing scene and change the target entity from the HA Helper Group entity to the new Zigbee Group entity, it appears to make the transitions smoother, but I’m still seeing some periodic commands where one of the bulbs does not respond or is slow. So, it’s an improvement over a Scene with individual bulbs and the HA Helper Group entity, but it doesn’t appear to be perfect (which may be due to the size of my mesh network…).

So is there another type of “Zigbee Group” that I’ve missed? The type I describe above I’ve added to a Scene without issue and it’s the closest I’ve found so far to the responsiveness of the native Hue Scenes. And it also appears to have color, temperature, and other attributes that be sent on the group itself…even when not all of the items in the group support color.

TL;DR - I’m trying to figure out the best way to bring the Hue Hub functionality, responsiveness, and visual coordinated effect of changing multiple bulbs at once via ZHA in HA. I’m hopeful that Zigbee Groups are the answer and this migration isn’t a downgrade on the experience from Hue Hub.

Quick clarification - I’m not attempting to pair a single bulb to both Hue Hub and ZHA at the same time. I’m creating the new HA scenes while they’re paired to Hue Hub and then one-by-one deleting each Hue Hub bulb and adding it to ZHA with the exact same entity name that it previously had when managed by Hue Hub. While tedious, this appears to minimize the holes in my dashboards, automations, and Scenes from the migration.

2 Likes