For certain podcasts, I can successfully use RSS feeds and the scrape platform along with media_player.play_media
to play the latest episode.
For example, for the podcast Conan O’Brien Needs a Friend:
sensor:
- platform: scrape
resource: https://www.omnycontent.com/d/playlist/aaea4e69-af51-495e-afc9-a9760146922b/0a686f81-0eeb-455b-98be-ab0d00055d5e/1fab2b0b-a7f0-4d71-bf6d-ab0d00055d6c/podcast.rss
name: podcast_conan_obrien
select: 'enclosure'
attribute: url
index: 0
scan_interval: 900
script:
play_conan:
sequence:
- service: switch.turn_on
entity_id: switch.tuner_tv
- service: media_player.play_media
entity_id: media_player.lounge
data_template:
media_content_id: >
{{ states.sensor.podcast_conan_obrien.state }}
media_content_type: 'music'
automation:
- alias: 'Listen to Conan'
trigger:
platform: event
event_type: rhasspy_PodcastListen
event_data:
choice: 'listen'
medium: 'podcast'
podcast: 'conan'
action:
service: script.play_conan
This method successfully works for a number of podcasts. However for a few (eg Off Menu Podcast, Distraction Pieces and Smartless) it loads the latest episode as expected in media_player.lounge
but then it fails to actually play.
In the Logbook in HA, for podcasts that fail to successfully play the latest episode, the workflow is as follows:
1. `Listen to Off Menu` has been triggered by event 'rhasspy_PodcastListen'
2. `play_off_menu` started by `Listen to Off Menu`
3. `play_off_menu` turned on by `Listen to Off Menu`
4. `Lounge` changed to Playing by `Listen to Off Menu`
5. `play_off_menu` turned off by `Listen to Off Menu`
6. `Lounge` changed to idle
The only difference from above for podcasts that work is that step 6 does not occur, the podcast instead keeps successfully playing.
Strangely, for all of the podcasts I want (including those that fail to play above), if I call the sensor in Developer Tools > States in HA, and feed the state into a browser, then the latest episode of each podcast loads and is playable in the browser. So it would seem like all of the RSS feeds that I have used are actually valid and that scrape is successfully extracting the appropriate url. I’m not sure what the problem is.
I had a look at the HA logs but it doesn’t seem to update when I either successfully play a podcast or if one fails to play. I can only see the above info in the HA Logbook.
Has anyone experienced any issues in scraping certain RSS feeds to play the latest episode of a podcast? Is it possible that certain rss feeds are blocked by HA some how?
I tried to find alternative rss feeds for my podcasts but I couldn’t find any.
I can successfully play all podcasts using the Spotify URI for the podcast - the issue with that is that I could not work out how to only play the latest episode, it just plays a random one each time.
I also looked at GPodder, however some of the shows that I want are not on there so unfortunately this is not an option.
Has anyone experienced this issue?
Any suggestions as to how I can fix it would be massively appreciated.
Thanks