Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 22 12311 ... LastLast
Results 1 to 10 of 212
  1. #1
    Senior Member
    Join Date
    Feb 2017
    Posts
    136

    Announce: LMS Controls - Google Home / Google Assistant Voice Control of LMS Players

    For those who may be interested, I have opened a github project here: https://github.com/ynot123/LMS_Controls that contains the code required to voice enable much of your LMS Player services. An audio demo is also available there.

    The project allows voice control for your Logitech Media Server from Google Home or Google Assistant (on your iPhone / Android device) with Home Assistant (HA) acting as the middle man. The following functions are supported:
    • Perform queries for songs, albums, artists and playlists from the LMS server or from the music source Spotify
    • Compound queries are supported (ie: "Play album Breakfast in America by Supertramp in the Kitchen with Shuffle on")
    • Play queried items on selected player
    • Add queried items to select player's playlist
    • Set music source (local LMS database or Spotify (using spotty)
    • Set selected default player (can be changed on the fly)
    • Set volume
    • Set sleep timer
    • Set shuffle on / off
    • Set repeat on / off
    • Next track
    • Pause and re-start players

    A Home Assistant web GUI front-end for the query tool is also included. Using HA you can further enhance the LMS tools to create home automation scenes (ie: play your favorite radio station when you get home, turn down the lights when listening to music, etc..).

    Warning, there is some configuration required to make this work (checkout the REAME.md files).

    The prerequisites for this are:
    • Logitech Media Server (obviously )
    • Home Assistant (HASSIO) - open source home automation package (can be run on a PI or even on your LMS server)
    • Google Home (or google assistant for android or Iphone devices)
    • Developer account for Dialogflow for the voice activation part
    • Spotify account with Client_ID and Client_Secret to allow query processing

    If interested give it a go. Been using it for sometime now and find it "cute" and convenient for simple listening and I especially enjoy the sleep timer feature.

    Ynot

    *** EDITED January 20, 2019 ***

    LMS Controls Project Updated - January 18, 2019

    New features / upgrades include:
    - Use of a package file (most HA changes are all in one file now)
    - Audio feedback of query results and player status
    - Created an env.sh file which contains the bulk of the shell file customization details (much less editing this way )
    - Better error checking on query results
    - Support of contractions (it's, don't) and
    - The ability to handle both secured and unsecured LMS installations.
    - Updated installation and troubleshooting documents have also been updated.
    - Hass.io / Home Assistant installation document for multiple platforms to help users new to Hass.io / Home Assistant.

    Thanks and enjoy.

    Ynot.
    Last edited by ynot1234567890; 2019-01-20 at 14:30. Reason: Updated project
    Software - Logitech Media Server Version: 7.9.3 (Docker), Home Assistant 0.140.3, DialogFlow - V.2 API, LMS Controls App - Voice Control of LMS, OpenMediaVault 5.2
    Add-ons - Spotty, UPnP / DLNA Bridge, Cast Bridge,
    Players - Sonos, UPnP, PI3 - PI Core Player 3.5.0 with IQAudio TopHat, Android- SB Player with Viper4Android Convolution Engine, GoogleHome and Google Minis
    Hardware - HP Desktop - i7-3.4Ghz, 4GB Ram, 6TB storage, Debian

  2. #2
    Junior Member
    Join Date
    Jun 2015
    Posts
    11
    This looks brilliant! Can't wait to get some time to sit down and set this all up

    Sent from my Nexus 6 using Tapatalk

  3. #3
    Senior Member
    Join Date
    Feb 2017
    Posts
    136

    Updated - LMS Controls - Google Home / Google Assistant Voice Control of LMS Players

    The GitHub distribution has been updated with a few additional features including:

    • All intents can now be called implicitly "Hey google, ask LMS Controls to play artist Pink Floyd in the kitchen with shuffle on"
    • When an implicit intent is called, LMS Controls app stays active for an additional 10 seconds allowing the user to issue supplementary direct commands "Set volume to 40", "Set shuffle on", "Add album Crime of the Century by Supertramp", with having to invoke the "Hey google, ask LMS Controls to"
    • Streamlined the DF dialog requirements (more music less talk)
    • Syncing of squeezebox players can now be done using the HA GUI
    • More responsive GUI


    Enjoy. Ynot.


    Quote Originally Posted by ynot1234567890 View Post
    For those who may be interested, I have opened a github project here: https://github.com/ynot123/LMS_Controls that contains the code required to voice enable much of your LMS Player services. An audio demo is also available there.

    The project allows voice control for your Logitech Media Server from Google Home or Google Assistant (on your iPhone / Android device) with Home Assistant (HA) acting as the middle man. The following functions are supported:
    • Perform queries for songs, albums, artists and playlists from the LMS server or from the music source Spotify
    • Compound queries are supported (ie: "Play album Breakfast in America by Supertramp in the Kitchen with Shuffle on")
    • Play queried items on selected player
    • Add queried items to select player's playlist
    • Set music source (local LMS database or Spotify (using spotty)
    • Set selected default player (can be changed on the fly)
    • Set volume
    • Set sleep timer
    • Set shuffle on / off
    • Set repeat on / off
    • Next track
    • Pause and re-start players

    A Home Assistant web GUI front-end for the query tool is also included. Using HA you can further enhance the LMS tools to create home automation scenes (ie: play your favorite radio station when you get home, turn down the lights when listening to music, etc..).

    Warning, there is some configuration required to make this work (checkout the REAME.md files).

    The prerequisites for this are:
    • Logitech Media Server (obviously )
    • Home Assistant (HASSIO) - open source home automation package (can be run on a PI or even on your LMS server)
    • Google Home (or google assistant for android or Iphone devices)
    • Developer account for Dialogflow for the voice activation part
    • Spotify account with Client_ID and Client_Secret to allow query processing

    If interested give it a go. Been using it for sometime now and find it "cute" and convenient for simple listening and I especially enjoy the sleep timer feature.

    Ynot

  4. #4
    Senior Member
    Join Date
    Jan 2016
    Location
    Colorado Springs, CO, USA
    Posts
    652
    This looks awesome! I can't wait to try it out. Recently received a Google Home device as a gift and getting something like this for LMS has been on my list. I have an extra R-Pi, so I should be able to get this going. Recently ordered a Samsung SmartThings Hub in order to integrate it with Google Home to turn on/off my equipment, i.e. "Hey Google, turn on Squeezebox in the Backyard", which would turn on the receiver's backyard zone. Now with this I should be able to tell LMS what to do. Thanks!

    R Greg Dawson
    Squeezelite-X

  5. #5
    Senior Member
    Join Date
    Feb 2017
    Posts
    136
    Quote Originally Posted by rgdawson View Post
    This looks awesome! I can't wait to try it out. Recently received a Google Home device as a gift and getting something like this for LMS has been on my list. I have an extra R-Pi, so I should be able to get this going. Recently ordered a Samsung SmartThings Hub in order to integrate it with Google Home to turn on/off my equipment, i.e. "Hey Google, turn on Squeezebox in the Backyard", which would turn on the receiver's backyard zone. Now with this I should be able to tell LMS what to do. Thanks!

    R Greg Dawson
    You're welcome. Give it a try, it's really quite flexible once it's setup. The Home Assistant component is also very cool, adds a lot of possibilities for google and home automation side. As an example, I monitor the PI squeeze player in my garage and when it goes live (starts playing), my old analog stereo turns on automatically via a wifi plug. I also use things like dimmers, switches, etc.

    Also a quick "Hey Google, Mommy's in the mood", and the lights dim, the stereo turns on and Barry White starts playing. Hasn't been successful yet but the automation part works. Haha. Ynot

  6. #6
    Senior Member
    Join Date
    Feb 2017
    Posts
    136
    Quote Originally Posted by ynot1234567890 View Post
    The GitHub distribution has been updated with a few additional features including:

    • All intents can now be called implicitly "Hey google, ask LMS Controls to play artist Pink Floyd in the kitchen with shuffle on"
    • When an implicit intent is called, LMS Controls app stays active for an additional 10 seconds allowing the user to issue supplementary direct commands "Set volume to 40", "Set shuffle on", "Add album Crime of the Century by Supertramp", with having to invoke the "Hey google, ask LMS Controls to"
    • Streamlined the DF dialog requirements (more music less talk)
    • Syncing of squeezebox players can now be done using the HA GUI
    • More responsive GUI


    Enjoy. Ynot.
    Aug 5, 2018 - Updated Dialogflow and scripts to allow sync / unsync of players via voice command as well. Ynot.

  7. #7
    formerly known as Fletch
    Join Date
    May 2005
    Posts
    2,260
    I can't wait to try this! Hopefully sometime in the next few days. Thanks for contributing!

  8. #8
    Senior Member
    Join Date
    Jan 2016
    Location
    Colorado Springs, CO, USA
    Posts
    652
    So I am working on this...
    Step 1: I set up a R-Pi with Home Assistant according to the online instructions, including installing the Configurator plugin.
    Step 2: Modify and merge HomeAssistant config files. I got to the part that says:

    - **_shell_** sub-directory:
    - For the files: qry_alb.sh, qry_alb_song.sh the following modifications are required:
    - Replace `localhost 9090` with `your path to LMS CLI interface & Port#`
    - Update `https://HA_Link.duckdns.org/api/states/sensor.art_ID?api_password=HA_API_Password` with you're `HA_Link` (accessible from the internet) and you're `HA_API_Password`


    Question 1: By "your path to LMS CLI interface & port#", do you mean the host name of my LMS server, as in MYSERVER 9090? or do you mean http://myserver 9000?
    Question 2: What is HA_Link and HA_API_Password? I apologize if this should be obvious, this is my first experience with Home Assistant.

    Thanks for the help.


    R Greg Dawson
    Squeezelite-X

  9. #9
    Senior Member
    Join Date
    Feb 2017
    Posts
    136
    Quote Originally Posted by rgdawson View Post
    So I am working on this...
    Step 1: I set up a R-Pi with Home Assistant according to the online instructions, including installing the Configurator plugin.
    Step 2: Modify and merge HomeAssistant config files. I got to the part that says:

    - **_shell_** sub-directory:
    - For the files: qry_alb.sh, qry_alb_song.sh the following modifications are required:
    - Replace `localhost 9090` with `your path to LMS CLI interface & Port#`
    - Update `https://HA_Link.duckdns.org/api/states/sensor.art_ID?api_password=HA_API_Password` with you're `HA_Link` (accessible from the internet) and you're `HA_API_Password`


    Question 1: By "your path to LMS CLI interface & port#", do you mean the host name of my LMS server, as in MYSERVER 9090? or do you mean http://myserver 9000?
    Question 2: What is HA_Link and HA_API_Password? I apologize if this should be obvious, this is my first experience with Home Assistant.

    Thanks for the help.


    R Greg Dawson
    Hi,

    1. Yes the hostname (myserver) in your case. The http:// part is not required. It could even be the ip address if you prefer. The CLI port number which unless you changed something should be 9090. It's a different port than the web interface port 9000. The Command Line Interface Port (CLI) that responds to requests is set to 9090 by default. You can confirm this by choosing settings, advanced and selecting command line interface on the LMS web app. It will show you the CLI port number for your installation.

    2a. For the system to work it needs to be reachable from the internet. Most HASSIO users use a free service called duckdns.org to keep track of their ip and route the internet requests to the hassio service. So first you need to have this service available and installed, I suggest the using the DUCKDNS form the ADD_ON store in your HASSIO config. Once you can access HASSIO from the internet, HA_Link is the name of your server without the domain part. As an example, my server may be reached by typing https://helloworld.duckdns.org my HA_Link value would then be helloworld.

    2b. HA_API_Password is the password you created (or should have created) to access HASSIO. This can usually be found in your configuration.yaml file under the http: heading.

    The key before you go too far is first to ensure HASSIO is working on its own and is accessible from the internet. Until this works, you're dead in the water as far as voice commands, etc due to cloud service requirements. On the Github there is also a troubleshooting document https://github.com/ynot123/LMS_Contr...bleshooting.md to help during your setup.

    I appreciate any feedback on lack of instructions, clarification requirements, etc.. Most users to date already had working versions of HASSIO installed so less setup was required. Also, I may be offline for a few days (fishing) but will get back to any requests / questions upon my return.

    Cheers, Ynot.
    Last edited by ynot1234567890; 2018-08-07 at 04:49.

  10. #10
    Senior Member
    Join Date
    Feb 2008
    Posts
    4,759
    Quote Originally Posted by ynot1234567890 View Post
    Hi,

    1. Yes the hostname (myserver) in your case. The http:// part is not required. It could even be the ip address if you prefer. The CLI port number which unless you changed something should be 9090. It's a different port than the web interface port 9000. The Command Line Interface Port (CLI) that responds to requests is set to 9090 by default. You can confirm this by choosing settings, advanced and selecting command line interface on the LMS web app. It will show you the CLI port number for your installation.

    2a. For the system to work it needs to be reachable from the internet. Most HASSIO users use a free service called duckdns.org to keep track of their ip and route the internet requests to the hassio service. So first you need to have this service available and installed, I suggest the using the DUCKDNS form the ADD_ON store in your HASSIO config. Once you can access HASSIO from the internet, HA_Link is the name of your server without the domain part. As an example, my server may be reached by typing https://helloworld.duckdns.org my HA_Link value would then be helloworld.

    2b. HA_API_Password is the password you created (or should have created) to access HASSIO. This can usually be found in your configuration.yaml file under the http: heading.

    The key before you go too far is first to ensure HASSIO is working on its own and is accessible from the internet. Until this works, you're dead in the water as far as voice commands, etc due to cloud service requirements. On the Github there is also a troubleshooting document https://github.com/ynot123/LMS_Contr...bleshooting.md to help during your setup.

    I appreciate any feedback on lack of instructions, clarification requirements, etc.. Most users to date already had working versions of HASSIO installed so less setup was required. Also, I may be offline for a few days (fishing) but will get back to any requests / questions upon my return.

    Cheers, Ynot.
    Am I correct in assuming that duckdns requires open ports on the router?
    LMS server: Pi Zero

    Amp: Denon PMA-50

    Players/Speakers: Touch, Logitech Radios, Sonos Play 1s & Beam, Libratone Zipp, GGMM E2 & E3, Yamaha WXAD-010, Loewe Airspeaker, Google Chromecast Audio, Home Mini & Nest Hub, Amazon Echo 2,3 and Show5, Pioneer WX-SMA1, Roberts S1, O2 Joggler, Cisco Joggler, Avantree Priva BT transmitter

    Brexit = ∞ stupidity


    ------------------------------------------------------------------------------------

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •