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


#644

@tosion you need to enable DEBUG logging (at least for homeassistant.core) and then in the home-assistant.log file look for zha_event[R] events, something like

2019-01-25 14:09:09 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zha_event[R]: unique_id=zha_event.lumi_lumi_sensor_switch_aq2_02133211_1, command=attribute_updated, args=attribute_id=0, attribute_name=on_off, value=Bool.false>
2019-01-25 14:09:09 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zha_event[R]: unique_id=zha_event.lumi_lumi_sensor_switch_aq2_02133211_1, command=attribute_updated, args=attribute_id=0, attribute_name=on_off, value=Bool.true>

to enable debug logging either update logger configuration section in configuration.yaml or call logger.set_default_level service with {"level": "debug"} data


#645

OK - thanks!

Does this help - looks like event changes from kind of from false to true but how can I use it? No entity in states changes the state here?

2019-01-25 21:58:09 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zha_event[R]: unique_id=zha_event.lumi_lumi_sensor_switch_aq2_021315fc_1, command=attribute_updated, args=attribute_id=0, attribute_name=on_off, value=Bool.false>

2019-01-25 21:58:09 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zha_event[R]: unique_id=zha_event.lumi_lumi_sensor_switch_aq2_021315fc_1, command=attribute_updated, args=attribute_id=0, attribute_name=on_off, value=Bool.true>

On the other hand it seems to always happen in very same second and it always ends up to be Bool.true - never Bool.false in the end. So how to use this is another question? Can you really use this as trigger?


#646

see event triggers
Something like:

- id: button_xiaomi
  alias: xiaomi button
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
        unique_id: zha_event.lumi_lumi_sensor_switch_aq2_02132110_1
        attribute_name: on_off
        value: Bool.true
  action:
  - service: light.toggle
    entity_id: light.my_awesome_light

#647

Many, many, many thanks!

Looks easy - you saved my day. I will test this tomorrow!


#648

I followed the same directions but I unfortunately don’t seem to see any zha_events firing in the logs, despite setting default level to debug.

The button I’m using is the WXXG11LM and it seems to have paired OK with ZHA.

This is me jamming on the button a few times. The events here just seem to be signal strength updates. I have the log viewer filtering for “zha” in the log text:

2019-01-25 22:52:50 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 1> 0 Bool.false
2019-01-25 22:52:50 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 0> 0 Bool.true
2019-01-25 22:52:52 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zha.zha_01b86f7c, old_state=<state zha.zha_01b86f7c=online; nwk=0x90d0, ieee=00:15:8d:00:01:b8:6f:7c, lqi=255, rssi=-48 @ 2019-01-25T22:19:47.004677-05:00>, new_state=<state zha.zha_01b86f7c=online; nwk=0x90d0, ieee=00:15:8d:00:01:b8:6f:7c, lqi=254, rssi=-46 @ 2019-01-25T22:19:47.004677-05:00>>
2019-01-25 22:52:52 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140511315281400] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'zha.zha_01b86f7c', 'old_state': <state zha.zha_01b86f7c=online; nwk=0x90d0, ieee=00:15:8d:00:01:b8:6f:7c, lqi=255, rssi=-48 @ 2019-01-25T22:19:47.004677-05:00>, 'new_state': <state zha.zha_01b86f7c=online; nwk=0x90d0, ieee=00:15:8d:00:01:b8:6f:7c, lqi=254, rssi=-46 @ 2019-01-25T22:19:47.004677-05:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 1, 26, 3, 52, 52, 5971, tzinfo=<UTC>), 'context': {'id': '104505d7f58442f8a7381ed3a655862c', 'user_id': None}}}
2019-01-25 22:52:52 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140511195247840] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'zha.zha_01b86f7c', 'old_state': <state zha.zha_01b86f7c=online; nwk=0x90d0, ieee=00:15:8d:00:01:b8:6f:7c, lqi=255, rssi=-48 @ 2019-01-25T22:19:47.004677-05:00>, 'new_state': <state zha.zha_01b86f7c=online; nwk=0x90d0, ieee=00:15:8d:00:01:b8:6f:7c, lqi=254, rssi=-46 @ 2019-01-25T22:19:47.004677-05:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2019, 1, 26, 3, 52, 52, 5971, tzinfo=<UTC>), 'context': {'id': '104505d7f58442f8a7381ed3a655862c', 'user_id': None}}}
2019-01-25 22:52:52 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 1> 32768 2
2019-01-25 22:52:54 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 1> 0 Bool.false
2019-01-25 22:52:54 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 0> 0 Bool.true
2019-01-25 22:52:54 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 1> 0 Bool.false
2019-01-25 22:52:54 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: <Entity None: 0> 0 Bool.true

I tried constructing an automation like the one @Quatuor suggested (btw, THANKS !) but the action I had (simple light toggle) didn’t happen when I pressed the button (but worked when I manually tripped the automation)

Thanks for all the hard work on ZHA ! Hopefully soon I can reduce the number of boxes on the shelf by 1 and decommission my deconz box for the other Zigbee stuff I have.


#649

What version of HA?


#650

0.86.2, docker version


#651

Thanks - tested and it works!

