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

i have a couple of slightly different zha_events from 2 different buttons on my ikea remote and i’m having trouble distinguishing between them in automation’s could some one suggest how i could do this

{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0xfb29:1:0x0005",
        "device_ieee": "90:fd:9f:ff:fe:fb:54:50",
        "command": "press",
        "args": [
            0,
            1,
            13,
            0
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2019-06-29T23:08:52.536679+00:00",
    "context": {
        "id": "1738ff95f3a0436bb23d53c9c460563e",
        "parent_id": null,
        "user_id": null
    }
}
Event 0 fired 12:08 AM:
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "0xfb29:1:0x0005",
        "device_ieee": "90:fd:9f:ff:fe:fb:54:50",
        "command": "press",
        "args": [
            1,
            1,
            13,
            0
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2019-06-29T23:08:49.528609+00:00",
    "context": {
        "id": "6b21b8f2f73e494082bc32bf25677f76",
        "parent_id": null,
        "user_id": null
    }
}

You can do it by making sure the args are in your automation trigger data. Two automations below that demonstrate this:

- id: '15523186467438'
  alias: Turn Study Light 33 Percent with Philips Remote
  trigger:
  - event_data:
      args:
      - 1
      - 30
      - 9
      command: step
      device_ieee: 00:17:88:01:06:72:a9:bf
    event_type: zha_event
    platform: event
  condition: []
  action:
  - data:
      mybrightness: '85'
      myentity: light.study
      mykelvin: '3500'
    service: script.light_on
- id: '153288697443'
  alias: Turn Study Light 66 Percent with Philips Remote
  trigger:
  - event_data:
      args:
      - 0
      - 30
      - 9
      command: step
      device_ieee: 00:17:88:01:06:72:a9:bf
    event_type: zha_event
    platform: event
  condition: []
  action:
  - data:
      mybrightness: '170'
      myentity: light.study
      mykelvin: '3500'
    service: script.light_on
1 Like

this is what i was trying but the automation seems to ignore the args and just use the command press

can you post your automation?

sure its 2 separate automatons for the 2 different buttons.

- alias: ikeaButton3
  trigger:
  - event_data:
      args:
      - 1
      - 1
      - 13
      - 0
     command: press
      device_ieee: 90:fd:9f:ff:fe:fb:54:50
    event_type: zha_event
    platform: event
  action:
  - data:
      entity_id: light.movie_box
    service: light.turn_on

- alias: ikeaButton4
  trigger:
  - event_data:
      args:
      - 0
      - 1
      - 13
      - 0
      command: press
      device_ieee: 90:fd:9f:ff:fe:fb:54:50
    event_type: zha_event
    platform: event
  action:
  - data:
      entity_id: light.movie_box
    service: light.turn_off

It all looks good other than perhaps your first ‘command’ is indented differently. Im not sure that would cause a problem though?

Even if I only put one of the automations in either button will trigger it

You may be interested in using Node-RED for your remotes. I found it much more manageable.

I have a couple of them setup like so:
Power = play/pause
Brighten = Vol +
Dim = Vol -
Hold Brighten = Vol + every 750ms
Hold Dim = Vol - every 750ms
Left = Xbox Mode
Right = Chromecast Mode
Hold Left or Hold Right = Toggle TV power



Export of my IKEA remote flow
[
    {
        "id": "5776030b.f25b1c",
        "type": "tab",
        "label": "Living Room IKEA Remote",
        "disabled": false,
        "info": ""
    },
    {
        "id": "a59e8daa.6009e",
        "type": "server-events",
        "z": "5776030b.f25b1c",
        "name": "Zigbee Events",
        "server": "20295610.6b9eba",
        "event_type": "zha_event",
        "x": 110,
        "y": 60,
        "wires": [
            [
                "b8f2a675.531d78"
            ]
        ]
    },
    {
        "id": "b8f2a675.531d78",
        "type": "switch",
        "z": "5776030b.f25b1c",
        "name": "MAC Address Router",
        "property": "payload.event.device_ieee",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "d0:cf:5e:ff:fe:2e:00:a0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "d0:cf:5e:ff:fe:2d:ed:f9",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 180,
        "y": 120,
        "wires": [
            [
                "666d4dea.1371e4"
            ],
            [
                "666d4dea.1371e4"
            ]
        ]
    },
    {
        "id": "3dc6b81c.414ec8",
        "type": "function",
        "z": "5776030b.f25b1c",
        "name": "Calc AV Receiver VOL-",
        "func": "var hass = global.get('homeassistant').homeAssistant;\nvar receiver = hass.states['media_player.living_room_receiver'];\n\nif (receiver.state == 'on') {\n    msg.new_volume = Math.max(0, (receiver.attributes.volume_level * 100 - 2.5) / 100);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 510,
        "y": 180,
        "wires": [
            [
                "6b15007d.e69a9"
            ]
        ]
    },
    {
        "id": "6b15007d.e69a9",
        "type": "api-call-service",
        "z": "5776030b.f25b1c",
        "name": "Set AV volume_level",
        "server": "20295610.6b9eba",
        "service_domain": "media_player",
        "service": "volume_set",
        "data": "{\"entity_id\":\"media_player.living_room_receiver\",\"volume_level\":\"{{new_volume}}\"}",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "x": 820,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "f9c4eb5e.352ba8",
        "type": "function",
        "z": "5776030b.f25b1c",
        "name": "Calc AV Receiver VOL+",
        "func": "var hass = global.get('homeassistant').homeAssistant;\nvar receiver = hass.states['media_player.living_room_receiver'];\n\nif (receiver.state == 'on') {\n    msg.new_volume = Math.min(1, (receiver.attributes.volume_level * 100 + 2.5) / 100);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 510,
        "y": 120,
        "wires": [
            [
                "6b15007d.e69a9"
            ]
        ]
    },
    {
        "id": "666d4dea.1371e4",
        "type": "switch",
        "z": "5776030b.f25b1c",
        "name": "IKEA Remote",
        "property": "payload.event.command",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "toggle",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "step_with_on_off",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "step",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "move_with_on_off",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "move",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "stop",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "press",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "hold",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "release",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 9,
        "x": 200,
        "y": 240,
        "wires": [
            [
                "bf297790.b3a3e8"
            ],
            [
                "f9c4eb5e.352ba8"
            ],
            [
                "3dc6b81c.414ec8"
            ],
            [
                "50ef099f.3cd2b8"
            ],
            [
                "42119cb2.f07ae4"
            ],
            [
                "c5122e98.0a20f"
            ],
            [
                "616b552c.f2292c"
            ],
            [
                "93295d29.7a197"
            ],
            []
        ],
        "outputLabels": [
            "pwr",
            "up",
            "down",
            "up (hold)",
            "down (hold)",
            "",
            "",
            "",
            ""
        ],
        "info": "Couch buttons"
    },
    {
        "id": "50ef099f.3cd2b8",
        "type": "function",
        "z": "5776030b.f25b1c",
        "name": "Calc AV Receiver VOL+",
        "func": "var hass = global.get('homeassistant').homeAssistant;\nvar receiver = hass.states['media_player.living_room_receiver'];\n\nif (receiver.state == 'on') {\n    msg.new_volume = Math.min(1, (receiver.attributes.volume_level * 100 + 2) / 100);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 510,
        "y": 240,
        "wires": [
            [
                "6b15007d.e69a9",
                "de1af9d1.5332e8"
            ]
        ]
    },
    {
        "id": "de1af9d1.5332e8",
        "type": "stoptimer",
        "z": "5776030b.f25b1c",
        "duration": "750",
        "units": "Millisecond",
        "payloadtype": "num",
        "payloadval": "0",
        "name": "",
        "x": 820,
        "y": 300,
        "wires": [
            [
                "666d4dea.1371e4"
            ],
            []
        ]
    },
    {
        "id": "c5122e98.0a20f",
        "type": "change",
        "z": "5776030b.f25b1c",
        "name": "Set payload = STOP",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "STOP",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 500,
        "y": 360,
        "wires": [
            [
                "de1af9d1.5332e8"
            ]
        ]
    },
    {
        "id": "42119cb2.f07ae4",
        "type": "function",
        "z": "5776030b.f25b1c",
        "name": "Calc AV Receiver VOL-",
        "func": "var hass = global.get('homeassistant').homeAssistant;\nvar receiver = hass.states['media_player.living_room_receiver'];\n\nif (receiver.state == 'on') {\n    msg.new_volume = Math.max(0, (receiver.attributes.volume_level * 100 - 2) / 100);\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 510,
        "y": 300,
        "wires": [
            [
                "6b15007d.e69a9",
                "de1af9d1.5332e8"
            ]
        ]
    },
    {
        "id": "616b552c.f2292c",
        "type": "switch",
        "z": "5776030b.f25b1c",
        "name": "Press L or R?",
        "property": "payload.event.args[0]",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 480,
        "y": 420,
        "wires": [
            [
                "daa85624.d50f48"
            ],
            [
                "f5e78758.739f28"
            ]
        ],
        "outputLabels": [
            "left",
            "right"
        ],
        "info": "Couch buttons"
    },
    {
        "id": "daa85624.d50f48",
        "type": "change",
        "z": "5776030b.f25b1c",
        "name": "payload = xbox_mode",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "xbox_mode",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 820,
        "y": 420,
        "wires": [
            [
                "a7c71711.69dcc8"
            ]
        ]
    },
    {
        "id": "f5e78758.739f28",
        "type": "change",
        "z": "5776030b.f25b1c",
        "name": "payload = chromecast_mode",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "chromecast_mode",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 840,
        "y": 480,
        "wires": [
            [
                "a7c71711.69dcc8"
            ]
        ]
    },
    {
        "id": "a7c71711.69dcc8",
        "type": "ha-fire-event",
        "z": "5776030b.f25b1c",
        "name": "Fire event",
        "server": "20295610.6b9eba",
        "event": "{{payload}}",
        "data": "",
        "mergecontext": "",
        "x": 1100,
        "y": 420,
        "wires": [
            []
        ]
    },
    {
        "id": "bf297790.b3a3e8",
        "type": "api-call-service",
        "z": "5776030b.f25b1c",
        "name": "Play/Pause TV",
        "server": "20295610.6b9eba",
        "service_domain": "media_player",
        "service": "media_play_pause",
        "data": "{\"entity_id\":\"media_player.living_room_tv\"}",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 480,
        "y": 60,
        "wires": [
            []
        ]
    },
    {
        "id": "93295d29.7a197",
        "type": "switch",
        "z": "5776030b.f25b1c",
        "name": "Hold L or R?",
        "property": "payload.event.args[0]",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 470,
        "y": 480,
        "wires": [
            [
                "740d36d1.596e08"
            ],
            [
                "740d36d1.596e08"
            ]
        ],
        "outputLabels": [
            "left",
            "right"
        ],
        "info": "Couch buttons"
    },
    {
        "id": "740d36d1.596e08",
        "type": "api-call-service",
        "z": "5776030b.f25b1c",
        "name": "Toggle TV power",
        "server": "20295610.6b9eba",
        "service_domain": "media_player",
        "service": "toggle",
        "data": "{\"entity_id\":\"media_player.living_room_tv\"}",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 810,
        "y": 540,
        "wires": [
            []
        ]
    },
    {
        "id": "20295610.6b9eba",
        "type": "server",
        "z": "",
        "name": "Home Assistant",
        "legacy": false,
        "hassio": false,
        "rejectUnauthorizedCerts": false,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true
    }
]
4 Likes

Has anyone had any luck with the SYLVANIA 73739 Dimmable Led Lamp. This is my last bulb to transfer to the ZHA component and this bulb does not want to connect.

[0x0000:zdo] ZDO request 0x0036: [60, <Bool.false: 0>]
0xd574:3:0x0b04 async_update
0x888b:3:0x0b04 async_update
0x888b:3:0x0b04 async_update
0xd574:3:0x0b04 async_update
[0x5de9:1:0x0300] ZCL request 0x000a: [[<Attribute attrid=7 value=<TypeValue type=uint16_t, value=331>>]]
[0x5de9:1:0x0300] Attribute report received: color_temperature=331
[0x5de9:1:0x0702] ZCL request 0x000a: [[<Attribute attrid=1024 value=<TypeValue type=int24s, value=69>>]]
[0x5de9:1:0x0702] Attribute report received: instantaneous_demand=69
0x888b:3:0x0b04 async_update
0xd574:3:0x0b04 async_update
[0x0000:zdo] ZDO request 0x0036: [60, <Bool.false: 0>]
[0xfa2e:3:0x0300] ZCL request 0x000a: [[<Attribute attrid=3 value=<TypeValue type=uint16_t, value=24939>>]]
[0xfa2e:3:0x0300] Attribute report received: current_x=24939
[0xfa2e:3:0x0300] ZCL request 0x000a: [[<Attribute attrid=4 value=<TypeValue type=uint16_t, value=24701>>]]
[0xfa2e:3:0x0300] Attribute report received: current_y=24701
[0xf853:1:0x0001] ZCL request 0x000a: [[<Attribute attrid=32 value=<TypeValue type=uint8_t, value=28>>]]
[0xf853:1:0x0001] Attribute report received: battery_voltage=28
[0xd574:3:0x0300] ZCL request 0x000a: [[<Attribute attrid=3 value=<TypeValue type=uint16_t, value=24939>>]]
[0xd574:3:0x0300] Attribute report received: current_x=24939
[0xd574:3:0x0300] ZCL request 0x000a: [[<Attribute attrid=4 value=<TypeValue type=uint16_t, value=24701>>]]
[0xd574:3:0x0300] Attribute report received: current_y=24701
[0xd574:3:0x0300] ZCL request 0x000a: [[<Attribute attrid=4 value=<TypeValue type=uint16_t, value=24701>>]]
[0xd574:3:0x0300] Attribute report received: current_y=24701
0xd574:3:0x0b04 async_update
0x888b:3:0x0b04 async_update
[0xf853:1:0x0402] ZCL request 0x000a: [[<Attribute attrid=0 value=<TypeValue type=int16s, value=2516>>]]
[0xf853:1:0x0402] Attribute report received: measured_value=2516
[0xfa2e:3:0x0006] ZCL request 0x000a: [[<Attribute attrid=0 value=<TypeValue type=Bool, value=Bool.true>>]]
[0xfa2e:3:0x0006] Attribute report received: on_off=Bool.true
0xd574:3:0x0b04 async_update
0x888b:3:0x0b04 async_update

Cheers for that I may look in to node red if I can’t get it figured out with just automations.

Maybe @dmulcahey can shed some light on how I can use the press, hold and release buttons inside automations?

For dimming direct binding is MUCH better

Hey I’m also having an issue with my Philips Hue Dimmer. After the change to remove the binary sensor, I have no way of reading the state. It only reports the ZHA status. Also, I still can’t get the Hue Dimmer to direct bind to my Hue Bulbs. The lightify remote works great with binding, Hue does not. Any tips?

Direct binding does not seem to do anything for me either. Is there a specific way I should be binding the switch to the bulb??

HUE dimmer might be using multicast addressing, which means it wasn’t supposed to be working it 0.94 or older versions

I’ll have to look into it when I have a moment. Currently working on the device tracker platform to support the SmartThings TagV4 initially. Then I have some other cleanup to do. I’ll try to look into this soon.

1 Like

Support for the Smartthings arrival sensor just hit dev :smiley:

2 Likes

I had the same problem with mine. Turned out that the firmware on the button needed to be updated. Need a smart things HUB to do it though. After firmware was updated, all was good.

Awesome - I was just using device_tracker.see being called when going online/offline as a zha node. Now it will be a selection as a tracker in the persons component?

Yes. It’s a full fledged device tracker now

1 Like

Ok, I still don’t have a quirk applied for this button or the dual button. What have I done wrong? Running 96.0

No events coming through either