Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Philips Hue Dimmer fires 3 events when a button is pressed (ZHA) #47352

Closed
stefanroelofs opened this issue Mar 4, 2021 · 6 comments
Closed
Assignees

Comments

@stefanroelofs
Copy link
Contributor

The problem

I have 5 Philips Hue dimmer remotes (RWL021).

When a button is pressed, they all fire a single event like this:
Press Off button: "command": "off_with_effect"
Press On button: "command": "on"

These are the 'old' style events. There was a quircks PR that updated the events this remote generates:
zigpy/zha-device-handlers#388

When do my devices start using the new style events?

I repaired one of the remotes, now this remotes fires 3 events when a single button is pressed:
Press the on button:
1st event: "command": "on",
2nd event: "command": "on_short_release",
3rd event: "command": "on_press",

Press the Off button:
1st event: "command": "off_with_effect",
2nd event: "command": "off_short_release",
3rd event: "command": "off_press",

It seems both the old style, and the new style events are fired.
Is this behavior expected?
Can I prevent the old style events (off_with_effect) from firing somehow?

Instant update.
I just pressed the 'Reconfigure device' button on another remote, and this causes it to start firing the new events.

What is version of Home Assistant Core has the issue?

core-2021.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Example YAML snippet

# Put your YAML below this line

Anything in the logs that might be useful for us?

# Put your logs below this line
@probot-home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, mind taking a look at this issue as its been labeled with an integration (zha) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@Adminiuga
Copy link
Contributor

Logs?

@Adminiuga
Copy link
Contributor

When a button is pressed, they all fire a single event like this:
It seems both the old style, and the new style events are fired.

Which one is it?

@stefanroelofs
Copy link
Contributor Author

Sorry for the confusion:

When I press the 'dim down' button I see the following event:

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:1:0x0008",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "step",
        "args": [
            1,
            30,
            9
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:14:19.949464+00:00",
    "context": {
        "id": "39fb7c45b46d55a1236fb4e786e53b8e",
        "parent_id": null,
        "user_id": null
    }
}

Now I press the 'RECONFIGURE DEVICE' button.

I press the same 'Dim Down' button again.
These 3 events are fired:

Event 16 fired 3:15 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:2:0xfc00",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 2,
        "cluster_id": 64512,
        "command": "down_press",
        "args": {
            "button": "down",
            "press_type": "press",
            "command_id": 0,
            "args": [
                3,
                3145728,
                0,
                33,
                0,
                0
            ]
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:15:12.309432+00:00",
    "context": {
        "id": "f82752b9a52209a74767bcc63c27e704",
        "parent_id": null,
        "user_id": null
    }
}
Event 15 fired 3:15 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:2:0xfc00",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 2,
        "cluster_id": 64512,
        "command": "down_short_release",
        "args": {
            "button": "down",
            "press_type": "short_release",
            "command_id": 0,
            "args": [
                3,
                3145728,
                2,
                33,
                3,
                0
            ]
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:15:12.280529+00:00",
    "context": {
        "id": "902c67b179306510f6c3993103ad2a3f",
        "parent_id": null,
        "user_id": null
    }
}
Event 14 fired 3:15 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:1:0x0008",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "step",
        "args": [
            1,
            30,
            9
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:15:11.981682+00:00",
    "context": {
        "id": "e2c4500ca0090d918217f6c3ca81fe0d",
        "parent_id": null,
        "user_id": null
    }
}

Is this the intended behavior?

Is event 14 (the old style) still fired for backwards compatibility?

Is there a way to make event 14 not fire anymore?

@Adminiuga
Copy link
Contributor

Yes, that's the intended behavior. Shouldn't be a problem since those are different commands on different clusters.

@stefanroelofs
Copy link
Contributor Author

alright, thanks 👍🏻

just FYI: when I double-click the 'Down' button I get 5 events:

Event 77 fired 3:28 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:2:0xfc00",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 2,
        "cluster_id": 64512,
        "command": "down_double_press",
        "args": {
            "button": "down",
            "press_type": "double_press",
            "command_id": 0,
            "args": [
                3,
                3145728,
                0,
                33,
                0,
                0
            ]
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:28:42.200982+00:00",
    "context": {
        "id": "e883107738af905b2d42816874da3dab",
        "parent_id": null,
        "user_id": null
    }
}
Event 76 fired 3:28 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:2:0xfc00",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 2,
        "cluster_id": 64512,
        "command": "down_short_release",
        "args": {
            "button": "down",
            "press_type": "short_release",
            "command_id": 0,
            "args": [
                3,
                3145728,
                2,
                33,
                1,
                0
            ]
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:28:42.015236+00:00",
    "context": {
        "id": "d7ce2549999a93d213a9c54a61cb7fb7",
        "parent_id": null,
        "user_id": null
    }
}
Event 75 fired 3:28 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:1:0x0008",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "step",
        "args": [
            1,
            30,
            9
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:28:41.884441+00:00",
    "context": {
        "id": "d2e8d6986208dd40b8b1c7cc94422de6",
        "parent_id": null,
        "user_id": null
    }
}
Event 74 fired 3:28 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:2:0xfc00",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 2,
        "cluster_id": 64512,
        "command": "down_short_release",
        "args": {
            "button": "down",
            "press_type": "short_release",
            "command_id": 0,
            "args": [
                3,
                3145728,
                2,
                33,
                0,
                0
            ]
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:28:41.787507+00:00",
    "context": {
        "id": "684f464fe136dd5cd39679c5ba2758d7",
        "parent_id": null,
        "user_id": null
    }
}
Event 73 fired 3:28 PM:
{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "00:17:88:01:02:1b:48:1d",
        "unique_id": "00:17:88:01:02:1b:48:1d:1:0x0008",
        "device_id": "fee06dbd12eb4ee2a29df030563ca3cc",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "step",
        "args": [
            1,
            30,
            9
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-04T14:28:41.707852+00:00",
    "context": {
        "id": "bbdf5d439954b8f539f2a3b0aa68d8c7",
        "parent_id": null,
        "user_id": null
    }
}

It won't cause problems, but it feels a bit much..

Thanks for checking. I will close the issue.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants