Send podcast episode to Alexa?

I might be barking up the wrong tree here, but maybe someone can help

Basically, I want a way to get only the LATEST episode of a podcast sent to Alexa. Using the inbuilt Alexa routes (either skills or podcasts) it will continue playing every episode

I had previously hacked this for a different scenario by parsing the feed and hosting this on my own server and setting up my own Alexa skill but for some reason that’s broken and I’m unable to fix it

So, wondering if there might be a way to use Home Assistant and push using the Alexa media player…
Any thoughts?

One thing I’ve been able to do is use the REST integration to point directly to a podcast RSS feed and extract the URL for the podcast episode - which in turn you can pass to the media_player.play_media service.

Here’s my REST config:

rest:
- method: GET
  resource: https://feeds.megaphone.fm/pivot
  scan_interval: 600
  sensor:
  - name: pivot_most_recent_episode_url
    value_template: '{{ value_json["rss"]["channel"]["item"][0]["enclosure"]["@url"]
      }}'
  - name: pivot_most_recent_episode_pub_date
    value_template: '{{ value_json.rss.channel.item[0].pubDate  }}'
  - name: pivot_most_recent_episode_title
    value_template: '{{ value_json.rss.channel.item[0].title  }}'
- method: GET
  resource: https://feeds.npr.org/510318/podcast.xml
  scan_interval: 600
  sensor:
  - name: upfirst_most_recent_episode_url
    value_template: '{{ value_json["rss"]["channel"]["item"][0]["enclosure"]["@url"]
      }}'
  - name: upfirst_most_recent_episode_pub_date
    value_template: '{{ value_json.rss.channel.item[0].pubDate  }}'
  - name: upfirst_most_recent_episode_title
    value_template: '{{ value_json.rss.channel.item[0].title  }}'

Here’s a snippet where I use it:

service: media_player.play_media
data:
  media_content_type: music
  media_content_id: "{{states('sensor.upfirst_most_recent_episode_url')}}"
target:
  entity_id: media_player.living_room

All podcast RSS feeds should look the same structure wise. The REST integration will auto-convert XML to JSON given the correct headers.

1 Like

Thank you for providing this. I’m trying to set this up for the conan o’brien podcast and the smartless podcast. Unfortunately the conan podcast doesnt seem to pull the url but pulls episode name etc while the smartless podcast does pull the url but doesnt play. Would you mind if you got time to see if you could get them to work on your side?

Conan feed - Conan O’Brien Needs A Friend
Smartless feed - SmartLess