Control your Amazon Fire TV (or every Android Device) from openHAB

Are there any log entries in openhab.log when your rule is triggered?
When all is OK, you should see something like this:

executed commandLine '/etc/openhab2/scripts/fire-control.sh 85'

If entries like that are there, maybe i would start with with a command that is easier to track. Like start a stream and use keyevent 85 to pause the stream.
BTW here is the script “fire-control.sh” i use that can be fed parameters:

#!/bin/bash
#works without next line, dunno what it's good for
#adb tcpip 5555 
adb connect YOUR-FIRETV-IP-OR-DNSNAME-HERE:5555
adb shell input keyevent $1
adb disconnect

can be called like so with any keycode you fancy:

executeCommandLine("/etc/openhab2/scripts/fire-control.sh 85")//85=code for play/pause
2 Likes