But it seems like it's log-in function can have issues with CAPTCHAs occasionally. I also don't want to have something logging into my Amazon account for this. (But an API key would be OK).
This is an old post, September 12th, 2021 but in that same month (8 days later), the author shared a way to generate a refresh_token, which avoids the CAPTCHA issues I believe you were referring to.
Basically the shell script logs into your Amazon account as you, from your local machine and performs the actions. On the authors blog he says; "the idea is to proxy the login to Amazon very similar to how a mobile app would". The blog is written in German but translates fairly well and explains how it works in more detail.
https://blog.loetzimmer.de/2021/09/alexa-remote-control-shell-script.htmlThe Alexa Remote Control Shell Script is what I use to allow Indigo to interact with my Alexa devices. I have had no issues using this solution. I can get Actions Groups and Triggers to generate speech on any Alexa device and get Indigo to ask an Alexa anything, as if I verbally asked it.
Back to your issue, I'd just code;
- Code: Select all
alexa_remote_control.sh -d 'Loft Echo' -e textcommand:'stop'
Which is the equivalent of saying; "Alexa, stop" to my Loft Echo Dot.
The only challenge I ran into implementing this solution was loading HomeBrew and JQ, during the initial setup. Just something I hadn't done before...not difficult.