www.homeseer.com    
 

Go Back   HomeSeer Message Board > Media Plug-ins > Media Discussion > PI-SonosController (3P)

PI-SonosController (3P) Discussion of Sonos Controller Plug-in

Reply
 
Thread Tools Display Modes
  #1  
Old September 11th, 2017, 04:47 PM
The Profit's Avatar
The Profit The Profit is offline
Seer Deluxe
 
Join Date: Jul 2015
Location: San Diego, CA
Posts: 290
How to integrate Sonos in HSTouch

Hello, I've just purchased a Sonos speaker and love it!

I'd like to find out how others have integrated Sonos with HST. Ideally, I'd like to have one set of buttons for Play, pause, forward, back etc. and be able to select which player those buttons control. Some screens I've seen on here seem to have one set of those buttons for each player, I guess that would be fine too but thought I would ask and see what others have done. (Screen shots of your HST music screens would be great to see as well)

Also, I've seen some posts about browsing music to play on Sonos from 2015 that indicated it wasn't possible then, has that changed at all?

What I would like to be able to do from various tablets around the house is:
1) Browse music in iTunes and play on Sonos speaker
2) Select/Browse the other source options, Spotify, iTunes, Pandora etc
-I know Sonos has an app that can do this but thought it might be more convenient if it was already up and ready on an HST tablet. I'm using a mix of iPads and Windows tablets in which both Spotify and Sonos have apps for....anyway....looking for other ideas of the best way to set everything up.

I've seen that Spud and Blade have iTunes plugins that will allow you to browse iTunes libraries and play on airplay speakers but I'm assuming that they don't work with Sonos speakers?

Thanks for any help!
Reply With Quote
  #2  
Old September 11th, 2017, 05:17 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,562
Some quick reactions .....


Quote:
Originally Posted by The Profit View Post
I'd like to find out how others have integrated Sonos with HST. Ideally, I'd like to have one set of buttons for Play, pause, forward, back etc. and be able to select which player those buttons control. Some screens I've seen on here seem to have one set of those buttons for each player, I guess that would be fine too but thought I would ask and see what others have done. (Screen shots of your HST music screens would be great to see as well)
The PI creates about 20 buttons per player, so you can put those in HST screens. Doing what you say (one set of buttons and select player), I don't see how you can do that but maybe others have some great ideas.

Quote:
Originally Posted by The Profit View Post
Also, I've seen some posts about browsing music to play on Sonos from 2015 that indicated it wasn't possible then, has that changed at all?
Not really. There is now an option to turn on the MediaAPI, I was actually playing with it over the weekend to see if the most recent changes of incorporating HST in HS3 made any difference. The navigation seems to work, actually pretty zappy on my PC but things like playlists and next functions, I can't seem to figure out how to make them work. So at this point, I'm not recommending anyone to use this function, moreover, I see a lot of chatter between HS and the PI and I'm afraid that without optimizing that interface, it will slow down your system a lot if you have a large set-up. I was emailing with the HS team over the weekend, it appears that no effort/fixes have been made for a long time for the MediaAPI so not clear how or if Blade and Spud figured out a way to make everything work or resided with the parts that work only.

Quote:
Originally Posted by The Profit View Post
1) Browse music in iTunes and play on Sonos speaker
is this Apple music or an iTunes app that is active on your LAN? The only thing you can browse (using this PI) is content that the Sonos player has discovered on your local network.

Quote:
Originally Posted by The Profit View Post
2) Select/Browse the other source options, Spotify, iTunes, Pandora etc
You cannot use the PI to browse "premium" content, there is no interface from the player available to do this. The PI "learns" a few things like Pandora, XM so after it learned it, you can play it, good for events/actions but no browsing via HST.

Quote:
Originally Posted by The Profit View Post
I've seen that Spud and Blade have iTunes plugins that will allow you to browse iTunes libraries and play on airplay speakers but I'm assuming that they don't work with Sonos speakers?
I don't think so. The closest you would get to browse/play local content towards Sonos is either have Sonos discover it (and then it is part of the Sonos Music DB). I'll let Blade and Spud comment on their PI, they may not be reading this thread so you may need to re-post it on their forums.

Hope this helps,

Dirk
Reply With Quote
  #3  
Old September 11th, 2017, 05:45 PM
The Profit's Avatar
The Profit The Profit is offline
Seer Deluxe
 
Join Date: Jul 2015
Location: San Diego, CA
Posts: 290
Quote:
Originally Posted by dcorsus View Post
is this Apple music or an iTunes app that is active on your LAN? The only thing you can browse (using this PI) is content that the Sonos player has discovered on your local network.
What I was thinking was to have a NAS device on my LAN where both my wife & my iTunes music is stored and have Sonos use that library. I might have to install the Sonos app or iTunes app on a windows computer and point it to the iTunes library in order to make this happen, not sure yet...

Quote:
Originally Posted by dcorsus View Post
You cannot use the PI to browse "premium" content, there is no interface from the player available to do this. The PI "learns" a few things like Pandora, XM so after it learned it, you can play it, good for events/actions but no browsing via HST.



I don't think so. The closest you would get to browse/play local content towards Sonos is either have Sonos discover it (and then it is part of the Sonos Music DB). I'll let Blade and Spud comment on their PI, they may not be reading this thread so you may need to re-post it on their forums.

Hope this helps,

Dirk
When you say the PI learns a few things like Pandora/XM and can play it with events...it sounds like once the PI learns what premium accounts are linked to your Sonos account an event can initiate playing from those accounts? So if I set up a button in HST to trigger an event and have that event start playing a playlist from Spotify for example, is that how I could switch from playing an iTunes source to a Spotify source?

Thanks for the quick answers Dirk!
Reply With Quote
  #4  
Old September 11th, 2017, 05:59 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,562
Quote:
Originally Posted by The Profit View Post
What I was thinking was to have a NAS device on my LAN where both my wife & my iTunes music is stored and have Sonos use that library. I might have to install the Sonos app or iTunes app on a windows computer and point it to the iTunes library in order to make this happen, not sure yet...
Just open the Sonos APP and tell it where the NAS content is and it will discover it and put in its DB. After the Sonos DB gets copied to the PI's DB, you will be able to select tracks etc for events/actions.


Quote:
Originally Posted by The Profit View Post
When you say the PI learns a few things like Pandora/XM and can play it with events...it sounds like once the PI learns what premium accounts are linked to your Sonos account an event can initiate playing from those accounts? So if I set up a button in HST to trigger an event and have that event start playing a playlist from Spotify for example, is that how I could switch from playing an iTunes source to a Spotify source?
Not sure about Spotify but say you play a Adele Pandora radio stations, once you do that, the PI will put "how" to play that in his DB and you can now create a simple action/event to play that station. I never had Spotify so not sure how it works nor did I ever write specific code for it but if Sonos treats it internally say like a Pandora Radio stations, the PI will learn it. Easy to try, just play it and see if you can select when you go to the PIs player control screen
Reply With Quote
  #5  
Old September 11th, 2017, 07:23 PM
The Profit's Avatar
The Profit The Profit is offline
Seer Deluxe
 
Join Date: Jul 2015
Location: San Diego, CA
Posts: 290
Quote:
Originally Posted by dcorsus View Post
Just open the Sonos APP and tell it where the NAS content is and it will discover it and put in its DB. After the Sonos DB gets copied to the PI's DB, you will be able to select tracks etc for events/actions.




Not sure about Spotify but say you play a Adele Pandora radio stations, once you do that, the PI will put "how" to play that in his DB and you can now create a simple action/event to play that station. I never had Spotify so not sure how it works nor did I ever write specific code for it but if Sonos treats it internally say like a Pandora Radio stations, the PI will learn it. Easy to try, just play it and see if you can select when you go to the PIs player control screen


Ok, I have tried playing both Pandora and Spotify playlists and stations from the Sonos plugin and then opened up the player from the PI interface for the family room speaker, then I pressed the playlists, radio stations, artists buttons and all of them show an error in the HS log:
Error DBGetTracks for Family Room with Query=SELECT * FROM Tracks
Sep-11 4:17:59 PM Sonos ErrorError DBGetTracks for zoneplayer Family Room unable to open DB with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:57 PM Sonos ErrorGetAlbums unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:55 PM Sonos ErrorGetPlaylists unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:25 PM Sonos ErrorGetPlaylists unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:17 PM Sonos ErrorGetGenres unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks

I'm guessing that I haven't set something up correctly? I have the Learn Radio stations checked but the Auto update flag isn't, is that the one that should be checked?


Sent from my iPad using Tapatalk
Reply With Quote
  #6  
