Closed gianky69 closed 5 years ago
See the following issue log: https://github.com/ynot123/LMS_Controls/issues/11
This script is run every minute to update the current players HA GUI values in case they have changed. (ie: someone is using the LMS GUI instead for control??)
In short the error is likely due to incorrect mac address being specified for the player or a problem with the script qry_player_stat.sh.
2 things you can do:
bash qry_player_stat.sh yourplayersmacaddress
That should do it. I could probably use better error checking on that part of the script. Maybe later :). Ynot.
Double checked lmscontrols.yaml, all ok. No idea how to make a bash command in Hassio 😢
I have the same, checked my mac:s and it seems ok
OK let's try to get to the bottom of this.
Please check your sensors after the error occurs and tell me what the value of sensor.raw_volume and sensor.raw_sleep is. The sensors can be viewed here: https://yourha.duckdns.org/dev-state.
They should both be integers. If sleep is not being used, it will be 0. Raw volume will be an integer between 0 and 100. If they are not, then something went wrong in the qry_player_stat.sh file likely.
Ynot
For me: sensor.raw_sleep is 0 sensor.raw_volume is 00%3A04%3A20%3A12%3A1B%3AED status
Figured as much. I did not put much error checking into the qry_player_stat.sh script, so when a MAC address is entered that does not exist or is not reachable for some reason, an incorrect raw_volume is returned. I can fix that later but either way that won't help you here (as you get no result returned).
So, can you please check to ensure the MAC being queried is the player's MAC and not the LMS server's MAC. The best way to tell is use the LMS GUI, go to settings, choose the player tab, select the player (kitchen in my case) and ensure you use that MAC address for the player as defined in lmscontrols.yaml. See the attached image as an example of my kitchen player.
If that is done and still doesn't work, did you try more than one player? Same result?
To further troubleshoot, we will have to do some testing in the shell and run the command manually. To open a shell into the docker container, log into your HA server and run the following command to get a shell in the Docker container: docker exec -it homeassistant bash
Go to your shell directory and run the following:
bash qry_player_stat.sh yourplayersMAC
and provide the results.
These commands and methods are outline somewhat in the following document: https://github.com/ynot123/LMS_Controls/blob/master/troubleshooting.md
Ynot
Rechecked all MAC address, no errors. All squeeze players receive and execute all commands...
In SSH terminal session, I get this:
Query is: 00%3A04%3A20%3A12%3AB6%3A4C status
qry_player_stat.sh: line 44: [: too many arguments
qry_player_stat.sh: line 50: [: too many arguments
Yes that is exactly what I get also with an incorrect MAC address for the player(s). Did you try setting the current player to a different one (that has a different mac address) and see if you get the same result? If the players have mutiple NIC's (ie: rj45 and WIFI) try the alternate MAC.
In order to try to duplicate the issue, can you please answer the following:
I will be in touch in the next day or so (at work now), with a connection method where you can query the LMS server directly using putty to see what's going on and help isolate (at least) the issue.
5 player (1 Radio, 2 Squeezebox Classic, 2 Squeezelite on Raspberry), 5 different MAC address, all in mediaplayer.yalm, all perfectly responding via LMS HA commands and via LMS Logitech.
Low letter case MAC address solves it all! Thanks a lot for your support!
Excellent. That's why its good to see the edits made sometimes. Hadn't considered that as a problem. @frelev - Lower case MAC address is the key.
I will make a note in the install documents. Ynot.
Hey, ynot123, I'm still getting this error on my google mini even with the mac address set to lower case (playerid: 44:07:0b:cf:cb:37). My LMS works well and also has a lower case mac address.
The sensor holds: sensor.raw_volume | 44%3A07%3A0b%3Acf%3Acb%3A37 status
It holds an integer for the LMS.
the media player is media_player.googlehome0844, and I've checked that it is referenced in this manner throughout.
Do you have any other ideas?
Thanks, Matthew
Not sure how you're using or defined you're mini. Mine are defined as LMS player's using the Chromecast plugin. That method allows the LMSControls application to fetch the required values. If you're mini player is defined as a native HA player, the script won't work as it performs a call to LMS server to determine the values.
Thanks, I didn't realise I had to set it up inLMS, but that makes sense and it now works!
I've finally upgraded LMS to the latest version on Hassio HA 0.86.4. It works very well, but I have an error every one minute in logs:
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']
I've checked the lmscontrols.yaml about platform: time_pattern and it's updated (not platform: time) Any idea?PS: still working on italian translation...