Open chatziko opened 1 month ago
Try to use the ip of the snapserver and not a hostname as this has been a problem in the past
Thanks for the tip, it doesn't seem to make a difference.
On the other hand, although in previous tests I could reproduce the problem with 100% success rate, with MA 2.0.6 it seems to happen only with certain spotify albums, but not others. Pretty strange...
Have you tried any other music providers?
Just the filesystem provider, no problem with that.
Ok will try and replicate this
Just the filesystem provider, no problem with that.
Actually I take this back. I had tried it several times, I'm sure, but now I tried it a few more and I managed to reproduce the issue with the filesystem provider (which will likely make it easier to spot the issue). It doesn't happen with all songs, but it does happen.
Some more info: I did several tests with the same filesystem album. Only 2 out of the 8 songs reproduce the problem, and the behaviour of each song is always the same, either it always works, or it always reproduces the problem.
Moreover, as with my initial experiments, the issue only appears with an external snapserver (configured with either IP or hostname). With the internal snapserver the problem never appears.
It's so weird because we don't treat the embedded different than the external, I will try to reduce the amount of times that stream is created, maybe that will help. @chatziko can you test some things in the dev addon ?
Sure, I could maybe setup a local dev environment and try it there. Let me know what you want me to test.
When I have the changes I will let you know here, thanks
@chatziko Did you notice that it happens more with v0.28 than with v0.27 ? Because for the next beta we are going to use v0.28 because the debian repo was updated, and I noticed that it happens a lot.
I tried both just to see whether it's specific to one version, but I'm mostly using v0.28 so I can't compare the frequency between the versions.
Off topic question but since you are using version 28 did you notice that the streams are not removed from snapcast ?
Not sure whether this is what you mean, but I just opened snapweb and I see two old streams there (MA has been idle since yesterday), see below. First time I see this, but I rarely open snapweb, so maybe I didn't notice it.
Yes, that's what I meant, it shouldn't happen, thank you.
Well I found the error, snapcast is detecting silence in the stream between song and song. there is a parameter dryout_ms that solves it. I don't know how many ms would be adequate, a song can have a lot of silence in the middle and this error appears again, a large number introduces latency.
@marcelveldt Any suggestions ?
What version of Music Assistant has the issue?
2.0.4
What version of the Home Assistant Integration have you got installed?
2024.5.1
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
I'm experiencing a weird issue in which the music being played becomes out of sync with the currenly playing info displayed in MA. What is strange is that it happens only with Snapcast / Spotify combination, and only when using an external snapserver.
It starts at various moments, but finally I found a simple way to reproduce it with 100% success rate (at least in my setup).
How to reproduce
snapserver.conf
with no special optionsMusic Providers
Player Providers
Full log output
log.txt
Additional information
No response
What version of Home Assistant Core are your running
2024.5.5
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)