Foddy / node-red-contrib-huemagic

Philips Hue node to control bridges, lights, groups, motion sensors, temperature sensors and Lux sensors using Node-RED.
https://flows.nodered.org/node/node-red-contrib-huemagic
Apache License 2.0
201 stars 67 forks source link

Dimming functions of Lutron Aurora? #275

Open hurenkam opened 2 years ago

hurenkam commented 2 years ago

With the recent 4.0.x versions, the Lutron Aurora is now supported, and the button on it can be programmed through the Hue Buttons node, which works well. However, the dimming functions on the dial can not be used, which is too bad, and basically degrades the device to be a smart button. So my request is to add support for the rotary of the Lutron Aurora.

Foddy commented 2 years ago

Hm… This kind of dimmers are not sold (and common) in Germany, so I’m unfortunately unable to test their functionality with HueMagic.

As far as I understand this correctly, you can rotate the dial to change the brightness level and you’re able to press it to turn on/off a light/device?

The official Philips Hue CLIP/v2 docs (which should be international) don’t mention this device and I don’t see any "special" resources to control or get the current rotation status of the device.

What happens if you rotate the dial? Don’t you see in the Hue Buttons node any response? I feel like it should output at least another button id (instead the "press" id) if you rotate it to the left for example?

hurenkam commented 2 years ago

It looks like the rotary is not a different button on the same logical device, but a different logical device instance. If i look in the All4Hue app which i sometimes use to manually edit rules, it will list 2 instances for each aurora, one device listed as 'Switch' in the Hue Switches section, the other listed as 'Hue Rotary Switch' in the Friends of Hue Switches section, similar to how sensors are also split in 3 ways, as motion/light/temperature devices. I'll see if i can get some info on how it is exposed through ClipV2, but that will take me some time, so i will get back on that. I couldn't purchase these rotary switches here in the Netherlands either, but i have ordered them from USA through amazon.com. Since they are battery operated, they work just fine here in Europe, of course you have to be a little bit creative to mount them, since we don't have the US switches for which they were designed. A bit of double sided tape will do the job just fine.

hurenkam commented 2 years ago

When i monitor the ClipV2 events as is shown in the example curl command here: https://developers.meethue.com/develop/hue-api-v2/core-concepts/

Then i do notice incoming button pressed events: id: 1642464298:0 data: [{"creationtime":"2022-01-18T00:04:57Z","data":[{"button":{"last_event":"initial_press"},"id":"4e616d88-342c-4ab4-b4b7-5a31d743d982","id_v1":"/sensors/158","owner":{"rid":"6521cd00-592d-4843-a22b-87bbc9b03457","rtype":"device"},"type":"button"}],"id":"d68d6be2-2764-4cec-9159-c5a934d30f58","type":"update"}]

However when i turn the dial to dim up/down, no events are reported here. This suggests that Clip V2 API currently does not expose the rotary events through the event interface. That is really too bad, will need to address this with Signify then. Will get back to this when i know more.

hurenkam commented 2 years ago

Could not get an official answer to this question, unofficial sources indicate that this may become available with the next update, but no timeline was given.

hurenkam commented 1 year ago

It seems my bridge is now reporting rotary events for the Lutron Aurora device:

id: 1665096597:0
data: [
  {
    "creationtime": "2022-10-06T22:49:57Z",
    "data": [
      {
        "id": "77146cc9-d975-4b1d-bf54-c782bd7e302a",
        "id_v1": "/sensors/62",
        "owner": {
          "rid": "6e84a79c-220e-4d28-8dab-bdf08e4afba5",
          "rtype": "device"
        },
        "relative_rotary": {
          "last_event": {
            "action": "start",
            "rotation": {
              "direction": "clock_wise",
              "duration": 400,
              "steps": 112
            }
          }
        },
        "type": "relative_rotary"
      }
    ],
    "id": "348c0573-209d-4b51-a8f2-3e67b69f27d3",
    "type": "update"
  }
]