Expose Music Assistant internal routing (sources) as a Home Assistant Action #5351
Replies: 2 comments 8 replies
|
I Just wanted to add some context to this request. I discussed this with Traveling_Gav on Discord, and he pointed out that the reason media_player.select_source doesn't work for software players (like Sendspin) is because HA expects that action to switch physical inputs (like HDMI or Line-in).Since Music Assistant is doing the 'routing' internally (e.g., sending a VBAN stream to the player), we likely need a dedicated Music Assistant action to trigger that routing from an automation. My Use Case is that I wanted a way to pipe audio from my phone or tablet into my whole-home audio system powered by Sendspin. I have a Bluetooth receiver going into a Pi running VBAN; the latency is incredible (half a millisecond), so it’s perfect for live playback. However, I have to manually set the player source to the VBAN plugin in the Music Assistant UI every time. I want to be able to automate this switching through Home Assistant so I can dynamically send my phone's audio to different speakers or zones (like a voice command or a button press in the kitchen) without having to open the MA web UI. A 'default source' wouldn't work because I need the flexibility to toggle this routing across various players in my house depending on where I am. I know I could use an ffmpeg radio station as a workaround, but the 5-10 second latency makes it unusable for my needs. I’m not a dev, but Gav mentioned this would be a great way to bridge the functional gap for players that don't have native hardware inputs. |
|
Working fine for me on 2.9.1 with squeezelite and chrome sendspin players.
Not necessarily, it just means the VBAN plugin is running and MA ready to receive and process the PCM stream. Possibilities:
As it was working for you previously and an upgrade to the latest version caused it, likely not 1-3 if nothing at the sending end changed. Is MA also running on a pi? Processing the VBAN stream does take a fair bit of processing and with 2.8 a pi4 can keep up OK at the lower VBAN rates, as long as full MA debug logging (cpu heavy) wasn't in use. With 2.9 reported to be generally heavier on resources when all the nice new audio analysis features etc are in use, there may not be enough headroom on the core the plugin is running on to process the VBAN stream at the required rate, if it's busy with other background tasks. Things to try:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description:
I am requesting a way to trigger Music Assistant’s internal "Source" routing—specifically for Plugin Providers like the VBAN Receiver—via Home Assistant automations.
The Problem:
Currently, there is a functional gap between the Music Assistant (MA) UI and Home Assistant (HA) actions. In the MA UI, I can manually switch a player (like a Sendspin/Squeezelite instance) to a VBAN stream. However, this cannot be automated in HA.
As clarified by developers, media_player.select_source in HA is designed for hardware-native inputs (HDMI, Line-in). Because many MA players are software-based, they report that they don’t support select_source, causing automations to fail even though the MA UI shows a "Source" picker for internal routing.
Proposed Solution:
Instead of trying to force this into the standard media_player.select_source (which creates ambiguity between hardware and software sources), I propose:
Why this matters:
This would allow for seamless multi-room audio workflows—for example, automatically routing a PC's audio (via VBAN) to specific Sendspin players when a "Media Mode" scene is activated, without requiring manual intervention in the MA interface.
Context:
Thank you so much for everyone working on this project!
All reactions