LMS Controls - Google Home / Home Assistant Voice Command for Squeezebox Players

Not that I am aware of but should be pretty straight forward however following the same concept. There are other projects that integrate directly with LMS bypassing Home Assistant. You can find one project here:


Thanks. LMS working via Alexa but your solution is more elegant. I transform the data into something that Alexa can digest. Looking at DialogFlow this is doing the same thing. Shame that it is not possible to get a dynamic link to the database as everytime more media is added the export to Alexa needs to be performed again - not that I add new media that often.

I would assume you could port the home assistant approach to Alexa fairly easily. The dialogflow project I created for Google home is actually quite small and simple but flexible enough to address most scenarios using simple variables like artists, song, playlist, album, source, mediaplayer name, etc…

Doesn’t Alexa have a similar product or approach to dialogflow?

A quick google shows an Alexa exporter for DialogFlow, perhaps that may be of use for initial attempt? See https://dialogflow.com/docs/integrations/alexa-exporter

Did you have any success porting to Snips?

1 Like

Please note if you upgrade your Home Assistant installation to version 0.83.2 the use of api_password is no longer supported (as pointed out by Squeezebox user kalimeroo) and your webhooks and shell script authentication will need to change to use long-lived tokens.

I will provide an update on the methods in the GitHub https://github.com/ynot123/LMS_Controls over the next week or two. The change is not very complicated but will require an update in several locations including the shell scripts and DialogFlow webhooks.


Was going to install this soon. As I am on 0.83.2 I think I will wait for the update.
Really looking forward to using thuis!

LMS Controls Project Updated - December 8, 2018

Good news, the LMS Controls project (see here) has been updated to incorporate the new Home Assistant authentication system. This project now uses Long Lived Access Tokens to authenticate between Google DialogFlow and Home Assistant.

In addition, changes at Google and HA have required a different (proper) implementation of the webhooks method for the two applications.

For those who have already installed this project and simply want a short cheat sheet on how to update your current installation, please see here: https://github.com/ynot123/LMS_Contr…/cheatsheet.md

For those starting fresh, please go to the project’s GitHub (see here) and follow the instructions.

Thanks and enjoy.


1 Like

I have been working on installing this and basics are working. I can control volume, syncing etc… for my 3 players.

But I am running into a few things for which I hope you can point me in the right direction (been working through the troubleshooting list on your Github):

In the UI (both lovelace and traditional) the play, pause and next buttons/controls are missing. In the Lovelace UI I see the error: “scripts.lms_cmd_paus” (line is cut there) and next line “Entity not available”
I have checked the scripts.yaml and the lms_cmd_pause_player section is there. I see the same errors for the other 2.

The next step in the troubleshooting where I try to queue a song does not seem to work. It doesn’t get added or starts playing. So there my inexperience with shell commands and Hassio starts. I managed to run the shell command and I get no results and the I get 401: Unauthorized. But I am not sure what is giving that 401, is that spotify?

Hi Rusty,

Glad to hear your a good part of the way there. A quick check to ensure you are using the latest version of this project. I uploaded December 8th some significant changes that are important if you’re running the latest version of Home Assistant. If you didn’t do this, my advice is to download it and follow the instructions again (sorry about the hassle but the security concepts have changed and needed to be updated).

Make sure your editing your files using either the HA configurator tool or if editing in Windows, use something like Notepad++ which won’t put additional formatting characters in your files which can cause issues compiling in HA.

For the missing UI controls, please review your entities (using HA GUI developer tools / states tool) and ensure the following entities are there:

  • script.lms_cmd_pause_player
  • script.lms_cmd_start_player

If they are not (which I suspect) check your scripts.yaml file to see if those scripts are present. (should be near the end). Also did you copy over the customize.yaml file which defines the icons for these entities.

To get a shell in Docker, log in to your host server using putty or some other tool and create a shell in the home Assistant docker container using the following command:

  • docker exec -it homeassistant bash

And yes it certainly works with Hassio / Docker installation. My setup is Debian server, running Hassio (0.83.3) in Docker, LMS server and Openmediavault (NAS) all on the same box.

Finally if you are still having difficulties making progress reply back to this email [email protected] and I will try to help and take a look at your setup a little closer…


Thanks for the help, I haven’t had a chance to look at it again. But as soon as I have some time, I will continue working on getting this working.

No problem. Be sure to get the latest copy when you decide to give it a shot. It’s getting tough to keep up with the breaking changes these days in HA. Ynot.

Just worked the through the setup for a couple of hours … and all working. Wow. Can’t imagine the effort that went in to get this working. The level of integration is phenomenal.

Only a few minor issues for me…
Didn’t catch all the places to update my media server names in configuration.yaml (RTFM)
Didn’t catch all the instances of “lms_ipaddress” in the scripts (maybe change instructions to “Replace all instances of…”)
Some usual indenting issues merging snippets with existing files.

