FireTV Actions

I’m in the process of deciding what hardware I want to purchase to do some automation in my entertainment room and need a sanity check on whats possible.

I currently own:

  • Amazon Echo Dot
  • Amazon Fire TV
  • Samsung TV (CEC capabilities)
  • Mini Stereo for the audio

I’m planning on buying:

  • Raspberry Pi 3 for HASS
  • Broadlink RM Mini for IR to stereo
  • Sonoff switches that I’ll make/hack with a couple of extension cords to control lamps

One of my big questions is I see in the python-firetv docs (https://github.com/happyleavesaoc/python-firetv) options to launch apps and to control volume. Has anyone done any work with that and does it work as described? I rarely watch tv through the dvr so if I could control the tv via the firetv commands (on/off, volume, launch app, ff, rew), which I’m assuming is using CEC, that would be ideal. I’d drop the broadlink out of the equation to save money and just go back to using the TV built in speakers

My ideal state then would be to control the functions through the Echo as much as possible.

Thanks.

I use a shell command to start the Spotify App, which works just fine. I added this shell command to a key on my Harmony Remote. If I press my “Spotify Button” my AVR turns on, Fire TV switches to Spotify App and my last played music on Spotify starts. Didn’t play around with the volume, because I use my Harmony Remote to control volume on my AVR.

/usr/bin/curl -X GET "http://hassbian-ip:5556/devices/default/apps/com.spotify.tv.android/start

1 Like

Would it be possible to do this and start playing a specific spotify playlist?

If you use FireTV you could create a script, which includes the playlist. Check out the official doc: https://www.home-assistant.io/components/media_player.spotify/#uri-links-for-playlistsetc

or this Spotify Playlist Player by GigabitGuy: Spotify Playlist Player

My current script to start Spotify on my FireTV looks like this – remember I use a Harmony remote:

spotify:
  alias: "Script - Start Spotify"
  sequence:
    - service: remote.turn_on
      entity_id: remote.media_center
      data:
        activity: 2981089
    - service: media_player.select_source
      data:
        entity_id: media_player.spotify
        source: Amazon FireTV Stick Gen 2 ♢
    - service: media_player.media_play
      data:
        entity_id: media_player.spotify

to start a playlist you would just change the last service to this (playlist is from Spotify component docs):

    - service: media_player.play_media
      data_template:
        entity_id: media_player.spotify
        media_content_id: 'spotify:user:spotify:playlist:37i9dQZF1DWSkkUxEhrBdF'
        media_content_type: 'playlist'