xaviml / controllerx

Create controller-based automations with ease to control your home devices and scenes.
https://xaviml.github.io/controllerx/
MIT License
326 stars 68 forks source link

[NEW DEVICE] Support for Shelly Dimmer 2 as a Controller #1014

Open wafliron opened 4 days ago

wafliron commented 4 days ago

Would be awesome to have the Shelly Dimmer 2 added as a supported Controller. I've just had tons of them installed in my house, with several setup as "scene switches" - i.e. they're connected to light switches on the wall, connected to HA, but don't have any lights directly wired to them. I'd love to be able to use those scene switches to control "disconnected" lights with ControllerX - e.g. use the Shelly Dimmer 2 setup as a scene switch near my bedroom door to control the IKEA ZigBee bulbs in the lamps next to the bed.

I have tried using all three of the existing Shelly Controllers that ControllerX supports, but unfortunately none of them work.

Thank-you!

New Device Support

Device Information

Integrations

Integration: shelly

Actions

Short activation of SW1 channel (by default the "dim up" channel). e.g. a single short "click" of a push-button lightswitch mechanism connected to SW1 terminal on the device:

event_type: shelly.click
data:
  device_id: 2da13527cbcbe7e0181cb181e49813aa
  device: shellydimmer2-EC64C9C2EF3C
  channel: 1
  click_type: single
  generation: 1
origin: LOCAL
time_fired: "2024-07-03T09:37:05.419816+00:00"
context:
  id: 01J1VZ8TWBVD9BAM1TDEJM7KFQ
  parent_id: null
  user_id: null

Long activation of SW1 channel (by default the "dim up" channel). e.g. push-and-hold of a push-button lightswitch mechanism connected to SW1 terminal on the device - the event seems to appear in HA after the button is pushed for approx 500ms:


event_type: shelly.click
data:
  device_id: 2da13527cbcbe7e0181cb181e49813aa
  device: shellydimmer2-EC64C9C2EF3C
  channel: 1
  click_type: long
  generation: 1
origin: LOCAL
time_fired: "2024-07-03T09:51:40.702965+00:00"
context:
  id: 01J1W03HMYGGRW09GHACVFBNQ8
  parent_id: null
  user_id: null

Short activation of SW2 channel (by default the "dim down" channel). e.g. a single short "click" of a push-button lightswitch mechanism connected to SW2 terminal on the device:

event_type: shelly.click
data:
  device_id: 2da13527cbcbe7e0181cb181e49813aa
  device: shellydimmer2-EC64C9C2EF3C
  channel: 2
  click_type: single
  generation: 1
origin: LOCAL
time_fired: "2024-07-03T09:49:30.881500+00:00"
context:
  id: 01J1VZZJW164CKR0R2KDPXK28V
  parent_id: null
  user_id: null

Long activation of SW2 channel (by default the "dim down" channel). e.g. push-and-hold of a push-button lightswitch mechanism connected to SW2 terminal on the device - the event seems to appear in HA after the button is pushed for approx 500ms:

event_type: shelly.click
data:
  device_id: 2da13527cbcbe7e0181cb181e49813aa
  device: shellydimmer2-EC64C9C2EF3C
  channel: 2
  click_type: long
  generation: 1
origin: LOCAL
time_fired: "2024-07-03T09:49:32.802486+00:00"
context:
  id: 01J1VZZMR2NY9HCCX92SWK8HPB
  parent_id: null
  user_id: null

I haven't been able to generate any other events from the device - nothing similar to "release", "double click", etc.

Notes

The above events were collected with the Shelly Dimmer 2 configured in "Dual button mode" (in device's web UI -> Settings -> Button Type). In this mode you have a separate switch connected to each of the SW1 and SW2 terminals, with one acting as "dim up" and the other acting as "dim down" (when the circuit is closed on the respective terminal). I'm not clear what events would be fired (and when) for the other switch modes, and have no practical way of testing unfortunately.

wafliron commented 4 days ago

I should have added - if there's any further information you need, please let me know. And I'm ready / able to help test if you're able to add support.