So I have a new Amazon Fire TV cube. It's great as it makes my TV viewing voice controlled. But there are times I want to control my Fire TV Cube via Indigo. For example, at 9 PM, my Indigo locks the doors and arms the alarm and announces the lockdown and battery level thru my Sonos Beam soundbar. But I am often watching TV at that time so I want to pause my TV before issuing the Sonos announcement.
From what I've learned, i can install Adroid Debugging (ADB) on my mac and via a terminal command from my mac connect to the Fire and pause it. I tried this on my Macbook (not where Indigo runs) and it worked just fine. So I'd like to install ADB on my Indigo Mac and then wrap this simple command in a script (either apple or python I assume), but I am not a programmer.
The terminal command looks like this:
adb connect 192.168.2.91
adb shell input keyevent KEYCODE_MEDIA_PLAY_PAUSE
adb disconnect
This toggles the pause so I'd issue the same command after the sonos announcement.
I'm guessing this is trivial to do in script, but I know nothing about python or applescript so wondering if someone can help with how to wrap these commands into a batch file of sorts that can be called via Indigo (and advise how to call it).
Thanks in advance for guidance.