Philips HUE dimmer switch

Basically, support for the HUE 4-button dimmer switch, model 473371. works on the ZHA protocol, and Smartthings can detect it, and will work with a custom device handler WITHOUT a HUE hub. If this could work with HA, then I could finally kick Smartthings to the curb and be done with my light switches not working when the internet is down, or Smartthings’ cloud is having issues (most likely).

Bellows detects it and all of its clusters, and it appears in the zigbee database, but HA doesn’t seem to know what to do with it.

At $25, this is a very economical, and nice looking control that just screams to work with HA…

Normally remotes are only exposed as events, are you sure zha doesn’t generate events for you when pressing buttons?

To be honest, I don’t know where the breakdown occurs. Launching HA in CLI, I can see when the remote joins… bellows sees it, communicates with it, lists the clusters and whatnot… and then nothing. It never shows up in HA as a device. I have ZHA Cree bulbs that went through the same process, but show up in HA as a light.

So, I wonder where the problem is? Is it bellows (now zigpy I guess?) or HA?

If it is an event you won’t see it listed as a device. But I don’t know about the zha implementation

For interest, I’ve paired my Hue remote using zha, but all that I get in the debug logs is this when I press all four buttons to power cycle the remote. After it is paired, no button presses on the remote make the green light flash. In short, while the remote seems to be supported by bellows I don’t think it is implemented in zha yet. Maybe @rcloran can weigh in?

INFO:bellows.zigbee.application:Device 0xca99 (00:17:88:01:10:3f:62:35) joined the network
DEBUG:bellows.zigbee.application:Skip initialization for existing device 00:17:88:01:10:3f:62:35
DEBUG:bellows.uart:Data frame: b'404db1ed502a15a159944a2daa55929f6388be6112316b8b640c56ebc36e3e2ffccd5e037e7e'
DEBUG:bellows.uart:Sending: b'8520dd7e'
DEBUG:bellows.ezsp:Application frame 69 (incomingMessageHandler) received
DEBUG:bellows.zigbee.zdo:[0xca99:zdo] ZDO request 0x0013: [51865, 00:17:88:01:10:3f:62:35, 128]
DEBUG:bellows.uart:Data frame: b'504db58b542b8c786cf67535abdd85499862587e'
DEBUG:bellows.uart:Sending: b'8610be7e'
DEBUG:bellows.ezsp:Application frame 35 (childJoinHandler) received
DEBUG:bellows.uart:Data frame: b'604db18ccde020d066844badbd55924a9c4e7dbd7e'
DEBUG:bellows.uart:Sending: b'87009f7e'
DEBUG:bellows.ezsp:Application frame 36 (trustCenterJoinHandler) received

Edit: I’m also seeing this message in the logs, so maybe bellows doesn’t fully support the remote yet either:

WARNING:bellows.zigbee.endpoint:[0xca99:1] Message on unknown cluster 0x0019
1 Like

You might be interested in https://github.com/home-assistant/home-assistant/pull/12528

I tried your code, but it fails on the script/setup step… memory fails me on the missing dependency.

is it anywhere close to being ready to be rolled into the main branch?

Just curious, has anyone got the hue dimmer working with ZHA? I’m trying to get mine to work. There’s a on/off state sensor but not the dimmer buttons. I see in the log files there are unique entries when the dimmer buttons are pressed but I haven’t figured out what the event settings would be to capture it for a trigger in an automation.

This is what I see in the log (first line is button “on” and second line is brighten button).
[zigpy.zcl] [0x9cf0:1:0x0006] ZCL request 0x0101: []
[zigpy.zcl] [0x9cf0:1:0x0008] ZCL request 0x0102: [0, 30, 9]

@techoguy:
I have the Philips hue Dimmer detected successfully. I am just working on an automation to make the dimmer work.
The Hue dimmer shows up nicely. As you said, it has a binary_sensor entity with the on/off function. There is also a level attribute, that changes between 0 and 255 in 10% increments when the dimmer switch is pressed. You can see this on the States page and watch it update in real time (no delays at all for me). I am just trying to get an automation running that reads that level attribute from the binary_sensor. Bit of a newbie to the automations here so it is just taking me time to make it work. As the level attribute is 0 to 255 I should, in theory, be able to just use the attribute directly on the brightness attribute for the light entity. I am just having issues with the trigger at the moment.
Ideas on this would be welcome :slight_smile:.

@brendan i’d be interested to know if you get it to work. The problem I’m having is that you have to trigger an automation from a state change and the state is only “on” or “off” regardless of the level. So what I’ve noticed is if the level is lets say 10% state is “on” then if you press “on” or “brighten” the state doesn’t change so the automation isn’t triggered even though a button on the dimmer is pressed.

I’m still new to this too but my assumption is you’ll have to do some kind of templating, maybe make a template sensor based on the level attribute?

This is coming, for the timebeing https://github.com/robmarkcole/Hue-sensors-HASS

1 Like

You are right. It will likely need templating using the level attribute as the trigger rather than the actual binary sensor.
I’ll let you know if I get it working.

I’ve used this component and I do love it. I am just wanting to cut back on the custom component use. Also, I want to eliminate the Hue Bridge and the custom component still relies on that :slight_smile:

1 Like

You can listen to zha_event, here are the events that are fired when I press the button:

Event 3 fired 5:51 AM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x7e9c:1:0x0008",
        "device_ieee": "00:17:88:01:10:33:1a:88",
        "command": "step",
        "args": [
            1,
            30,
            9
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2019-05-31T12:51:00.766450+00:00",
    "context": {
        "id": "65a1ebd4f5dc4af687a6d5ab42d04c28",
        "parent_id": null,
        "user_id": null
    }
}
Event 2 fired 5:50 AM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x7e9c:1:0x0008",
        "device_ieee": "00:17:88:01:10:33:1a:88",
        "command": "step",
        "args": [
            0,
            30,
            9
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2019-05-31T12:50:59.867801+00:00",
    "context": {
        "id": "7e04210a8f494de1ad5cc3ea67b7c6e2",
        "parent_id": null,
        "user_id": null
    }
}
Event 1 fired 5:50 AM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x7e9c:1:0x0006",
        "device_ieee": "00:17:88:01:10:33:1a:88",
        "command": "off_with_effect",
        "args": [
            0,
            0
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2019-05-31T12:50:58.866998+00:00",
    "context": {
        "id": "1067c89f4588485e8b6f81feed1c0af2",
        "parent_id": null,
        "user_id": null
    }
}
Event 0 fired 5:50 AM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0x7e9c:1:0x0006",
        "device_ieee": "00:17:88:01:10:33:1a:88",
        "command": "on",
        "args": []
    },
    "origin": "LOCAL",
    "time_fired": "2019-05-31T12:50:57.971008+00:00",
    "context": {
        "id": "38a4fb13f81043498523e64d57c373ef",
        "parent_id": null,
        "user_id": null
    }
}

I am not sure when things fell over, but I can not even get the Hue Dimmer to join the ZHA Network now.
When I try to include a Hue Dimmer (that has been fully reset and cleared off the Hue bridge) ZHA doesn’t even detect it now.
I know I could detect the Hue Dimmer when I last tested it in 0.85.x but now on 0.94.x it doesn’t even detect at all.
Is this just me or have others had this issue?

So, I have just gotten around to moving away from my hue hub to native HA control. I was able to use my dimmer to reset all of my lights, but then found I was unable to pair the dimmer itself. I was able to get the “battery” to show up for the dimmer, but nothing else. I am on 96.5. Was the dimmer ever able to natively pair to HA?

@ptdalen:
The dimmer pairs successfully, but doesn’t show up as a switch or binary sensor.

I believe this is a change to the way ZHA works in a recent release.
I think it was in 0.95.
Under breaking changes it lists "Remove binary sensors for ZHA remotes and controllers. Issue #24370.
This was done as the remotes are stateless by nature.
They can be used as scene controllers though.

1 Like

Additional to my last comment, it appears at the moment you’d have to dig into the logs to find what event codes were being sent by the remote control and grab those codes to use as event triggers.
I hope there is work being done to make this easier in the future.

Thanks, this helps and make sense. I do have a couple of older zwave 4 button controllers. I suspect the process for using them will be similar. Do you know of a good reference on how to get started with this? This is what I used for my zwave controllers

- alias: 'Minimote 1 Actions'
  trigger:
  - platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.aeotec_minimote_1
  action:
  - service: homeassistant.toggle
    data_template:
      entity_id: >
        {% set map = {1: 'light.bedroom_lamp_one',
                      2: 'light.bedroom_lamp_one',
                      3: 'light.bedroom_lamp_two',
                      4: 'light.bedroom_lamp_two',
                      5: 'light.bedroom_ceiling_light',
                      6: 'light.bedroom_ceiling_light',
                      7: 'switch.bedroom_fan',
                      9: 'switch.bedroom_fan'} %}
        {{ map[trigger.event.data.scene_id|int] }}

Not sure what to do for zha devices. Anyone out there have an example or two?

Unfortunately I do not understand ZHA scene controllers enough to be able to assist with this.
I am waiting to see if there will be further updates to ZHA before moving any more devices across.