Skip to content

Handle HEOS internal queue timeouts#3358

Merged
MarvinSchenkel merged 3 commits intomusic-assistant:devfrom
Tommatheussen:heos-command-timeout
Mar 11, 2026
Merged

Handle HEOS internal queue timeouts#3358
MarvinSchenkel merged 3 commits intomusic-assistant:devfrom
Tommatheussen:heos-command-timeout

Conversation

@Tommatheussen
Copy link
Contributor

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_queue command 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_queue commands 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.

@OzGav OzGav added the bugfix label Mar 11, 2026
Copy link
Contributor

@MarvinSchenkel MarvinSchenkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @Tommatheussen

@MarvinSchenkel MarvinSchenkel merged commit 9a620df into music-assistant:dev Mar 11, 2026
6 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants