I have a "Goodnight" action that stops all my media playing and turns off lights, etc. But if the Echo is playing something, I can't stop that.
Is there a simple way to get an Echo to stop playing?
I ran across this:
https://github.com/thorsten-gehrig/alex ... l_plain.sh
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).
I don't want to have to put a Wave switch on the Echo just to stop it at night. Any commands I can send to it locally to get it to stop playing?
Stopping Alexa playback
- jay (support)
- Site Admin
- Posts: 18411
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Stopping Alexa playback
Not that I know of, I didn't run across any API to do that (in fact, none that target echo devices directly).
Re: Stopping Alexa playback
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.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).
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/alex ... cript.html
The 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'
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.
-
- Posts: 54
- Joined: Fri Nov 11, 2016 10:11 pm
Re: Stopping Alexa playback
That is a very useful solution. Thanks for posting.