The other issue is there’s no real guidance on the order of config. Having been through It now, it seems to me the HA element needs to be done first…restart to get the Diagflow integration…hit configure to get the webhook for the subsequent Diagflow component - them move on to Diagflow.

Within Diagflow I also clicked “See how it works in Google Assistant” which allowed me to set the “Display Name” (on the “Actions on Google” “Invocation” page) to “Music Server”. This allows me to ask google to “Talk to the Music Server” which seems more intuitive I think to the family who don’t know/care that its LMS etc.

I see that throughout the media player entity names are used - particularly in responses. How practical would it be to change those to “Friendly Names” ? some of my entity names are particularly unfriendly.

Thanks so much for sharing.

Thanks for the feedback. Glad it’s working for you. It did take some doing but I was up for a challenge when they said it couldn’t be done. :grinning:

I do plan to try to make this easier to install in the near future. I will use HA package file which will take care of a lot of the merging of files and minor customizations on the HA side. The shell script files will also use an env.sh file to enter credentials, tokens, etc… only once for the shell scripts. Other new features will include additional feedback (audio) on query results, player status, etc… Also the installation documentation will be updated to suit including your feedback provided here.

As for the friendly name thing, the simplest thing I can think of is modify the DialogFlow Entity section the table for mediaplayer entities to include your desired “friendly name” as a synonym for the unfriendly name player. This way you can say something like “Play artist Supertramp on friendly name player” and it will resolve to the reference value which is unfriendly name. This won’t fix the HA GUI but will fix the voice controlled part. I will consider the use of friendly names for display purposes but likely the DF entities will still need to carry the “unfriendly name” as the reference values. Personally I tried to use reasonable naming everywhere in my LMS server players to make it clear to all.
The pic below shows my current entries, familyroom can also be called as the yogastudio.


wauw - great project. thank you for doing all the heavy lifting on this one.
I have been fooling around with this a couple of hours, completely new to home assistant, google home and dialogflow, have an excisting LMS installation and bought me some Google homes for syncing music and the likes.

I think i have the most of it running, i have testet that the bash scripts can interact with spotify, and the play / pause actoions in HA works. But i just cant get my head around whats necessary for getting dialogflow up and running so that i can interact with it from my google homes. i mean do i need to publish my “project”? can anyone help me understand the requirements here? ideally i would like to get the english version up and running and then “port” it to my native language (danish) i gather that would be possible without to much of a hassle?

Follow the instructions here: https://github.com/ynot123/LMS_Controls/tree/master/DialogFlow.

You can create your webhook id here: https://yourdomain.duckdns.org/config/integrations/dashboard

I assume you already created a longlived access token as the shell scripts are wokring but if not that would be here: https://yourdomain.duckdns.org/profile

Once the Dialoflow is created you can test it using the try it now window in DF. Finally you can test it in Google Assistant by clicking on the See How it works in Google Assistant link in DF.

Once in Google Assistant you can assign an invocation and it will be available as a action in googleHome.

Thanks ynot
I have gone trough the dialog setup and i can test my “app” - but i get voice response: This intent is not yet configured within Home Assistant. and i can then see that my homeassistant returns "Unknown intent lms_dailog_intent in the console / log. Intergration with homeassistant is done via Nabu Casa https://www.nabucasa.com.
I also cannot interact with my app with my custom invocation, but need to use the words “talk to my test app” so something is amiss with the google dialog flow also. sad when it feels like result is SO near :slight_smile:

Intents are linked in the config with this line:
intent_script: !include intent.yaml

This solution does not use the nabucasa integration it simply uses the webhook integration and the webhook ID that is given.

Did you enable your webhook and put in the porper ID and the long loved access token?

And I assume you have the intent script (intent.yaml) in place. That shoudl pretty much do it.

my webhook is delivered via nabucasa, if im not mistaken. but it looks different somewhat from the duckdns example, it looks like this: (i have changed this from my so that its not the correct one, but you might get the idea)

i did enable the long lived accesstoken and both are input into the dialogflow, and the code snipplet i pasted from my config in the eairlier post was from my config, but still no luck, i must miss something, but request are delivered to my homeassistant i think, since i get an unknown intent in the homeassisant log?

I believe the issue is with either the webhook your using or the intent.yaml file is not loaded or the name of the intent is incorrect.

When setting up the integration you need to use the Dialogflow webhook component as shown in the attached pic. As far as I understand, nabucassa is not required. I specifically avoided it because it’s not free. So that being said, you need to invoke your command (once setup in google assistant) by saying something like: “hey google, ask lms controls (or whatever your invocation is) to play artist supertramp”.

thank you for your feedback, it looks to me like i’ve followed your instructions to the letter, i have tried to move the intents from an included file into the configuration.yaml file but still no luck, the intent is called via the webhook, but the homeassistant server does not recognise it, i’m at a loss, but will continue to fiddle around. it must be some where in the basic setup, because this i completey new for me, so i must have set something up wrongly.