ZHA Zigbee Tested Devices...Please add your device results

Do you happen to use node red? If so you can try to use that just to rule out how you are looking for events.

If you do use and "events: all” node with the event type “zha_event”. Attach that to a debug node and deploy it. If zha is working you should see the events in the debut panel.

oh yeah the dev had been updated i DO now get a zha_event for the switch, and a bonus there is a quirk for my mija motion sensor and that works now.

but it appears to have broken my aurora_fwbulb02uk_02c28a06 (hive bulb) being able to report it state either on or off

How/where did you download the latest ZHA code?
thanks

from the dev branch of homeassistant it was updated 12hrs ago

Can you expand on the bulb issue? There weren’t any changes to components that should have affected functionality. All that was changed was a new quirks version (that device isn’t one that has a quirk) and there were changes to handle allowing devices to be available after restarts. What is wrong? Are there logs? Is it possible it fell off the network etc.

some if the time it just stops responding ie cannot turn it on and off and sometimes i can still control ie turn it on and off ect but the state in home assistant does not update ie it physically turns off but the switch still displays the bulb as being on

I must be too inexperienced here but please teach me to walk from crawling; I have to share vary same question as others have asked? How? I see this (no download and I suppose upload is not answer here, or am I in the wrong place):

download the full homeassistant archive:

from github, then copy the zha folder from homeassistant/components to custom_components.

Care to share logs when this happens?

is it just debug on homeassistant.core you need turning on?

For that I don’t need core… I need homeassistant.components.zha and zigpy

how do i get you the log? it wont let me upload a txt file here

Put it on pastebin and give me the link

how about that its to big for me to put on pastebin

Thanks! I have to try this …

fyi, I have been running ZHA from the dev branch and HA 89.1 since yesterday afternoon with no apparent problems. So far, so good. I do have a question on how to detect a double click on the Xiaomi WXKG11LM button? The zha_event shows the attribute_name as unknown.
thx

Thanks for your work - I tested and it looks very good. Couple of my entity id’s had changed, that was easily fixed.

Basically all my devices work as they should. I get now zha_events. The only thing which I find not working is Osram entities below which I suppose are the wattage measurements. They did not show the actual value earlier either.

But, Yes Thanks! Looks excellent!

image

image

Philips Hue Dimmer Switch. Dirt cheap device with 4 buttons. I use many with my Philips Hue system. But I also have a few I am using as generic remote. I used them on my Homey which I have stopped using in favour of Home Assistant. I tried to pair them with HA and ZHA. I raised a bug item which was resolved (crash when pairing).
Now I am at the next issue.
When I pair a 4-button Philips hue dimmer I get a node called Philips RWL021. And I get a binary_sensor device.
First the binary_sensor does not change state no matter which button I press.
And it should not be a binary_sensor. It should be a sensor with multiple values. Four for the 4 buttons. And 4 more for long press. And for long press it should create events for both press and release.

The same dimmer works great in zigbee2mqtt which I run on a Raspberry Pi while I wait for ZHA to become more stable.

Is there anything I need to setup to make it work (like I have to change Z-wave sensors to binary mode)?

Or is it simply just not supported yet?

Should I raise a bug report? and if so which project on GitHub?

Update: After several hours and many restarts where I worked on some other unrelated HA settings the device is suddenly “working”. But not in a way it should. It is still a binary device and it can turn on and turn off. And the two middle buttons increases a value under the sensor by steps of 30 up and down giving 9 levels.

I see this is useful as simple dimmer. But it limits its potential. The dimmer supports long press so you can use the same remote control for several functions. And the device I control has 19 levels (angel of venetian blinds) so I need up and down and long press for pre-set positions. Zigbee2mqtt implements the same device so you get values for on/off, up/down, and long press and release on all buttons. That gives the flexibility that the same dimmer also gives in the native Philips Hue context.

