Hue Dimmer to control Sonos?

Not sure if its possible or not, but I would like to control my Sonos Amp with the hue dimmer remote.

Ive been having trouble with the autoplay on line in with my turntable and am going to turn it off. However i would like a hardware way to switch to linein without having to have a phone or app handy.

There are a few Sonos specific remotes available but they are pricey (lutron pico audio, iport xpress) the ikea symfonisk remote would be perfect as i have the ikea tradfri gw already but i dont think i can activate line in with it (or favorites which i can map to linein) like the other two remotes.

This has me looking a programatic way to do it.

I really only need a single buton press so the cheapest zigbee/zwave button would work but the 4 button hue dimmer might give me more funtionality and us relatively cheap.

I havent done much with my hubitat but how would i map actions to button presses on a remote.

ive installed the official hubitat sonos integration app and know how to get linein via one of its parameters i just dont know to map it to a button

Hi,

It's easily doable. I used to do it in Hubitat, but now I use Node-Red for the logic, and Hubitat for the device connections.

You could also do any number of other things whilst activating the line in, such as setting volume, turning on a TV, changing lights (all from the same button press). This leaves the other 3 to do other smart goodness (and there is the long press on 2 buttons as well).

Start by installing the button controlling app (system app). On the device page, create a virtual button and test it out, so that you get the gist of it, whilst waiting for delivery of the Hue Dimmer. Then, when the dimmer arrives, just switch out the virtual button for the dimmer.

Thanks. Ive really only used hubitat to bridge a few zigbee and zwave devices to homekit via maker api.

To use the dimmer do i pair it directly to hubitat or the hue hub and install a hue integration?

In terms of the buttons can i have a double click action somehow. not sure if the remote supports that since you mention longpress (on the dim
er buttons i assume)

No, you need to pair the dimmer with Hubitat. If you have a Hue hub, you should keep the bulbs on there.

If you were to use Node-Red, then you could pair the dimmer with Hue hub. That's what I do with some of my Hue dimmers.

I'm pretty sure you can with double-press. From memory, you can, as Hubitat feature, and not necessarily built into the Hue dimmers. I've certainly used it with other buttons in Hubitat, but not hue dimmers (I think).

I believe double tap is only supported in RM, not in button controller.

I tried to install Button Controller -its deprecated. I installed RM4 instead.

I installed a virtual button device and created a rule in RM4 that starts playing line-in via the Sonos integration and tied this to the virtual button.

The rule action was running correctly when testing the action from RM but when I was testing the virtual button I kept pushing the push action and nothing was happening... then realised I needed to put the button number in the text field as well as push the push action.... it took me much longer than it should have to notice that. :slight_smile:

Now just waiting to get the dimmer, this should work well for my needs.

In terms of the other buttons I will likely do simple commands like play/pause toggle, and the dimmer buttons as volume +/- which have direct actions in the sonos integration. Fairly easy to do for single presses I'm just wondering how to simulate press and hold to gradually increase or decrease volume in a smooth fashion much like dimming a light. The trigger side looks to be fairly obvious but on the action side the sonos integration only has a volume up action.

And then potentially more advance stuff like double click play/pause to be next track... etc.

Glad that you got it working. Others will have to chime in about the double press/hold etc, as I dont use Hubitat for logic, and dont remember anymore - foggy brain!

However, on a separate issue, you should be able to publish the virtual button from Hubitat to a Hubitat dashboard, and then open that dashboard on your phone/lappy/tablet, so simulate the various buttons.

@dwoods36 did you get the hue dimmer to work with Sonos, i'm hoping to do the same. I'm currently using the Ikea Sonos controller but the battery life is terrible!

Yes. No issues. Paired Dimmer with Hubitat directly and used Rule Machine 4.0... I also added my Sonos speakers to Hubitat as well and was able to tie Sonos actions directly to a Dimmer button push.

The Dimmer is only exposed with certain actions though. 4 buttons, and hold actions on buttons 2 and 3 only (the dimmer buttons). I couldn't get a double press action and a few other things to work. Ive been meaning to go back and get a smooth vol+/- on hold but haven't done so yet.

Ah, so I presume you have play and pause for 1 and 4? Is the volume not smooth with the Hue? When you attach the Ikea Sonos button directly to HE you get issues with volume control, i'm currently using the Ikea hub instead for that reason.

In my case I am using it with the Amp so button 1 is play/pause (Sonos itself has a toggle action). Button 4 switches to Line-In. Then 2 and 3 are volume up and down but what I mean by smooth is each button push is just a single step. You have to push button 2 or 3 multiple times to move the volume up or down a lot. It is more precise though.

Button 2 and 3 can have Hold (or long press) actions as well and Ive seem some code here on the forum that would allow you to simulate holding down an IR remote button so it repeats until button is released but on its own, but the dimmer itself doesn't actually send the same command repeating multple times until its released like an IR remote would. Thats what I mean by smooth.

In my case, since I also wanted Next Track/Prev Track I have them mapped to volume up and down hold/long press as they are the only buttons that support a hold action (I would have preferred them on button 1/4 personally)

What I wish the dimmer did have was double tap actions so if you press a button twice quickly a different command runs, but its not something the remote supports natively, though programatically you could probably do something, with delays and sometimes only registering one click if you do it too quickly it would be frustrating.

1 Like

Hi, i'm trying to do the same. What device type did you use, I can't find hue dimmer listed?

According to the docs I should have dimmer switch listed.

image

Edit: Found it under Philips!

I got the virtual button working!

image

I think i'll have to rethink the next/previous if you say held only works on button 2/3. I was hoping for double-click too.

Did you find a command to restart the current track?

Download the Hubitat app