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

Missing repeated hue_event for Philips Hue Tap Dial switch #78621

Closed
Mincka opened this issue Sep 17, 2022 · 8 comments · Fixed by home-assistant-libs/aiohue#167
Closed

Missing repeated hue_event for Philips Hue Tap Dial switch #78621

Mincka opened this issue Sep 17, 2022 · 8 comments · Fixed by home-assistant-libs/aiohue#167
Assignees

Comments

@Mincka
Copy link

Mincka commented Sep 17, 2022

The problem

Hi,
Repeated start events in the same direction seem to be ignored by the integration and they do not generate events in HA.
I am monitoring this by following hue_event.

This happens when I gently rotate the button, about every second. If I wait even more (10 seconds), and do a single rotation (without leading to the generation of repeat event, it won't generate a start altogether.

If the event type is the same start but the subtype is different clock_wise vs counter_clock_wise, it will create a new event.
If I rotate the button a little faster, it will generate a repeat event. However, it is harder to simulate, if I manage to keep the same rotation rythm (exact same steps), it looks it the repeated repeat event is also ignored.

That's why I am thinking this is some kind of ignored repeated events with the same data.

I checked in the diagnostic logs of the integration and the start events are all here, every second. Logs below.

It looks like there are filtered by the integration because it's the same event type. I had a quick look at the code, but I am not sure what could give this result, maybe the event_filter here and/or this long press button workaround in aiohue because the code is not checked against device.product_data.model_id not in BTN_WORKAROUND_NEEDED like the next condition?

I tried to update the code for both ideas but no difference. 😞

I don't think this is related to the "1 second polling" limitation mentioned in #75082, since the aiohue lib is able to catch them all.

What version of Home Assistant Core has the issue?

2022.9.4

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

Philips Hue

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

{
        "creationtime": "2022-09-14T08:16:58Z",
        "data": [
          {
            "id": "a137c264-df43-4a4e-b345-9979df489529",
            "id_v1": "/sensors/113",
            "owner": {
              "rid": "0926fa94-9f22-4ca7-9e9c-ac15c3ba57b1",
              "rtype": "device"
            },
            "relative_rotary": {
              "last_event": {
                "action": "start",
                "rotation": {
                  "direction": "clock_wise",
                  "duration": 400,
                  "steps": 15
                }
              }
            },
            "type": "relative_rotary"
          }
        ],
        "id": "redacted-b2c31948-cd22-4d1a-8f50-d4eca0e21f85",
        "type": "update"
      },
      {
        "creationtime": "2022-09-14T08:16:59Z",
        "data": [
          {
            "id": "a137c264-df43-4a4e-b345-9979df489529",
            "id_v1": "/sensors/113",
            "owner": {
              "rid": "0926fa94-9f22-4ca7-9e9c-ac15c3ba57b1",
              "rtype": "device"
            },
            "relative_rotary": {
              "last_event": {
                "action": "start",
                "rotation": {
                  "direction": "clock_wise",
                  "duration": 400,
                  "steps": 15
                }
              }
            },
            "type": "relative_rotary"
          }
        ],
        "id": "redacted-6949e275-1bc1-4237-96ab-625f9090b3a8",
        "type": "update"
      },
      {
        "creationtime": "2022-09-14T08:17:00Z",
        "data": [
          {
            "id": "a137c264-df43-4a4e-b345-9979df489529",
            "id_v1": "/sensors/113",
            "owner": {
              "rid": "0926fa94-9f22-4ca7-9e9c-ac15c3ba57b1",
              "rtype": "device"
            },
            "relative_rotary": {
              "last_event": {
                "action": "start",
                "rotation": {
                  "direction": "clock_wise",
                  "duration": 400,
                  "steps": 15
                }
              }
            },
            "type": "relative_rotary"
          }
        ],
        "id": "redacted-cc4022da-f9e8-475d-8531-efb38c8e363a",
        "type": "update"
      },
      {
        "creationtime": "2022-09-14T08:17:01Z",
        "data": [
          {
            "id": "a137c264-df43-4a4e-b345-9979df489529",
            "id_v1": "/sensors/113",
            "owner": {
              "rid": "0926fa94-9f22-4ca7-9e9c-ac15c3ba57b1",
              "rtype": "device"
            },
            "relative_rotary": {
              "last_event": {
                "action": "start",
                "rotation": {
                  "direction": "clock_wise",
                  "duration": 400,
                  "steps": 15
                }
              }
            },
            "type": "relative_rotary"
          }
        ],
        "id": "redacted-9af36863-8b45-4055-9b6b-fcc47ddf5470",
        "type": "update"
      }


### Additional information

_No response_
@probot-home-assistant
Copy link

hue documentation
hue source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @balloob, @marcelveldt, mind taking a look at this issue as it has been labeled with an integration (hue) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@Mincka Mincka changed the title Missing repeated hue_event emitted for new Philips Hue Tap Dial switch Missing repeated hue_event emitted for Philips Hue Tap Dial switch Sep 17, 2022
@Mincka Mincka changed the title Missing repeated hue_event emitted for Philips Hue Tap Dial switch Missing repeated hue_event for Philips Hue Tap Dial switch Sep 17, 2022
@github-actions github-actions bot added the stale label Oct 17, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
@Mincka
Copy link
Author

Mincka commented Oct 24, 2022

Don't close this little bot, we are still there looking for a fix!

@Mincka
Copy link
Author

Mincka commented Oct 24, 2022

@marcelveldt Can you reopen this issue please? I missed the stale label being added last week. Thanks.

@marcelveldt marcelveldt reopened this Oct 27, 2022
@marcelveldt
Copy link
Member

There is a duplicate event filter in the code between aiohue and the hue integration and I think that is the one causing this. I will try to find some time this week to fix it.

@iamelec
Copy link

iamelec commented Nov 12, 2022

There is a duplicate event filter in the code between aiohue and the hue integration and I think that is the one causing this. I will try to find some time this week to fix it.

Is there possibly any news on this issue? I've just got the Hue Tap Dial Switch and so far it works quite well in HA. However it indeed does filter out dublicate events, so I have to fire a different event first te retrigger the previous event.

The Tap Dial is so much faster than the Ikea Symfonisk for volume control (near instant).

@Mincka
Copy link
Author

Mincka commented Nov 30, 2022

For anyone interested, the rotation support will be supported in Deconz in Home Assistant 2012.12.
Kane610/deconz#359
I tested it in beta and it works really great, by rotating it slow or very fast.
Since I only use the Hue Integration for devices that are not yet fully supported in Deconz, I don't need personally need this issue to be fixed anymore, but since there is interest from other people, I leave it open.

@iamelec
Copy link

iamelec commented Nov 30, 2022

I'm currently using zigbee2mqtt which supports the tap dimmer really well!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants