Google Home + Smartthings to control Logitech Music Service "easily"

So I have been lurking here for about 2 years. I have a ST Hub V2 and this November purchased a Google Home (for $99). First off I must say the interface between Smartthings and Google Home has been excellent. I have about 12 devices that I use and these all work well. I also just purchased and hooked up a Harmony Hub which is also working very well.

All this aside the one thing I have been frustrated with was controlling my music. I have a Raspi in the basement which is the Logitech Music server and also runs Squezzelite (Max2Play), a Raspi in the 2nd floor library landing running PiCorplayer, a Raspi in the 1st floor running Kodi (Max2Play video and sound through HDMI to TV) and Squezzelite (running audio to a Yamaha A/V receiver) and finally a Raspi in the Garage hooked to old Panasonic amp with 2 speaker outputs ( 1 for Garage and 1 for Outside patio). The Raspis play the music synced flawlessly through my small town home but I could not find a “easy” way to control through home automation. There is a posting but to be honest seemed way to complicated for me to try.

I knew I could control some features, especially turning on and off, the LMS via HTTP commands (COMAND=stop) but that was about it. I then found a listing of other LMS features that can be controlled. I then knew I needed something for ST to send these commands to the LMS. I searched here and found the URL switch device handler. After creating the new device handler I created my first On / Off Music Server switch.
SORRY I can only upload one picture since I am new :frowning:

After creating the switch, go to the Preferences section and click on edit

Now you need to input the INTERNAL IP address for your LM server and its port. This would be the IP address you type in to access the web GUI for controlling your LMS. Then fill in the port number. Mine was the default 9000, yours might be different. Then type in the ON command and OFF commands exactly as shown in the below pic. These commands are standard regardless of your IP address…
Preferences (edit)
Name Type Value
external_off_uri text
external_on_uri text
internal_ip text 192.168.1.77
internal_off_path text /status.html?p0=stop
internal_on_path text /status.html?p0=play
internal_port text 9000

and save accordingly.

Now start up your Smartthing app and you should see the new Music Server switch. Click On (wait for it) and the last thing you played will now play over your LMS system. Click OFF and it stops. Just say "Hey Google turn on (it is a switch so you must say Turn ON) Music server … Done. Same with turn OFF. Cool! … but wait it gets better.

Now I seem to play only a few certain internet radio stations and wanted a quick way to jump between them as I wanted. After more research I found you can call and play your stations listed in your Favorite folder listed on your LMS web page. This uses the index number (the list of favorites). Again we go back to building a URL switch. Now I named my switches starting with Play XXX, but you could drop the Play. I just wanted all these switches to be grouped together alphabetically so I could find them better. So I created a switch named Play WGN ( a local radio station in my Favorites from Tunein Radio).

Open the preference and edit, only this time you must use the ON command as I show and the OFF command as I show

NOTE: The number after the index= is the number of the station / listing in the favorites folder. Just hold your mouse over the list item and the index number will show up at the bottom of your Chrome browser.

Now you will have an additional switch showing as Play XXX. Click on it and it starts the server playing your choice. I realized then I did not need the Music server switch and eliminated it. You should click on the Play switch button to turn it off before clicking on another switch just to keep the input of the switched right (on or off). As far as I can see you can have many ??? favorites so go to it. I have about 15 right now.

To use Google Home, re sync with the Smartthing device, check off the new buttons, authorize and you can now control the LMS via voice. In my case, “Okay Google, turn on Play Smooth Jazz” and bingo, starts the server and plays station. Turn off Play Smooth Jazz. Turn on Play WGN and so on. Yes for other stations or music selections I use Orange Squeeze on my androids and Moose on my Windows 10, but this is quicker for listening to my favorites.

Hope this LONGGG post will help some others looking to automate their Logitech Media Server with Smartthimgs.

All I got to was “2nd floor library landing” then my mind went “this implies a library is present on the second floor, and more than one landing, thus staircase, to second floor… MANSION!” :slight_smile:

2 Likes

LOL no. Small townhouse with a 8 x 6 landing. I built a bookcase with reading chairs and listening radio. Believe me, it was a downsize.

2 Likes

Dashed all my mental images of walking up a majestic dual stairway with lights and quite violin music coming on and off as you pass each floor… :slight_smile:

Have a few Squeezeboxes so I added switches per player. Example below:

/index.html?player=00%3A04%3A20%3A21%3A0b%3A2c&p0=play
/index.html?player=00%3A04%3A20%3A21%3A0b%3A2c&p0=stop