I’m working with my brother (in a different state so unfortunately makes testing a bit challenging) with this very same dimmer, trying to replicate the behavior provided by the Hue bridge but using HA/ZHA instead. I’ve found that the RWL021 generates the following zha_event entities that you can catch:

  • on
  • off_with_effect (I have yet to see a plain off event)
  • step with an arg list where arg[0] is either 0 (increase) or 1 (decrease) and arg[1] is the intended step size, usually 30 but not always?
  • stop when a held button is released (only tested this with step events so far)

Here is an example of what the event watcher captures (I’ve removed unnecessary data and duplicate events):

Event 21 fired 8:53 PM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0xb03b:1:0x0008",
        "command": "stop",
        "args": []
    }
}
Event 20 fired 8:53 PM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0xb03b:1:0x0008",
        "command": "step",
        "args": [
            0,
            56,
            9
        ]
    }
}
Event 12 fired 8:53 PM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0xb03b:1:0x0006",
        "command": "off_with_effect",
        "args": [
            0,
            0
        ]
    }
}
Event 0 fired 8:48 PM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0xb03b:1:0x0006",
        "command": "on",
        "args": []
    }
}

I’ve been able to create automations that work with most of this data so far, though I’m still struggling a bit with the brightness control. Here’s what I have (note, there’s also a counter entity tied in here meant to track repeated presses of the ON button to potentially trigger different actions, something the Hue bridge also does):

- id: office_light_remote_on_handler
  alias: Office Light Remote On Handler
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      unique_id: "0xb03b:1:0x0006"
      command: "on"
  action:
  - service: counter.increment
    entity_id: counter.office_light_remote_counter
  - service: light.turn_on
    entity_id:
    - light.office_desk_lamp
    - light.office_bloom_right
    - light.office_bloom_left
    - light.office_hue_go
- id: office_light_remote_brightness_handler
  alias: Office Light Remote Brightness Handler
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      unique_id: "0xb03b:1:0x0006"
      command: "step"
  action:
  - service: light.turn_on
    entity_id:
    - light.office_desk_lamp
    - light.office_bloom_right
    - light.office_bloom_left
    - light.office_hue_go
    data_template:
      brightness: >
        {% if state_attr("binary_sensor.office_light_remote", "level") > 30 %}
          {{ state_attr("binary_sensor.office_light_remote", "level") }}
        {% else %}
          30
        {% endif %}
- id: office_light_remote_off_handler
  alias: Office Light Remote Off Handler
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
      unique_id: "0xb03b:1:0x0006"
      command: "off_with_effect"
  action:
  - service: counter.reset
    entity_id: counter.office_light_remote_counter
  - service: light.turn_off
    entity_id:
    - light.office_desk_lamp
    - light.office_bloom_right
    - light.office_bloom_left
    - light.office_hue_go

One challenge to overcome is that the real Hue system doesn’t turn off the lights if you dim them all the way down, whereas Home Assistant does–at least if you rely on the binary_switch implementation and state changes currently triggered by ZHA with this device. I suspect that’s not ZHA’s fault, but rather just the way HA reacts if you have a level-enabled binary sensor and you set the level to 0. To solve this, the automations above rely on zha_event triggers for everything instead of state changes, and brightness is limited to never go below 30 (out of 255). The lights are only turned off if the off command comes, not if the binary sensor state changes to off as reported by HA. (As noted above, brightness is currently not quite working as expected…I think there’s something wrong with my trigger or the data template.)

It would be preferable for this device (and maybe others) to split brightness and power states more cleanly, since it’s technically just a remote and not necessarily tied directly to lights. I’m not sure if it’s possible to do this cleanly and easily without modifying some well-established HA behaviors concerning binary sensors (obviously a bad idea) or if there’s maybe a different entity type that this device could be mapped to, or what. Maybe it’s doable with some minor zhaquirks additions. I haven’t dug that far.

Is there someone who tried to add Hue Tap Switch to ZHA ?

1 Like