- id: button_xiaomi
  alias: xiaomi button
  trigger:
  - platform: event
    event_type: zha_event
    event_data:
        unique_id: zha_event.lumi_lumi_sensor_switch_aq2_021315fc_1
        attribute_name: on_off
        value: Bool.true
  action:
  - service: light.toggle
    entity_id: light.ikea_of_sweden_tradfri_bulb_e27_cws_opal_600lm_fe837cca_1

#652

Interested in this as well. For now, keeping mine connected to my old SmartThings hub and using API calls to HA, but would love to be able to cut out the middleman.


#653

I just upgraded from 84.6 to 86.2. Several months ago I had set up the custom component to add ZHA battery levels for my iris and smartthings sensors, but eventually took it off. I had custom names for the batteries still in my configuration, but of course there were not battery sensors so they did not show up. Now with this update, I was suprised and happy to see them pop up on my screen. But… They all show as unknown. I’ve given them a good amount of time, but still all show unknown. Is there something i need to do? Do I need to remove and readd all my devices since they had old entries?

Thanks for the hard work on the zigbee devices, I felt like zigbee was not getting much love, and it’s nice to see this hard work!

EDIT: I ended up just removing and readding the devices and it looks to be working. Only took 10-20 minutes to get them all added


#654

I do my event automations in node red so I could be wrong but your unique ID looks wrong to me. I think it should be the zha.xxx device of the one you are trying to trigger off of.

Edit: I’m wrong. His example is right. The unique ID is right. The only difference from my automation is that I trigger off of ‘event.args.value’. Value 0 is single tap, 2 is double and 3 is triple.


#655

Thanks for a response!

Interesting!

In HA log:

unique_id=zha_event.lumi_lumi_sensor_switch_aq2_021315fc_1,

I followed instructions from Quatuor - I suppose his example works. Mine works also well, so …

Or did I understand something wrong?


#656

See my edit. His example is correct. I was thinking z-wave events. Those are slightly different.


#658

Well, i have a Xiomi button v2 attached and can see events like this in the log:

2019-01-28 10:24:07 DEBUG (MainThread) [zigpy.zcl] [0x4e05:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x7f098034ba90>>]]
2019-01-28 10:24:07 DEBUG (MainThread) [zigpy.zcl] [0x4e05:1:0x0012] Attribute report received: 85=1
2019-01-28 10:24:07 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: 85 1
2019-01-28 10:24:10 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6,

How do I trigger off that? what attribute is being set to 1? (single click, double is 85=2, shake is 85=18, etc)


#659

Sorry I couldn’t find it obviously in the thread–
are the Xiaomi Aqara sensors working in 0.86 without any additional configuration?
is this the PR that has them working in HA?


#660

Instead of looking at the log, if you have NodeRed installed, put out an “All Events” node and attach a Debug node. When I did that and clicked the button, a “zha_event” message popped up in the debug window. This is the message that comes up when I click it three times:

{“event_type”:“zha_event”,
“event”:{“unique_id”:“zha_event.lumi_lumi_sensor_switch_02ca334b_1”,
“command”:“attribute_updated”,
“args”:{“attribute_id”:32768,“attribute_name”:“Unknown”,“value”:3}}}`

So I put “zha_event” as the event type in the Events Node and used two Split Nodes, one to read the “payload.event.unique_id” and the next to read the “payload.event.args.value”. Now I can program scenes for each number of times I press the button consecutively.


#661

Thanks @Musicman247 but i’m lost… and don’t have, nor want to install NodeRed… guess they still haven’t really implemented these fully :frowning: works great with zha_new, but i have other issues with that package so would rather stick with the offical.

if you could provide more code/examples/help that would be great.

Thanks


#662

@cybergrimes yes, looks like its in, and i have a number of Xiaomi working ok… the buttons are still giving me issues, as I don’t know how to access the event for button clicked, double, held, shake. I can see it in the logs, but don’t know how to automate/react to them in the yaml files :frowning:


#663

set homeassistant.core logging level to debug – run logging.set_level service with {"homeassistant.core": "debug"} service data. Join the button and check the homeassistant log, eg tail -f ~/.homeassistant/home-assistant.log | grep zha_event


#664

Ok, just like Quator says, set your logging level to “debug”. You can add this to the configuration.yaml and do the same thing:

logger:
default: debug

Once you’ve pressed your button, look for a reference to a “zha_event”. Mine looked like this when I double-clicked the button:

2019-01-30 21:59:07 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event zha_event[R]: unique_id=zha_event.lumi_lumi_sensor_switch_02c7f5fe_1, command=attribute_updated, args=attribute_id=32768, attribute_name=Unknown, value=2>

From that you just need the “unique_id” and “value” to set up your automation. Here’s my automation in yaml.

  • id: ‘1548874688400’
    alias: Button Double Press
    trigger:
    • event_data:
      args:
      value: 2
      unique_id: zha_event.lumi_lumi_sensor_switch_02c7f5fe_1
      event_type: zha_event
      platform: event
      condition: []
      action:
    • data:
      entity_id: light.living_room
      service: light.turn_on

Made it in the Automations GUI, so I have a pic of that as well.

I have the original Mijia Wireless Switch (round button), but I’m pretty sure the same method will apply to the newer button as well.

Hope this helps!