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

Weird. I tested again and more errors. I’m not even touching LMS controls at all so I’m not sure why any command is being called. They just appear in the log. I’m on HA 0.92

Error while executing automation automation.lms_gui_update_player_values. Invalid data for call_service at pos 2: expected float for dictionary value @ data[‘value’]

10:05 PM helpers/script.py (ERROR) - message first occured at 9:55 PM and shows up 11 times

Error running command: bash /config/shell/qry_player_stat.sh {{text1}}, return code: -11

10:05 PM /usr/src/app/homeassistant/components/shell_command/init.py (ERROR) - message first occured at 9:55 PM and shows up 11 times

@ynot great work, installed this today and it works a treat. Thank you.

Awesome glad to hear it.

Hi sorry about the delay in response. Haven’t been available much lately. Two things to try:

  • In the customize section , the MAC address entries for the players must be in lowercase.

and;

  • In the shell script qry_player_stat.sh try replacing the following line:
    raw_volume=${raw_volume%% playlist%20repeat*}
    with
    raw_volume=${raw_volume%% *}

See the explanation here: https://github.com/ynot123/LMS_Controls/issues/18

Hope that helps. If not run the command bash qry_player_stat.sh 00:04:20:xx:xx:xx as shown in the thread and provide the output for review.

I found the problematic player. The above fix didn’t work though

This output shows no result from the query of player status and is usually due to an incorrect mac address (or none existing player). Using the normal web interface for LMS server, under settings in the player tab, check the mac address for the player again please. Also would help if you give me the details on the type of player. Tried a MAC lookup based on MAC address aa:aa:c7:04:2f:dc.

I assume the command works for other players just this particular one is not working? What type of player is it?

Right as usual. Something is wrong with that player. Disappeared from player list in LMS and I can’t bring it back. Using the airplay bridge. I’ll figure it out. Thanks for looking.

Ok. I fixed the bad player and checked all the rest individually and they look good. I’m now only left with this error. What else can I try?

Error running command: bash /config/shell/qry_player_stat.sh {{text1}}, return code: -11

Also is my assumption correct that this error only cares about players that are listed in the lmscontrols.yaml?

Not enough information to help. As before please open a shell, go to /config/shell folder and run the command bash qry_player_stat.sh xx:xx:xx:xx:xx:xx where xx:xx:xx:xx:xx:xx is the MAC address of the player in question. Provide the output that results that will tell me what’s being returned for that particular mac address. You can also try some of the working ones to see the result for yourself.

I assume the script works fine for the other defined players? Please confirm.

The code takes whichever player’s name is in the media name player field in the HA LMS Controls UI and queries the player (based on the MAC Address) every 60 seconds and sets the shuffle, repeat, volume and sleep timer states in case they have been changed using a different UI.

Finally please include player details (what kind, make and model) and the connection method if using a special plugin (ie: native squeeze player, UPNP, Chromecast, airplay). All that should help identify the issue. If easier you can send the results by email to [email protected].

Note: I have not tested an airplay device running with LMS.

Sorry for not being more clear. The bad player I managed to fix and it returns good results when running the query as do all the other players. All my players are using the airplay bridge in LMS and are Russound xzone4 and a russound x5. My kitchen player is the one listed in the UI and here are the player details and results.

Player Model: SqueezeLite

Player Type: squeezelite

Player IP Address: 192.168.0.107

Player MAC Address: aa:aa:4f:06:da:01

Maybe I am confused. It seems to be working fine. The results are as expected. I assume the HA LMS Controls GUI is being updated with the volume, shuffle, repeat and sleep status. Not sure where the return code -11 comes in. Does it appear only once or every minute or so.

It has occured 91 times since last restart. The GUI matches the values of the query.

Error running command: bash /config/shell/qry_player_stat.sh {{text1}}, return code: -11

4:51 PM /usr/src/app/homeassistant/components/shell_command/init.py (ERROR) - message first occured at 12:16 PM and shows up 91 times

seing this now too but this may be related to the volume change you had me try?

Error while executing automation automation.lms_gui_update_player_values. Invalid data for call_service at pos 2: expected float for dictionary value @ data[‘value’]

Sorry but not sure how to help. Based on the results you posted, the proper volume is being returned (so the script is running properly) at least the player with MAC aa:aa:4f:06:da:01.

The error “Invalid data for call_service at pos 2: expected float for dictionary value @ data[‘value’]” occurs when the volume value is not returned as a proper integer. The fix I gave you ensures proper trimming to an integer for all known (by me at least) players.

When reviewing my logs, I occasionally get this error as well and may occur when players become disconnected from the network or turned off. I would have to do more testing to see if I can isolate the condition.

In short if it’s not happening every minute or consistently for a particular player and the application is working properly, I wouldn’t sweat it. Ynot.

I seem to have a repeating error coming up every 10 seconds -

2019-05-21 21:25:58 ERROR (MainThread) [homeassistant.components.squeezebox.media_player] Failed communicating with LMS: <class 'aiohttp.client_exceptions.ServerDisconnectedError'>

I not sure why or what it means.

Sounds like your HA instance is having trouble connecting to your LMS server. Reboot the whole shooting match and log into LMS to ensure its reachable and working, then the same for HA. I assume this worked earlier?

I will try that. The system is working perfectly ok, its just flagging up the error message

That has solved the problem. Thank you.

I saw someone mention setting this up with Snips instead of Google Home. Has anyone had any luck?

I have managed to get everything working except for the shell commands.
When troubleshooting the issue i get the below error

curl: (6) Could not resolve host: https

I am using the Nabu Casa hosting service, could this be the issue?