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

Hue dimmer switch repeat setting #368

Closed
ebaauw opened this issue Aug 18, 2018 · 4 comments
Closed

Hue dimmer switch repeat setting #368

ebaauw opened this issue Aug 18, 2018 · 4 comments

Comments

@ebaauw
Copy link
Owner

ebaauw commented Aug 18, 2018

If you're as old a me, you might remember your first analogue joystick had a normal/repeat switch. Normally, you would have to press/release the trigger repeatedly in quick succession to fire a salvo, but in the repeat setting, you could keep the trigger pressed and the joystick would send press events repeatedly. I'm thinking of a similar option for the Hue dimmer switch.

As you might know, the Hue dimmer switch generates the following events (buttonevent values):

  • x000: initial press;
  • x001: hold;
  • x002: release (after initial press);
  • x003: release (after hold).
    As far as I know, the Hue dimmer switch is the only switch that sends a hold event every second (or so), while the button is held.

Currently homebridge-hue issues a HomeKit Single Press on the x002 event, and a Long Press on the first x001 or x003 event (the x000 and first x001 from the Hue bridge might be missed, due to polling). With the "repeat" setting, homebridge-hue would issue a HomeKit Single Press on each x001 event and on the x002 and x003 event, while Long Press would no longer be issued. Of course this would work best with deCONZ, issuing a web socket event for every button event.

This idea came to mind while controlling my Sonos speakers from an IKEA remote. I would like to be able to hold a button for Volume Up, instead of having to press/release the Up button repeatedly. However, neither HomeKit nor Sonos supports anything equivalent to the typical ZigBee Move to level and Stop commands, which map so well to the x001 and 0x003 events. With repeat, a HomeKit automation could simply do a Volume increase on each Single Press event.

Note that this still wouldn't allow for light dimming from HomeKit automations, as HomeKit lacks a bri_inc equivalent.

Help wanted:

  • Would you be interested in such an option? What would you use it for?
  • Would you be interested in custom characteristics to increase/decrease the brightness, as I've created for volume and track in homebridge-zp?
  • How would you want to set repeat mode?
    • Using a resourcelink? What about different settings per button? Four resourcelinks?
    • Using another custom characteristic. That would involve re-introducing a custom service for the switch to hold this characteristic. LastUpdated, Enabled, and Resource would then also move there (they're actually still there in the Service Label service, but even Eve doesn't show this service). Also this would require dynamic homebridge accessories (see issue Support dynamic homebridge accessories #4) to persist the setting accross homebridge restarts.
ebaauw added a commit that referenced this issue Aug 19, 2018
Experimental support for repeat setting on the Hue dimmer switch.  When setting `"hueDimmerRepeat": true` in config.json, the Hue dimmer switch _Dim Up_ and _Dim Down_ buttons continuously fire HomeKit _Short Press_ events while held.
@ebaauw
Copy link
Owner Author

ebaauw commented Aug 19, 2018

Added experimental support. When setting "hueDimmerRepeat": true in config.json, repeat is enabled for the Dim Up and Dim Down buttons of all Hue dimmer switches.

@ebaauw ebaauw closed this as completed Aug 25, 2018
@Garywoo
Copy link

Garywoo commented Jan 8, 2019

Am I right in thinking that hueDimmerRepeat is only supported when nativeHomeKitSensors is set to false?

I currently have 10 sensors and switches set up using the native Hue HomeKit support. Would I need to re-configure my automations to enable hueDimmerRepeat?

@ebaauw
Copy link
Owner Author

ebaauw commented Jan 9, 2019

Yes, you need to expose the Hue dimmer through homebridge-hue. Note that, unlike deCONZ, the Hue bridge doesn’t send notifications, so you’ll get one Single Press per heartrate interval.

The Hue bridge will continue to expose the Hue dimmer switch, unless you remove it from HomeKit, so your existing automations will still be there. HomeKit will see the Hue dimmer switch exposed by homebridge-hue as a different accessory, so you would need to do the room, scene, and automation settings for that.

@ckeech
Copy link

ckeech commented Sep 26, 2020

I'm a bit confused by this. I have used this for the same reason you mentioned, Symfonisk sound controller vol up and down. I've noticed you have to move it slowly left and right and the repeats are quite slow.

Alternatively now I'm trying to use the Ikea TRADFRI on/off switch and long presses don't seem to ever repeat. I'm using deCONZ. nativeHomeKitSensors is on true, tried changing to false and it didn't seem to make a difference.

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

No branches or pull requests

3 participants