Announcement

Collapse
No announcement yet.

How to integrate Sonos in HSTouch

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!
    HS4 4.2.6.0 &HSTouch Designer 3.0.80
    Plugin's:
    BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
    EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
    weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

    #2
    Some quick reactions .....


    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.

    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.

    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.

    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.

    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

    Comment


      #3
      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...

      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!
      HS4 4.2.6.0 &HSTouch Designer 3.0.80
      Plugin's:
      BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
      EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
      weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

      Comment


        #4
        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.


        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

        Comment


          #5
          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
          HS4 4.2.6.0 &HSTouch Designer 3.0.80
          Plugin's:
          BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
          EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
          weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

          Comment


            #6
            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

            Comment


              #7
              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
              HS4 4.2.6.0 &HSTouch Designer 3.0.80
              Plugin's:
              BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
              EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
              weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

              Comment


                #8
                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

                Comment


                  #9
                  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 Files
                  Mark

                  Comment


                    #10
                    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?

                    Comment


                      #11
                      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.

                      Comment

                      Working...
                      X