Sonos Buttons?

Anyone have experience with the hubitat_sonosButtons package here:

Looking for help getting it set up and integrating with Sharptools

I have experience with it. :sunglasses:

What are you having trouble with, @jcarreira ?

1 Like

Oh, great!

Well, I've started figuring out how to set up playlists directly in Sonos (as opposed to Spotify) so I can map them to buttons. I've gotten it where I can locally send the push command to start a playlist on a particular Sonos. Right now I'm stuck on Sharptools. I exposed the Sonos Button System-House device that I created but sending it a push:1 isn't doing anything. I don't suppose you have experience mapping this into Sharptools?

I think the problem may be that they don't show up as Actuators in the mapping to import into Sharptools so it may not be calling methods on the device.

I haven't used Sharptools, but if that is a requirement I can easily add it. Will you try adding capability "Actuator" in the driver source on your local hub (in the Sonos Buttons driver)? I'll add it into my driver if that fixes it.

Do I need to re-create my buttons after updating the source?

You already have it authorized in SharpTools, right? Just trying to figure out what command to use... or?

Edit: The reason I say that is I noticed the sonosButton driver implements the PushableButton so it should show up under the 'Which Buttons?" selection during authorization.

I know the command, it's just not getting sent to Hubitat

Can you clarify what you mean by it's not getting sent to Hubitat? How are you sending the command?

Ahh... Something's off in my media item. I just mapped the rule directly into the dashboard and it works.

In the media tile I've got "Open Hyperlink" for the action and I'm using the $.runRule("foo") but it's not running the rule, I guess?

No.

Can you share a screenshot of the Media Item's hyperlink configuration? Feel free to PM me if you prefer.

One thing to watch out for is making sure it's using straight quotes:

“Bad”

"Good"
1 Like

Try updating the Rule ID with the following tip (source):

Works! Thanks! Looks like it doesn't need to be an actuator @tomw (I changed it back)

2 Likes

Can you share how you did this? I would like to use Sonos directly so I can use my local media, but I never spent much time messing with it in the Sonos app.

I assume he's following the first 3 steps from this post (which sparked the jishi/node-sonos-http-api discussion. :stuck_out_tongue:

1 Like

For this one I just selected a playlist in Spotify in the Sonos app and told it to save to a Sonos playlist. From there I assume you could add other songs to the playlist from other sources.

1 Like

@tomw How would I run presets in the jishi API? Those are outside the particular zone. I want to have a button to run a preset that groups all of the Sonos and sets their volumes, etc. Then have another button that ungroups back to just the one.

Good idea. I hadn't thought of that. I'll need to add the button functionality to the system device as well. Let me think about how to structure that, and then I'll send you something to try.

1 Like