Discovery for squeezebox player not online at boot time

I am using HA 0.58 on a rpi3 with haspbian at home. I have several squeezebox players (rpi with squeezelite) that I try to control using HA.
The discovery with HA work well , but only if all the squeezebox players are online when I start HA. If one of the squeezebox player is not on-line at that time, it never appears in HA.

  • Can I force the configuration of all my squeezebox (even if they are not online) in my configuartion.yam file (and how ) ?
  • Or can I force discovery to detect a new squeezebox ?
    Any advise will be appreciated :slight_smile:

Did you ever get a response to this? I have the exact same issue…

Unfortunately No .
I just check that all my squeezebox players are online during startup !

im currently trying to automate this in HASS where if target is not online it switches to a local player that it starts up so and diverts back to the regular one if target is online

using simple ping binary sensor and systemd and squeezelite to do this

Got it working :slight_smile:


it was quite simple set up a binary ping use that a presence detector then install a local squeezelite client take the mac ids from the players then make a custom systemd file for the players that you need then set up add shell commands for start and stop commands and last but not least the automation

example squeezeproxy-client.service:

Description=Squeezeproxy (client)

ExecStart=/usr/bin/squeezelite -c 60 -s -m 00:00:00:00:00:00 -n client
ExecStop=/bin/kill -SIGTERM $MAINPID


example shell_commands.yaml

start_squeezeproxy_client: "systemctl start squeezeproxy-client.service"
stop_squeezeproxy_client: "systemctl stop squeezeproxy-client.service"

example automation.yaml:

- id: squeezeproxy_client_on
  alias: 'Turn on: Squeezeproxy (client)'
  - platform: state
    entity_id: binary_sensor.client
    to: 'off'
  - service: shell_command.start_squeezeproxy_client
  - delay: '10'
  - service: homeassistant.reload_core_config

- id: squeezeproxy_client_off
  alias: 'Turn off: Squeezeproxy (client)'
  - platform: state
    entity_id: binary_sensor.client
    to: 'on'
  - service: shell_command.stop_squeezeproxy_client

you can skip automation and just have it always on it doesnt mess up of you dont have any output for the device

Thanks for your posts about this.
I am surprised with the lack of interest in this thread. I am suffering the same problem which is pretty annoying.
To be worst, if squeezebox is disconnected from the network, it also disappears from HA.
I would like to do something similar, but I would like to clarify some thing first:

  1. I belive that squeezeproxy-client.service should be created in /etc/systemd/system
  2. My pi doesn’t have /usr/bin/squeezelite present, so I have to install it?
  3. I understand that 00:00:00:00:00:00 should be changed to the player MAC, but what abou I have more than one player?
  4. I would like also to know how this would impact the processor running constantly, since I already have my pi running a lot of things. If this is the case, I would be ok having a simple automation that I have to run after turning on my players, and then be recognized by HA.

In fact, I would like that the squeezebox (using PiCorePlayer in Pi) could be used for radio and TTS by HA even when the LMS server is off, but from what I could understand, this is not possible. If someone know how to circumvent this, please let us know.

1 Like
  1. yepp that works
  2. either compile it from source or install it form apt i would compile it cause the one in the repo is a bit outdated.
    GitHub - ralph-irving/squeezelite: Lightweight headless squeezebox player for Logitech Media Server
  3. if they have the same mac LMS will treat em as the same player if they are using the same version
    4.i got lms running on a cubieboard2 (a20 soc) works just fine its about the same as running on a pi.

I implemented this functionality here a while ago. It never got merged and I need someone else to test it before doing that.

Some discussion here.


It never got merged and I need someone else to test it before doing that.

Is it still possible to get it merged? I may be able to test it as I have a few LMS players now.

I can test it as well. I have an scenario where this is very painful.

Please let us know how can we help.

Is something like this possible if I’m running HAssIO?

I’ve tried searching for a squeezelite addon but couldn’t see anything.

Do you mind if I try making this code into a custom component? I’d quite like to test it as having an error every 10 seconds in the log if rather annoying and also not good for the SD card!

Failed communicating with LMS: <class 'aiohttp.client_exceptions.ServerDisconnectedError'>

11:35 AM components/squeezebox/ (ERROR) - message first occured at 4:46 AM and shows up 2243 times

I’m happy to test too, have a few very frustrating temporary players!

I forgot about this, I’ve tried and failed to update molobrakos’ changes to fix the temporary players issue.

I can get the custom component to load but it gives more errors than the normal component. I really don’t have enough experience with python to fix it.

I can upload my broken code to a GIST if anyone else wants to try. You may do better than I did!

I’ve given up trying to fix this within HA, I’ve removed the squeezebox component form my config.

Now I’m using NodeRED to send JSON directly to the LMS server, and this is working far better for simple commands, and no more errors in my HA log!