-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BBC Radio Two on BBC Sounds Cast No Longer Working #101151
Comments
Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) cast documentation |
Here is a workaround: |
Just a +1 to this. Logger: homeassistant.components.cast.media_player Failed to cast media bbc_radio_two. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address |
Now failing for Radios 1, 2 & 4: Logger: homeassistant.components.cast.media_player Failed to cast media bbc_radio_fourfm. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address |
The new stream links for the various radio stations I've had a look at the code but I can't see how it currently handles BBC Sounds streams to update the links. Hopefully someone will! In the meantime, here is the workaround: |
Still getting the error when using the above example? Have they changed the URLs again?
EDIT:
|
Good spot @Hobbit44 The workaround now is:
BBC STATION NAME should be of the format: |
For info, here's a link to the announcement from the BBC regarding the changes to their streaming services: https://www.bbc.co.uk/sounds/help/questions/recent-changes-to-bbc-sounds/radio-changes |
I think the issue is somewhere in /home-assistant-libs/pychromecast which has a bbcsounds controller. I logged an issue there. I think this is caused by BBC now requiring sign in to Sounds in order to play media through it. Note however that the method using I don't have a Google smart speaker, but it doesn't look like it is currently required to set them up with a BBC account in order to listen through them, so perhaps there is some hope this will last a bit longer. |
I have a PR in the pychromecast library for this, cause was BBC Sounds updating their app_id. Once it is merged I will up the version in core and submit a PR. |
Seems like the workaround URLs have been changed or removed as of this morning (at least for R2 and R1). |
@jbeardon yes, it looks like the following PR needs to be accepted for this to work reliably going forwards: |
Thanks - I've bumped the PR as well. |
Radio 6 Music working ok via the URL and In the long run, BBC has stated it's intent to restrict access to all its radio station streams (except World Service) to logged in users. It's only a matter of time. And when that happens, it is annoying that any changes they make to app_id might require a several weeks long PR process here before casting is possible. |
Personally, I wouldn't mind having a way to store login details for the service. |
Thanks for bumping the PR. Any ideas how we can get updated workaround URLs? |
From what I have seen and read, BBC are removing all links to services that do not require a sign in. I can 'sort of' understand why but it's still a PITA. Most of the scenarios I am using Cast in are using Chromecast Audios connected to external amps and speakers - I'm moving over to Echo Flex's as they natively use the BBC Sounds service. You could probably achieve the same using the Google Home SDK integration but I can't be bothered with all the faff with developer accounts/keys etc. |
Note that BBC made a specific announcement about stopping the Shoutcast service, and only providing HLS and DASH streams from this year. I would not expect them to kill all streaming URLs without an official announcement and prior warning - for example they made regular announcements on the ending of the Shoutcast streams on the streams themselves for a year before they turned them off. I haven't heard this on the HLS URLs so I would not assume they are killing them. They might change the URL format, or even have technical hitches. Still, one day we might need a BBC Sounds integration much like we do with Spotify. |
I can see no announcement for dropping or changing the Simulcast links (which are the ones we have been using as a work-around). These are not ones that were dropping in announcements. |
I found another announcement regarding protected HLS and DASH streams only available to distributors with agreements with the BBC. This thread might have some useful info. Also, this one. It would be nice to see if applying the app_id change in the PR resolves the issue for now. |
I found a BBC Sounds Plugin for Logitech Media Center that implements login with a BBC Sounds account and a long lived token. It is written in Perl, so not immediately transferable to Home Assistant, but at least shows some of the mechanisms that might be used for a BBC Sounds integration. I'll keep an eye on it to see whether it shows any signs of breaking as BBC make changes. |
That plugin for LMS requires a login to work. The BbcSounds controller in pychromecast attempts to play the media via the web version of BBC sounds, eg https://www.bbc.co.uk/sounds/play/live:bbc_6music - this is where the "media_id" is used for play_media service, bbc_6music in this case. I have changed my local pychromecast as per home-assistant-libs/pychromecast#753 and it still doesn't work. That web page requires a login to work now too, try opening it in an incognito tab and it pops up a login prompt. IDK if there is any way to embed your login credentials in the url? The only unauthenticated streams still up are those in the format http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_6music/bbc_6music.isml/bbc_6music-audio%3d96000.norewind.m3u8 and those are unplayable via home assistant/pychromecast. If you open it in vlc it plays and vlc can cast it to a chromecast audio. |
It does seem that login free BBC Radio is gone or imminently so. If this is true then am I right in thinking that an integration that supports credential storage will be required? If so, would this be instead of pychromecast or something that sent an authenticated/login specific URL to pychromecast for playing from Chromecast devices. How does the Spotify integration do it? |
Posted elsewhere is this that still works for casting http://lsn.to/B6M for 6 music and http://lsn.to/B4D for radio 4, just open in a web browser and copy the desired bitrate link eg 320k 6music is http://lstn.lv/bbc.m3u8?station=bbc_6music&bitrate=320000. Its a sorry state of affairs that the BBC have effectively disabled embedded streaming radios wholesale, yet we can use a third party web site that looks like it was developed 20 years ago that has working links today. Oddly enough if you run chrome net export log on lstn.lv you get this: | 378060 | HTTP_STREAM_JOB_CONTROLLER | https://lstn.lv/bbc.m3u8?station=bbc_6music&bitrate=320000 So maybe they are doing the necessary stuff for chromecast, CORS? |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
My PR (that was mentioned above) was merged and this was incorporated into Home Assistant and I tested it as working. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
I don't know if it was just bad timing, or I'm having a local issues but seems BBC has broken this again. One of the BBC World Services listed works ok, the rest appear to try to buffer and then go idle. I do recall seeing something about them doing another change to iplayer/sounds, so could well be related. Any fix I suspect is going to break again, unless they approve the platform. Edit 1: Just noticed I was on 2024.4.3, so updating now and will update this post with results from that). |
Working fine for me, I'm back on 2023.11.3 though and am not in a position to upgrade currently, but I can't see this area of the code changing unless the integration breaks and I do it! 😄 Try my script and see if it works for you? alias: BBC Radio 1
sequence:
- service: media_player.play_media
data:
media_content_type: cast
media_content_id: >-
{ "app_name": "bbcsounds", "media_id": "bbc_radio_one", "is_live": true
}
extra:
metadata:
metadataType: 0
title: Radio 1
images:
- url: >-
https://sounds.files.bbci.co.uk/2.3.0/networks/bbc_radio_one/background_1280x720.png
target:
entity_id:
- media_player.googlehome5999
mode: single |
Thank you so much, that works for Radio 1,2,3 but of course.. radio 4 is not just "bbc_radio_four" but "bbc_radio_fourfm". Its working, so the OH will be happy again. Thank you again. (so definitely a Me thing then,, just strange timing). |
thanks @blawford Your script works fine for me as well. I just need to update all of them when I finish work as its not too easy doing it via an iPad 😉 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
Using cast and BBC Sounds works fine for most radio stations include Radio 1 and Radio 4, but the radio 2 stream fails to play.
For example, the below code does not play any audio stream:
service: media_player.play_media data: media_content_type: cast media_content_id: ' { "app_name": "bbcsounds", "media_id": "bbc_radio_two", "is_live": true }' target: device_id: a052b41711e2f011c18ba32c7f9f107b
Whereas this works fine:
service: media_player.play_media data: media_content_type: cast media_content_id: ' { "app_name": "bbcsounds", "media_id": "bbc_radio_one", "is_live": true }' target: device_id: a052b41711e2f011c18ba32c7f9f107b
It is mentioned in some other posts in tangential matters that the BBC is standing down the mp3 streams this year. I don't know if this might be related?
What version of Home Assistant Core has the issue?
2023.9.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
cast
Link to integration documentation on our website
https://www.home-assistant.io/integrations/cast/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: