#MA failing to play BBC Radio 4 stream on Voice PE
1 messages · Page 1 of 1 (latest)
this was after my automation tried to start steaming on 2x PE's. It has been working >90% of the time
Are you from the UK perhaps ?
BBC is doing really fancy things to block access to the BBC streams when you are IN the UK while they work fine outside UK
I am
But 99% of the time before getting the PE's it worked, albeit from inside the HA media player. It's only since I got the PE's that I started trying to use this frequenty (I want it to replaced my clock radio).
After the above I tried to manually play it serveral time including from inside MA UI and had to bounce MA addon before it worked.
Well, I believe these issues are popping up more recently as we got other people complaining about it as well. It might be completely unrelated to the Voice PE even. There is somebody working on a BBS Sounds provider but not sure what the state of that is.
I will have to investigate this a bit with a VPN to UK because from here it works fine.
You can see the "401 Unauthorized" messages in your log which is basicaly the BBC telling us to back off
BTW: How did you start the stream ? By selecting it from Radiobrowser within MA ?
Because it looks like you are trying a manual link here and that might be the culrprit
Because those links you find everywhere have issues. With radiobrowser, we get a dynamic link to the correct stream
NVM about that question, got my answer from your log already. You are starting the radiobrowser item
Both. I also did a ma action call with url from the automation.
Yeah, confirmed. With VPN to UK I was able to reproduce your issue in 2 seconds
So this is yet another security measure from BBC
Yep, this is definitely the issue. BBC blocks access to their streams from within UK. I tried several stream URLs. All blocked
hmmm, vlc works so maybe I can work around it with some user agent trick
@keen finch can you test with this URL for bbc4?
http://as-hls-ww-live.akamaized.net/pool_55057080/live/ww/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3D96000.norewind.m3u8
This list has all (currently) working BBC radio links:
https://github.com/groupmsl/BBCRadioStreams/blob/main/BBC-Radio-HLS.m3u
These all work with MA as well
Some errors
That is yet another error where apparantly the connection to HA seems to be lost ?
How stable is the connection between MA and HA and HA and the Voice PE ?
Is this Home Assistant OS running the MA add-on or a dockerized setup ?
Anyways, to recover restart MA or reload the HA provider. I'll add a patch to the code to better handle this
Very stable connection. The wifi is very high grade. I'm running HAOS
MA addon in HAOS (I run the beta MA latest)
OK good, then its a bit strange why the connection to HA got lost but I will anyways add a bit of handling for that to happen.
Did you try the url after reloading the ha provider in MA ?
yes. worked well on living room
OK so now question is if it keeps playing
the other one had a wierd one. it lost power (as someone was moving furniture) so when i just now saw it was unavailable it plugged it in. ran the action and it completed but nothing in the MA logs. In MA it now how hourglass and says not yet available.
And what is the state in HA?
idle
Ah ok so somehow MA didn’t get notified that the player came back online. I’ll look into that as well
would i need to bounce the MA addon?
I think a reload of HA provider should be enough
HA provider is what?
Within Music Assistant go to Settings --> Providers (first page)
All the way at the bottom you should have the Home Assistant plugin provider. Click on the 3 dots next to it to show the contextmenu and press reload.
anyways, both bugs should have been fixed - I'll release a new beta within 20 minutes
A new occurence. I restarted home asistant without restarting MA and got these errors.
Here are the logs
Is that with the updated beta23 ?
So the connection to HA seems to callapse all the time.
Do you have a large HA setup ?
define large
More than 500 devices give or take
Are you 100% sure you updated to beta23 because I see some logging from an error which I should have fixed yesterday
i will upgrade it now
ok. script worked and both playing. i'll keep an eye
i think it's great - your commitment to getting this ever better is excellent
i dont understand the presence now of media_player.voice_living_room_media_player_2 off the back of my PE media_player.voice_living_room_media_player
i guess it doesn't matter but is there a way of getting the current playing name in the player entity as an attribute (for the dashboard)
Yes, for that you need the second media player entity. You import the VPE into MA from HA and then MA exports an "enriched" version back to HA
BTW: BBC does not expose any "now playing" info such as current program name or artist/title so you will only see the radio name in the dashboard.
so should i do all my player commands such as volume and stop on the HA one or the MA one
Best is on the MA one
You can even mark the original/HA one as hidden in UI
At some point in the future I hope we can manage to automaticlaly merge these entities but for now it is like this
ok.
In my MA entity it shows media_title: bbc_radio_fourfm-audio%3d96000 as the media title. i think this is coming from the URL media_content_id: builtin://radio/http://as-hls-ww-live.akamaized.net/pool_55057080/live/ww/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3d96000.norewind.m3u8
is there a way of making this user defined or more friendly. i dont know if they stream the station name in metadata. (I dont mind so much about currently playing)
Go to the MA interface, Radio section.
Click the add button top right
Enter the URL, give it a pretty name and a logo
This is working great now. I’ll keep an eye
From an action can you play a favourite or added media by reference, rather than having enter the url. I’d like to maintain that in one place
You can just enter the name you gave it
You’ve thought of everything!
Well not everything but yeah.. a lot..
🙂
Now lets see if your BBC stream keeps running without issues
I got another fail
Pressing play in MA worked 07:21 but stopped 2 minutes later (nothing in the logs about stopping)
2025-02-10 07:21:49.721 DEBUG (MainThread) [music_assistant.webserver] Handling command players/cmd/play
2025-02-10 07:21:49.728 DEBUG (MainThread) [music_assistant.players] Handling command cmd_play for player Voice Master Bedroom Media Player
2025-02-10 07:21:49.732 DEBUG (MainThread) [music_assistant.audio] Getting streamdetails for library://radio/2
2025-02-10 07:21:50.112 WARNING (MainThread) [music_assistant.audio] Error while parsing radio URL http://lstn.lv/bbcradio.m3u8?station=bbc_radio_fourfm%22&bitrate=320000%22: No content found in playlist
2025-02-10 07:21:50.144 DEBUG (MainThread) [music_assistant.audio] retrieved streamdetails for library://radio/2 in 411 milliseconds
2025-02-10 07:21:50.249 DEBUG (MainThread) [music_assistant.players] Handling command play_media for player Voice Master Bedroom Media Player
2025-02-10 07:21:50.355 INFO (MainThread) [music_assistant.streams] Start serving audio stream for QueueItem BBC Radio 4 (library://radio/2) to Voice Master Bedroom Media Player
2025-02-10 07:21:50.355 DEBUG (MainThread) [music_assistant.player_queues] PlayerQueue Voice Master Bedroom Media Player loaded item 03a241a8f6df4c48b92ded6dc963712b in buffer
2025-02-10 07:21:50.362 DEBUG (MainThread) [music_assistant.audio] Generated ffmpeg params for player media_player.voice_master_bedroom_media_player: ['alimiter=limit=-2dB:level=false:asc=true']
2025-02-10 07:21:50.449 DEBUG (MainThread) [music_assistant.audio.media_stream] Started media stream for radiobrowser://radio/d594bffd-a494-46a0-b60e-109ad4fd3249 - using streamtype: http - volume normalization: measurement_only - pcm format: f32le - ffmpeg PID: 95
2025-02-10 07:21:50.568 DEBUG (MainThread) [ffmpeg.95] Detected (input) content type: aac (aac)
That is again the blocked URL - if you want to play BBC from within UK, you need to use one of the URL's from that lik I shared above.
BBC is actively blocking listening to their url's
Huh? My script is calling the favourite I created
- action: music_assistant.play_media
data:
media_id: BBC Radio 4
target:
entity_id:
- media_player.voice_master_bedroom_media_player_2
In MA when I find that favourite how do I inspect it (to see the URL is correct)
there must be multiple BBC Radio 4 eg from the radiobrowser external library
Ah, I think that the internals matched the Radiobrowser BBC4 with your custom URL
is there a way to reference the MA unique id from a script
As a test, you could consider naming your new entry "BBC UK Radio 4" just to prevent collisions - ensure to delete the existing one first.
Yes, just use that url
then i dont get the friendly name and icon
No, I think the best way forward is to delete the existing entrie(s) for the bbc radio stations.
So click "remove from library"
then add the new one by the special URL
I will also chew on this for a bit if we can make this a bit easier for BBC listeners
I don't think parentheses work in friend names BBC Radio 4 (UK)
hmm, that should work
a new occurrence. This morning at 7am it played a completely different 'random' track instead of BBCR4. When I looked in MA radio it was empty (no favourite anymore). When I synchronised it reappeared.
Yeah, we have a couple of other reports about that - seems to be regression in b26 or b27
i'm on b27
b28 is released with a fix. If any old version of BBC4 re-appeared in the radio list, just remove them by clicking "remove from library"
done. FYI. there was no old one reappearing
i checked the logs after updating and there was an exception generated on shutdown before it started up again. should i post these in beta? and keep this thread focussed on the streaming problem
Hmm ok in that case its strange that it re-matched to that flaky radio browser url then.
Does playback still work now today ?