diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.52k stars 274 forks source link

Added RDM002 support #907

Closed Fisico closed 1 year ago

Fisico commented 1 year ago

Hi, I tried adding support for the Hue Tapdial switch. The buttons are working, the rotary part is not.

I added the sensor type "ZLLSwitch" and "ZLLRelativeRotary". Something is missing in "ZLLRelativeRotary" as the MQTT log outputs 6 different events but the deconz sensor config only has a start and repeat event. I have no clue where to source those events.

dial_rotate_left_step
dial_rotate_left_slow
dial_rotate_left_fast
dial_rotate_right_step
dial_rotate_right_slow
dial_rotate_right_fast

DiyHue Log error on rotate: 2023-05-06 15:48:16,218 - services.mqtt - INFO - MQTT Exception | 'rotaryevent'

I used the data from this. https://github.com/dresden-elektronik/deconz-rest-plugin/issues/6160

"ZLLRelativeRotary" content:

{
   "ZLLRelativeRotary":{
      "state":{
         "rotaryevent": 2,
         "expectedrotation": 90,
         "expectedeventduration": 400,
         "lastupdated":"2023-05-13T09:34:38"
      },
      "config":{
         "on":true,
         "battery":100,
         "reachable":true,
         "pending":[

         ]
      },
      "static":{
         "swupdate":{
            "state":"noupdates",
            "lastinstall":"2022-07-01T14:38:51"
         },
         "manufacturername":"Signify Netherlands B.V.",
         "productname":"Hue tap dial switch",
         "swversion":"2.59.25",
         "capabilities":{
            "certified":true,
            "primary":false,
            "inputs":[
               {
                  "repeatintervals":[
                     400
                  ],
                  "events":[
                    {
                        "rotaryevent": 1,
                        "eventtype": "start"
                      },
                      {
                        "rotaryevent": 2,
                        "eventtype": "repeat"
                      }
                    ]
                  }
                ]
              }
            }
        }
    }