Old September 11th, 2017, 07:25 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,562
Quote:
Originally Posted by The Profit View Post
Ok, I have tried playing both Pandora and Spotify playlists and stations from the Sonos plugin and then opened up the player from the PI interface for the family room speaker, then I pressed the playlists, radio stations, artists buttons and all of them show an error in the HS log:
Error DBGetTracks for Family Room with Query=SELECT * FROM Tracks
Sep-11 4:17:59 PM Sonos ErrorError DBGetTracks for zoneplayer Family Room unable to open DB with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:57 PM Sonos ErrorGetAlbums unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:55 PM Sonos ErrorGetPlaylists unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:25 PM Sonos ErrorGetPlaylists unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks
Sep-11 4:17:17 PM Sonos ErrorGetGenres unable to open DB for zoneplayer = Family Room with error- SQL logic error or missing database no such table: Tracks

I'm guessing that I haven't set something up correctly? I have the Learn Radio stations checked but the Auto update flag isn't, is that the one that should be checked?


Sent from my iPad using Tapatalk
You need to create a music DB first. go to HS device page, click on "Control" under the Sonos master device, click on create music db
Reply With Quote
  #7  
Old September 11th, 2017, 07:47 PM
The Profit's Avatar
The Profit The Profit is offline
Seer Deluxe
 
Join Date: Jul 2015
Location: San Diego, CA
Posts: 290
Quote:
Originally Posted by dcorsus View Post
You need to create a music DB first. go to HS device page, click on "Control" under the Sonos master device, click on create music db


I'm sure you already know this....that worked! Just so you know, the plugin is pulling in the Spotify Radio stations, for the Pandora stations it shows "Pandora" next to them but for the Spotify it shows "Learned". I assume this is because you haven't tested it with your plugin and written code for it yet. Either way, thank you so much for this plugin! I'm going to dig more into it this week and learn more about it!

P.S. - Would still like to see how other users have set up their HST interface /audio setup to get some ideas about ways to set mine up!


Sent from my iPad using Tapatalk
Reply With Quote
  #8  
Old September 12th, 2017, 05:15 AM
mrhappy mrhappy is offline
OverSeer
 
Join Date: Nov 2007
Location: W.Mids, UK
Posts: 7,090
I worked on the principle that I would never get the functionality of the Sonos app in HSTouch no matter what, as such I have basic control in HSTouch and then have a button in HSTouch that takes me to the Sonos app. I have each speaker with a mute on/off button, a volume up/down control then a stopped/paused/playing button.

I can launch a couple of playlists/radio stations that I use more than most but clicking on the cover art takes me to the Sonos app. The top here is my Sonos screen -
https://forums.homeseer.com/attachme...8&d=1447787244
Reply With Quote
  #9  
Old September 12th, 2017, 08:44 PM
Mark S. Mark S. is offline
Seer Master
 
Join Date: Jun 2002
Location: Connecticut
Posts: 599
Like Mr Happy, I only use the basics in my HSTouch screens. I wish the Music API worked so I could at least more easily select learned stations. But for now I just hit the Sonos>> button to open the Sonos App. If/when the MusicAPI is incorporated, I will hit the Play>> button which will hopefully take me to a screen to select stations, playlists, etc.

My screenshot is attached.
Attached Images
 
__________________
Mark

Hometroller S6 w/ HS3Pro, Way2Call
BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave
Reply With Quote
  #10  
Old September 13th, 2017, 01:24 AM
Freddan101 Freddan101 is offline
Seer Deluxe
 
Join Date: Jul 2016
Location: Sweden
Posts: 194
Has anybody solved the progress bar (showing how much of the current song that has been played) and the slider to fast forward/backwards within a song?
Reply With Quote
  #11  
Old September 13th, 2017, 11:39 PM
grtaylor grtaylor is offline
Seer Deluxe
 
Join Date: Jan 2017
Location: WA
Posts: 142
There's a thread here with two examples of HST implementations. https://forums.homeseer.com/showthread.php?t=188246

I haven't really added or changed much other than add more presets, but what I have is sufficient for 99% of what we need.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SONOS & HSTOUCH smokeycoles HomeSeer General Discussion Area 2 June 11th, 2016 01:06 PM
Sonos and HSTouch Agwan PI-SonosController (3P) 8 May 22nd, 2014 03:06 PM
Is there an easy way to integrate HS Phone into HSTouch? tmcgowan Clients - Apple iPhone/iPod/iPad 4 November 23rd, 2012 01:34 PM
integrate w/HSTouch completelyhis pjc Network 0 December 31st, 2010 02:58 PM
best way to integrate HSTouch and my DVD collection completelyhis HSTouch™ 22 November 26th, 2010 01:41 AM


All times are GMT -4. The time now is 05:51 AM.


Copyright HomeSeer Technologies, LLC