home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.94k stars 29.03k forks source link

Hue Tap Dial rotation not always registered by Home Assistant #118742

Open DrBlokmeister opened 1 month ago

DrBlokmeister commented 1 month ago

The problem

I also asked this question at the deconz github here: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/7804. I am unsure whether this is a HA issue or a deconz issue.

I recently bought a Hue Tap Dial switch which I integrated into Deconz without issue. I integrated it into Home Assistant. All buttons work perfectly, but rotation is not detected by the events listener. When I open the Phoscon webpage to check if the rotations are registered, I find that they are. When I then go back to Home Assistant and listen for events, I do suddenly see 5001 and 6001 events indicating rotation. When I reload the Home Assistant integration, these events are no longer detected.

I have not noticed any of these issues with other devices, such as Xiaomi switches, Aqara motion sensors, Hue lights. Button presses, but also motion activation is detected just fine.

Steps to reproduce the behavior

  1. Reload Home Assistant Deconz integration
  2. Listen to deconz_event in the events listener. Rotate dial. Rotations are not detected
  3. Open Phoscon app
  4. Listen to deconz_event in the events listener. Rotate dial. Rotations are again detected.

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

deconz

Link to integration documentation on our website

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

Diagnostics information

config_entry-deconz-b52dc610feae45fdbe96dfbe2cd27aea.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (deconz) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `deconz` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign deconz` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


deconz documentation deconz source (message by IssueLinks)

phqzgunsfjror commented 1 month ago

I have the same problem but with OpenHab. My debugging indicates it is on deCONZ side.

In deCONZ UI: -> Help -> API information

{
    "config": {
        "battery": 100,
        "on": true,
        "reachable": true
    },
    "etag": "-----------",
    "lastannounced": "2024-06-14T17:42:39Z",
    "lastseen": "2024-06-14T17:45Z",
    "manufacturername": "Signify Netherlands B.V.",
    "mode": 1,
    "modelid": "RDM002",
    "name": "My Hue Tap",
    "productname": "Hue tap dial switch",
    "state": {
        "buttonevent": 4002,           <----------------------------------------HERE
        "eventduration": 1,
        "lastupdated": "2024-06-14T17:44:19.381"
    },
    "swversion": "2.59.19",
    "type": "ZHASwitch",
    "uniqueid": "-----------"
}

Normal button events (1xxx-4xxx) change all the time after pressing. Rotation events (5xxx-6xxx) barely - almost never - occur. Multiple "Hue Tab Dial Switches" tested.

DrBlokmeister commented 1 month ago

Maybe good to read the updated messages here: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/7804 and also refer to some extra information here: https://github.com/Kane610/deconz/issues/359. Turns out that the event you should look for is not a deconz_event but a deconz_relative_rotary_event, at least in Home Assistant. These rotary events are different from the standard buttonevents.