I have been using the LMS client on my AmpliPi to stream from my LMS server. When it works it is absolutely fantastic. The “Don’t Stop The Music” plugin on LMS is brilliant.
However if I don’t use the LMS client stream for a few days and come back to it, my LMS server doesn’t “see” the AmpliPi client. Sometimes it thinks it can still see it but it is not alive, nothing plays. I have to delete the AmpliPi source and the underlying stream config as well, re-add and then sometimes it will reappear. Sometimes it takes a few cycles of this to get it back.
Currently it is unusable, as when I want to play something it can take me up to 15-20mins to get it running.
I realise it might be something on the LMS Server side and nothing to do with the AmpliPi client, but I thought I would check here first to see if anyone else is seeing something similar.
Hey sumnerboy!
I’ve noticed this, or something adjacent to this; I’ve got it documented across two issues, one that is present in the 0.3.4 release and another that is only present in beta releases, this is something that I will personally be looking at this week.
In the meantime, as stated in the first issue, you should be able to restart your unit and the stream should be usable again. This is more reliable than simply creating a new stream / deleting and recreating the old one as the underlying issue is that LMS streams aren’t releasing the limited audio pipelines properly when stopped and restarted.
A simpler way to reset a LMS stream (assume its stream-id is 1007) with the API is:
# Stop the background stream process
curl -X POST "http://amplipi.local/api/streams/1007/deactivate"
# Start it back up
curl -X POST "http://amplipi.local/api/streams/1007/activate"
We’ve been meaning to add support for resetting a stream in the web UI but haven’t found a good way to integrate it yet.
1 Like
Ah that is good to know - I currently have a NodeRED flow which runs at 2am every morning to delete and re-create the LMS stream - this will be much simpler!
It would be nice to have a single API for restarting a stream (something for the backlog perhaps )
Definitely something that is on our radar. Adding an api/streams/{sid}/reset
command would be fairly small lift.
1 Like