Handle HEOS internal queue timeouts#3358
Merged
MarvinSchenkel merged 3 commits intomusic-assistant:devfrom Mar 11, 2026
Merged
Conversation
MarvinSchenkel
approved these changes
Mar 11, 2026
Contributor
MarvinSchenkel
left a comment
There was a problem hiding this comment.
Looks good, thanks @Tommatheussen
ALERTua
pushed a commit
to ALERTua/fork_music_assistant_server
that referenced
this pull request
Mar 12, 2026
* Handle queue timeout events when calling play_media * Add timeout configuration * Handle HeosError, include queue clearing in try statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In previous PRs, we made sure the internal HEOS queue gets cleared when starting a new stream from MA.
It seems in some cases, the
get_queuecommand takes longer to respond than the default 15 seconds timeout.Catching this exception, skipping the queue clearing and continuing to send a new stream to the device, makes sure the devices still are able to play.
I do not know yet how the devices get into this bad state where
get_queuecommands are delayed. But I had it happen on 1 of my devices, where I tested this fix with.Additionally, I've added a timeout configuration to the provider. This could reduce these errors if they occur very often. When running a full HEOS network wirelessly, it might increase response times on all commands, allow to tweak this can help reduce these issues.
I also fixed the config entry for the manually configured IP, as it wasn't showing up anymore.