Launch Amazon Prime app on Firestick

I´m trying to write a script to launch the Prime video app on my Firestick. I have this working for all the other apps, but not Prime. Nothing happens when I run the script.

Can anyone tell me if the command is wrong, or in the other version the package is now different?

Command version;

  - service: androidtv.adb_command
    target:
      entity_id: media_player.fire_tv_192_168_1_100
    data:
      command: "am start -n android.intent.action.VIEW -n   com.amazon.amazonvideo.livingroom/com.amazon.ignition.IgnitionActivity"

Source version;

   - service: media_player.select_source
     target:
       entity_id: media_player.fire_tv_192_168_1_100
     data:
       source: "com.amazon.amazonvideo.livingroom"
1 Like

Use source

Below is condition example of mine

  - condition: state
    entity_id: media_player.fire_tv
    attribute: source
    state: Amazon Video

Thanks, unfortunately source: “Amazon Video” doesn’t work either.

There is a workaround actually. Try to use custom commands with Alexa Media Player within home assistant to launch amazon prime on firetv. This works %100.

Try the following source:

      - service: media_player.select_source
        data:
          entity_id: media_player.fire_tv
          source: 'com.amazon.tv.launcher'

Thanks, that just takes me to the main Firestick page.

Yeah, sorry, I went back and took a look at some notes I made as I was trying to do the same thing several months ago. Sorry to say I could not figure this out either.

1 Like

Can you let me see any examples, if you have that running? I’ve installed the media player addon and added this script, but I’m getting data call errors.

lounge_prime:
  sequence:
  - service: media_player.play_media
    target:
      entity_id: media_player.fire_tv_192_168_1_100
    data:
      media_content_type: custom
      media_content_id: 'launch prime video'

Hi,
Try creating a new Alexa routine that launches prime video on a fire tv stick, invoke that routine in your automation. i haven’t tried that but thinking it should work.

Thanks

Sure. Here is my config to launch Prime Video.

alias: Start Amazon Prime
sequence:
  - service: media_player.play_media
    data:
      media_content_type: custom
      media_content_id: open prime video on fire tv
    target:
      entity_id: media_player.berkan_s_echo_dot
mode: single
icon: mdi:television

I am giving the custom command from another Ehco Dot through HA.

Have you tried running it as a “simple” command, not with intents on Android?

Like so:

      - service: androidtv.adb_command
        target:
          entity_id: media_player.magentatv_one
        data:
          command: "monkey -p com.amazon.amazonvideo.livingroom 1"

I couldn’t get the “intent” version to run either, but in my case it’s a problem with AndroidTV being > Android 9.

What version of FireOS are you running on your FTV stick? If the underlying Android version is 10 or above, there seem to be a few problems with the ADB connection (or better with the commands send).

I’m assuming that requires another physical Alexa device (in your case an Echo) besides the Firestick?

Thanks, good to know there’s an alternative. Alas this didn’t work either. No errors, just ignores me.

Not sure about which version of Android is underneath, but it’s showing FireOS 7.2.8.5

What I’ve established so far:

None of the com.xxx commands I’ve found work.
The Firestick won’t run custom commands or routines, I’d guess an Echo device would allow that, but we’re Google based apart from a few Firesticks.

Please enable the debugging options for AndroidTV and the ADBcommand in HA.

And while you’re at it, do you have access to the logs from the FTVS? Can you get to the sources list of your FTVS? Maybe Amazon changed the name of the app.

Either way, if it only happens with one specific app, it must be something with your setup. I do have two older FTVS, that I normally don’t use anymore, but just tested them, both react as expected to commands, including opening the PrimeVideoApp.

Have you solved it? I have the same problem.

No, I tried all of the options and nothing.

I found that on my Sticks with the button I can use sendevent to capture and then use that as a command. On those without, I wrote a script to press home, right twice and select :unamused:

I haven’t tried ‘transplanting’ a sendevent into those without the button, though. That might be an option.

1 Like

Hey,

here is how i solved it:

service: androidtv.adb_command
data:
  command: >-
    am start
    com.amazon.firebat/com.amazon.firebat.deeplink.DeepLinkRoutingActivity
target:
  entity_id: media_player.fire_tv

2 Likes

Thank you. That solved the problem.