Philips Hue Tap Dial button - potential music (Sonos) controller?

I got mine, they're not quite what I thought they would be. I had presumed that each of the 4 buttons allows you to switch rooms then you can use the dial to control the lights in that room, that is not the case. The dial is always associated with 1 room only, the buttons can be use to cycle scenes in other rooms then held down for off in that room.

I'll try out my other unit direct to HE at the weekend.

1 Like

Sorry, not that it's actually gonna work without drivers but I'm sending back my 2nd one, bought 2 white but want a black one for Sonos (hopefully!) So people don't confuse it with a light switch :rofl:

Got the black one now. It pairs with HE as a 'Philips Dimmer Button Controller V2'. As it is only clicking button 4 appears in the log as a click.

So there's hope!

Pretty sure I'd buy a couple of these if a working driver is available.

Samotech has just release an adapter for these to go over UK sockets. Fast turnaround, I emailed them a couple of weeks back to see if they had a product, they said to try the version for the Hue Button which I did. It was a few mm small (not sure why I didn't check that beforehand!). The next week they had this, just got mine.

https://www.samotech.co.uk/products/hue-tap-dial-3d-printed-adapter-for-uk-eu-light-switches/

I wrote a driver that works decently well. The dial is setup to be a dimmer/level value 0-100.
And the firmware I'm currently on, all the buttons work 1-4, but when you hold down a button, no matter what, the same data comes out of the device, so I've set that up as button 5-held for now.

I don't have a hue hub, so I can't update the firmware, but I will try to update it at my partners house this weekend to see if that fixes the held button issue.

Here's the driver
https://raw.githubusercontent.com/Andywebs/hubitat/main/drivers/PhilipsHueTapDialV2.groovy

3 Likes

Thanks @andywebs :smile:

I'll set mine up today and try it out. 2.59.25 looks to be the latest firmware, just need to wait for my new one to update.

Mine took about an hour or so to update. I got a second one and it was fine from the start.

The dial also appears to work with CocoHue if you are interested.

1 Like

Thanks. Not used CocoHue before, will read up on it

1 Like

I've added the dial with the new driver but don't seem to get any response from it, no button presses/dial movements are showing up in HE logs/device page. There is an error in the log though

I don't think this is being run, when I go to the button controller it's showing 10 buttons for the dial.

image

If I comment out those 'runIn' calls then click configure in the device it correctly shows 5 buttons. Still no response from the dial itself though.

image * << the pushed is from clicking 'push' on the device page

1 Like

Yup, it works in CocoHue
5 = dial anti-clockwise
6 = dial clockwise
held seems to work on all 4 buttons

image

Here's how I've set it up with the button controller for a Sonos speaker. Volume control is okay if you move the dial slowly. I guess there needs to be 2 extra commands, eg held = start raising volume, released = stop raising volume.

There's a post here on the smooth volume issue Advanced Button Controller (ABC) - #173 by SmartHomePrimer

2 Likes

Based on that catchall output, it looks like the device is sending out different data with the new firmware.

I’ll have it updated after the weekend and will fix my driver then. But it seems like someone else also has a working driver. Wish I had found that before writing this one.

I’m very hopeful the new firmware really does fix the held button issue. The out of the box firmware sent identical messages regardless of button held.

2 Likes

1 thing to note with the held command is that it does the pushed first, at least on the Coco driver

For what it's worth, I treat all my drivers as a chance to learn something new, with the idea that either someone else will develop something better, or the premise behind my work will be surpassed, taking what I can from my work on the driver. That said, I could imagine that for some, having a potentially leaner interaction with the Hue bridge for a dedicated purpose may be appealing....

Yeah, I would prefer the dedicated driver. Seems overkill installing cocohue just for this.

The updated firmware hasn’t seemed to change anything. Still only receiving data that there was a held button. It looks like the previous issue was with how I am configuring the device. This is my first driver for hubitat, and the first time dealing with zigbee, so YMMV.

The way I had it working before, I didn’t have the fingerprint in there, so when it did it’s initial registration, it seems to have detected as a philips dimmer button controller v2. Then I set the driver to my custom driver. That remains the most consisten method to get this working.

I’ve been working on the configure method, and it now “works”.

1.) Reset tap dial - holding setup button for 10 seconds.
2.) add device -> manual zigbee device.
3.) Detects device. Name it, add it to a room if you like
4.) At this point, it seems to go into a loop of disconnecting/reconnecting.
5.) Go bac to add device->manual zigbee
6.) when it says detecting already added device, when the tap dial blinks green, I then hit stop zigbee pairing.

I’m mostly happy with how the driver is working, and less so with how the configuration works. I’ve looked at a lot of documentation, but it is immense. Happy to get feedback or direction on what’s going wrong. I couldn’t find the code for the built-in dimmer button controller driver v2, which would be great to see how that configure/binding is working so well.

1 Like

With your driver does holding down a button trigger the push first and then the held command? That seems to be the issue with the Coco driver, rendering held pretty useless.

@bertabcd1234 - it feels you are likely best to comment on how the Coco-Hue drivers work with the Tap Dial device.....

1 Like

I tested a few button devices and can't remember what this one did specifically, but the general trend was that they'd send an even on an initial push/tap, then keep sending additional events if the button is held. There is nothing for release. CoCoHue just takes these events and makes "pushed" or "held" out of it, so the above sounds normal. This is in line with what the devices actually report.

It's not the only way this data could be dealt with, but the only other thing I can think of is to add some timer and fake a "released" event if there isn't any additional data for a certain amount of time after a hold. This is risky in general but probably particularly so with a chain of Zigbee (Hue network) to LAN (Hue Bridge) to Hubitat (over a still-in-development API, at that). Separately, there could be something that suppresses "pushed" unless it knows a "held" isn't happening, which would also involve a timer and I think is a bad idea for two reasons, the one I just mentioned and the fact that this would delay "pushed" for users who only care about that event (solvable with a separate "fast" driver, I suppose, but this is all more complex than I'd like it to be).

3 Likes

Yeah I see what you mean, for myself I'm not really bothered about held, a 4 button controller with a dial is perfect for my Sonos!

I was thinking though, I have a 'Sonoff ZigBee Button Controller', just a single button but that handles push/held/double-click.

If I get some spare time I'll look into how it does it and see if I can work it out, I'm a driver virgin though :rofl: