Amazon Fire TV#

Stb-tester supports the Amazon Fire TV and Fire TV Stick.

Stb-tester portal showing live video from an Amazon Fire TV stick

Remote control#

Stb-tester uses HDMI CEC to send remote control commands to the Fire TV.

You will need our USB CEC adapter. If we didn’t ship one with your Stb-tester device, contact support@stb-tester.com. Plug it in as per the diagram below — the Stb-tester Node will automatically use the CEC adapter if it is plugged in.

CEC is enabled by default on the Fire TV. If you had previously disabled it, you can re-enable it by going to Settings > Display & Sounds > HDMI CEC Device Control.

Key names#

In your test scripts you can use the following key names:

  • "KEY_UP"

  • "KEY_DOWN"

  • "KEY_LEFT"

  • "KEY_RIGHT"

  • "KEY_OK"

  • "KEY_BACK"

  • "KEY_HOME"

  • "KEY_OPTIONS"

  • "KEY_REWIND"

  • "KEY_PLAY"

  • "KEY_FASTFORWARD"

Waking from sleep#

The Fire TV doesn’t implement the CEC command for “power on”. To work around this, you can stop the Fire TV from going to sleep by running the following ADB commands (this setting isn’t available from the Fire TV’s on-screen settings menus):

  1. First enable ADB in Settings > Device > Developer Options > ADB debugging.

  2. Go to Settings > Device > About > Network. Note the Fire’s IP address.

  3. In your terminal, run adb connect 192.168.1.208 (substituting your Fire’s actual IP address).

  4. Again in your terminal, run adb shell settings put secure sleep_timeout 0

This setting persists after power-cycling the Fire TV.

For more help on steps 1-3 see Amazon’s developer documentation Connect to Fire TV Through ADB.

Inter-press delay#

If you send several keypresses too quickly, the Fire TV doesn’t always send the ACK (acknowledgement) specified by the CEC protocol. When this happens, Stb-tester’s stbt.press function will raise an exception, to avoid false positives in your tests.

To prevent this from happening you can enforce a minimum delay of 3 seconds between keypresses, by specifying interpress_delay_secs in the configuration file for this Stb-tester Node:

config/test-farm/stb-tester-xxxxxxxxxxxx.conf:
[press]
interpress_delay_secs = 3