Understanding ZHA Cluster and Attributes

Hi all
As I am new to HA and all included, I am trying to understand ZHA Clusters and Attributes.
Could anybody point me in the direction of a site/post explaining how it works?

What I am trying to do is to set power-on attributes of a HUE bulb, but I give up when a meet expressions like “Value 0x01x” and "0x004X…

All the best

  • Thomas
3 Likes

You shouldn’t have to set the power on any Zigbee device manually through the cluster attributes. That’s what the underlying driver handles. However, nearly all cluster commands require hexadecimal commands to be set as that’s part of the base Zigbee spec.

The only time you should have to send cluster commands is if you have a device that is either not supported natively by the driver or doesn’t have a matching quirk specification.

If you are doing this as a learning experience, I’d recommend jumping on the HA discord and getting in the #zigbee channel.

1 Like

How do you get to the driver to adjust the options of a device joined via zha?

if you go to Devices’ config page, and into the clusters, there should be a Philips_On_Off cluster with commands available:

TheJulianJES on discord in #zigbee is probably the most knowledgable on how this all works.

1 Like

Also more info here:

1 Like

@code-in-progress excellent, thank you for clarifying that - I better stay away from that then :see_no_evil::sweat_smile:

@code-in-progress, @tube0013, @walt do any any of you have experience with Hue Bulbs and ZHA?
I would like to completely shutdown my Hue Bridge and only run HA environment, but the features of remembering the last state and the double-tap on/off power for switching between 100% brightness and last setting are key features for me in some rooms.

Is that possible with ZHA/HA without the Hue Bridge?

1 Like

Remember that it isalways be best for everyone in the community if “quirks” for ZHA Device Handlers are made and submitted for all such new devices so that they can be shared and improved by all:

https://www.home-assistant.io/integrations/zha/#zha-exception-and-deviation-handling

https://github.com/zigpy/zha-device-handlers

1 Like

If anyone else finds this post while searching for how to set Zigbee attributes: on the device page under Device info click the three dots and select “Manage zigbee device”

(This was under HA Core 2023.2.3 with ZHA toolkit v0.8.29)

5 Likes

If anyone comes across this post in the future, I would really strongly recommend running the Hue hub for your Hue lights. Unless of course you like putting in extra effort to make your system worse. I will briefly give you the pros and cons of moving your Hue lights to HA directly. As background, I have done it both ways, I have used Hue and HA for 5+ years, I have ~120 Hue devices and 60+ other zigbee devices. I’ve worked professionally in technology for 20+ years, and I don’t like to do extra work for no benefit.

Here are the pros of moving your Hue to ZHA/Z2M:

  • You can tell people you moved your Hue lights to ZHA/Z2M

That’s about it. Seriously. Everything you get from putting your Hue bulbs into your main zigbee mesh you also get for free when you run the Hue integration. Now here is what you lose / downsides:

  • Your Hue bulbs will make your main zigbee mesh less reiable
  • Bulb transitions are less smooth and generally worse
  • The UI for controlling bulbs is worse
  • You cannot use ‘zones’ because HA doesn’t support them
  • You lose access to all of the premade Hue scenes (which are continuously updated/added and look great)
  • You have to deal with quirks and working around general lack of functionality which is the topic of this thread
  • If your home assistant is down, or your zigbee coordinator is down, or ZHA or Zigbee2MQTT is down, or you are in the process of swtiching coordinators or anything like that, you can no longer use any of your lighting. This can be a significant inconvenience to say the least.

To sum it up: you are introducing a bunch of small problems (e.g., fading on a lightbulb looks noticably worse, can’t use premade Hue scenes, etc), a few big problems (these situations mean you can’t use your lights: migrating your HA instance from rpi to VM, migrating zha to z2m, migrating one zigbee controller to another, etc).

I’m upgrading coordinators right now and have run into issue after issue. Bought a SLZB-06, it worked great for about 8 hours and suddenly died. Spent a day or two trying to get it working, returned it to Amazon, set up the new one, dealing with restoring my Zigbee2mqtt backs and debugging zigbee internals. Now I said fuck it and am rebuilding my network from scratch. It’s mildly annoying but it happens. But I sure am glad none of this impacts me or my wife’s ability to turn our lights on and off. And as annoying as it is to re-pair 60 or so devices, repairing 180 devices (in the dark) would be infuriating.

So I would recommend, before you decide to move off the Hue hub, ask yourself what your goal is, what benefit you are looking to get. Because you are giving up a lot in terms of functionality and reliability, and I’m not actually aware of a single tangible benefit in return for the effort. If someone can name a benefit I’d love to hear.

How many Hue hubs do you have with 120 Hue devices?

The same goes for when your Hue hub is down, right?

1 Like

3 hubs. Sure, whenever my Hue hub is “down” I would walk over and plug it back in. That is a hypothetical scenario as it has never actually happened without power to the house being shut off.

I only have one z2m “hub” for my 100+ devices, and it never goes down either (unless there’s an update, which takes about 30 seconds) :man_shrugging:t3:

The benefit of NOT using the Hub is quite obvious for me.
With the Philips hub I NEED to register at philips, and more or less need to let my hub be connected to the internet, I don’t like that.
With HA i don’t have any internet connection needed, off course to get an update I go to the internet, but all my integrations work without any internet connection. For me it is not all important to control my HA outside my home, so yes I cannot see or control anything when I’m not home, but my motto is: If my network is open to connect my devices from anywhere, then others might be able to do the same.

1 Like

Philips Hue is designed to work entirely offline and it does work that way. You also don’t need to register with Philips in any way (as of now, that could always change).

My z2m coordinator almost never goes down. Except when I upgraded to SLZB-06 and the first one was defective. Worked for about 12 hours then died, sent it back a day later after trying to debug the issue, then waited another week for Amazon to send me the replacement via the slowest possible shipping method (apparently). And then I had to rebuild my network. Took about a week (I also have 100+ devices, and mine do not include any lights) for the rebuild. That would have been either 2 weeks with degraded lighting control, or urgently working to restore it. As it was, I took my time and had no stress.

It’s up to you what you choose to use. But for me, 100% reliable is a lot better than anything less than 100% reliable. Especially for lighting of all things. My entire house is zigbee lights and switches. Every single bulb. It’s a real PITA when ANY switch or light doesn’t work immediately, let alone all of them.