Fire TV Stick 4K can't turn off tv via ADB

I am going nuts, my fire stick 4k is connected to a 32 inch samsung J5500 series tv. The cec control is working to turn the tv on and to change the source to the correct one, however from the Android tv integration when i press the power button the stick goes into sleep mode, but does’t turn off the TV.
But, if i ask Alexa, from the tv or the alexa app to turn the tv off, it actually switches off. Please point me what am i missing in order to make the power button functional for power off.

Also tried the alexa media player integration, but the power button on the media card there does noting. Tried all sorts of ADB commands, no luck.

Thanks in advance !

I have a Fire TV Cube but I think they would work the same.
On your stick make sure developer node is on.
Install the ADB add-on and configure for your stick.
Either right after HA reset or on yhe first TV command you’ll need to “authorize” HA access/control of TV (an on screen action)
Use servive calls to medua_player_turn_on/off (and others) to control your stick.

SEE: https://www.home-assistant.io/integrations/androidtv/
Yes your Amazon TV is an Android TV :slight_smile:

Bert, I’m not totally sure what you meant. I have also a cube but I would also be interested if I could use the FireTV to control the underlying TV as I have a few old ones which I can’t integrate “normally”. Based on what you wrote, it looks like you can’t but I want to make sure. You can only control the stick or cube. Am I missing something ?

I’m confused as well about what you are trying to do. I do not use mnedia player “cards” with power buttons etc.

I just call the media_player_on/off service with the3 defined Android TV as the entiy_id. The TV turns on and off just fine. However, I am only interested in turning the TV off at 2:00am via an automation…I can press a button on the remote or ask Alexa to turn it off (or pause or stop or skip, etc.) so I see no use for the Lovelace media card.

Hi Bert,

Basically, I got a stick for free and might want to use it to control one of the TVs that I’m not able to control via Home Assistant. Based on what I wrote now is that you CAN control the underlying TV with the Firestick/ FireCube via ADB. Do you do something special for this ?

Nothing special. Again all I was interested in controlling via Home Assistant was turning the TV’s power off. You have showed me how to do that via ADB abd AndroidTV. Thank you.

Hi Bert, This is also what I’m looking for. Did you change anything to your configuration.yaml file ?
If I press the turn off button in the Lovelace card. It brings the TV to sleep but doesn’t turn it off completely. Would it be possible to share your automation ?

I did change my configuration file as directed by the configuration of ADB. My automation simply calls the turn off service with the entity ID added by that configuration. I couldn’t get a media player card to work either.

The funny thing is that I can turn on the TV with the media card but when turning it off, it goes to sleep mode. Don’t know where to look

Yeah, I am facing the exact same issue. It does work when asking Alexa, the TV turns off, but any commands from HA to the stick can only get it to sleep mode, which doesn’t turn off the TV. I still don’t have luck figuring it out.

1 Like

@Memphisdj What did you try ?
@bertmagin Can you please share the automation ?

You can use an alternate turn_off command:


I would try using the androidtv.learn_sendevent service to see if you get a different command when pressing the power button on your remote other than the default command

I’m having this exact same issue and tried to use androidtv.learn_send event to figure it out, but still can’t get it working. Have you had any luck in getting to tv to also turn off (not just ‘sleep’ on the fire stick)?

I got the adb_response back, but not sure what to do with it? When trying to re-enter that response in the adb_command service, gives me error that the path /dev/input doesn’t exist.

has anyone figured this out yet?

Hi there,

still nothing? I just tested with hdmi-cec script and I have the same problem: not real power off but rather a standby…

Here is someone detailing the steps involved a bit:

Anyone make any progress on this? Also hitting this issue with Fire TV stick 4k. Tried the adb_command as well, but didn’t work–that didn’t turn the Fire TV off either, so I’m not convinced I did it right. Willing to work with someone to troubleshoot.

Does anyone solve this? Any ideas? the only one in my mind is to connect the TV through a Smartplug and make an automation to power it off when the Firestick is “sleep”. Not the best solution but I think could be useful. I also tried with other adb commands like input keyevent KEYCODE_TV_POWER but nothing really happens.

1 Like

Nah, i still cant turn it off. I definitly can turn it on, but not off.

Did anyone ever figure this out?

I suspect that it’s not CEC that is actually turning the TV off, rather the Fire TV device blasting the corresponding IR code which is taking care of it. Since this functionality also works when using the FireTV app, I assume there is some way to invoke it… I’m just not sure what that way is though.