homebridge-sonos icon indicating copy to clipboard operation
homebridge-sonos copied to clipboard

Will a command start a radio station straight away?

Open miguelmolez opened this issue 8 years ago • 14 comments

I'm upgrading my kitchen speaker to a Sonos Play 3, I was wondering if I could set a scene.

e.g - "Its Morning" So my Wemo starts with a kettle and the Sonos automatically plays a station?

miguelmolez avatar Mar 27 '16 21:03 miguelmolez

Yes. You'll need to set the station to be a favorite through your normal Sonos application, though. I have an "I'm home" scene, for example, which turns on the lights in my hallway and living room and activates a "Top 100 tracks today" playlist from Spotify over Sonos in the same two rooms.

BrekiTomasson avatar Mar 29 '16 11:03 BrekiTomasson

Thanks for the reply. Just to confirm the sonos ap has a function to start a favourite on start up? No further action needed?

miguelmolez avatar Mar 29 '16 12:03 miguelmolez

@BrekiTomasson How do you start a specific Sonos favorite in a scene? I'm using the Eve-App and there I can only define Power and Volume for the Sonos-Players. Thanky for your support in advance.

Nousemusic avatar Mar 29 '16 15:03 Nousemusic

Here's an example of a scene I'm using in the presets.json file:

"sleep30": {
  "players": [
    { "roomName": "Bedroom", "volume": 5 }
  ],
  "state": "playing",
  "favorite": "Nightstorms",
  "playMode": "SHUFFLE",
  "sleep": "00:30:00",
  "crossfade": true,
  "pauseOthers": true
}

This preset pauses all other players that might be out there, starts up a favorite that I call "Nightstorms" on my Bedroom Sonos, with a 5% volume, and puts a sleep timer on 30 minutes. Then just call this "device" in your scene.

BrekiTomasson avatar Apr 01 '16 09:04 BrekiTomasson

Where do you run the presets.json file? Is there a separate plugin?

miguelmolez avatar Apr 01 '16 10:04 miguelmolez

@BrekiTomasson, would love some more info on presets. I've done a lot of searching and struggling to find anything. Where do you save the presets file and have you got an example of the full json? Thanks

gizbod avatar Apr 09 '16 16:04 gizbod

@miguelmolez @gizbod - I believe @BrekiTomasson is referring https://github.com/jishi/node-sonos-http-api

I'd be interested to know how this integrates (if at all) with the homebridge plugin, I'm not sure if the sones-http-api exposes a sonos "player" to the plugin?

Probably worth installing the nodejs HTTP interface and seeing what happens - I'll update if I find anything, but this sounds perfect for integrating SONOS fully

mattnewham avatar May 03 '16 17:05 mattnewham

It looks like the HTTP API is incredibly flexible, and IMO the best way forward would be to start that API as a separate nodeJS service, and send commands to it via the HTTP plugin

mattnewham avatar May 03 '16 21:05 mattnewham

Hang on, so you can actually create a scene in for example the Eve app, which starts a specific (favorite) playlist from the Sonos app? If so, I'd love to learn how.

samuel-larsson avatar May 05 '16 20:05 samuel-larsson

@samuel-larsson Yes. It's not exactly simple and doesn't use this plugin at all - join the slack team at https://homebridgeteam.slack.com/ and send me a DM I will show you how

I'll probably write this up somewhere soon

mattnewham avatar May 05 '16 20:05 mattnewham

@mattnewham Matt thanks for looking into this, I will try set this up but i might have to ask for some guidance on the slack page also. :)

gizbod avatar May 09 '16 20:05 gizbod

@mattnewham have you had success? I'm also looking for a solution to add a sonos playlist to an Eve app (or other) scene. I tried joining the slack team, but can't do that without an invite.

lsmith07 avatar Dec 01 '16 04:12 lsmith07

@lsmith07 you need to use the jishi Sonos api. Along with the http plugin to do that. This Sonos plugin doesn't give you the options you need to do what you want as far as I'm aware. Also if you follow the slack link, I don't think you you an invitation for this slack team. You should just be able to sign up.

gizbod avatar Dec 01 '16 10:12 gizbod

@lsmith07 Anyone can join the Slack team using the invite link from the Homebridge page: https://homebridge-slackin.herokuapp.com/

nfarina avatar Dec 01 '16 16:12 nfarina