Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thorsten-gehrig/alexa-remote-control
control Amazon Alexa from command Line (set volume, select station from tunein or pandora)
https://github.com/thorsten-gehrig/alexa-remote-control
Last synced: about 1 month ago
JSON representation
control Amazon Alexa from command Line (set volume, select station from tunein or pandora)
- Host: GitHub
- URL: https://github.com/thorsten-gehrig/alexa-remote-control
- Owner: thorsten-gehrig
- Created: 2016-12-25T08:08:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-06T21:49:06.000Z (8 months ago)
- Last Synced: 2024-08-03T01:38:06.049Z (4 months ago)
- Language: Shell
- Size: 193 KB
- Stars: 414
- Watchers: 46
- Forks: 102
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-repositories - thorsten-gehrig/alexa-remote-control - control Amazon Alexa from command Line (set volume, select station from tunein or pandora) (Shell)
README
# alexa-remote-control
control Amazon Alexa from command LineThe settings can now be controlled via environment variables.
```
BROWSER - the User-Agent your browser sends in the request header
AMAZON - your Amazon domain
ALEXA - the URL you would use for the Alexa Web App
CURL - location of your cURL binary
OPTS - any cURL options you require
TMP - location of the temp dir
SPEAKVOL - the volume for speak messages ( if set to 0, volume levels are left untouched)
NORMALVOL - if no current playing volume can be determined, fall back to normal volume
VOLMAXAGE - max. age in minutes before volume is re-read from API
DEVICEVOLNAME - a list of device names with specific volume settings (space separated)
DEVICEVOLSPEAK - a list of speak volume levels - matching the devices above
DEVICEVOLNORMAL - a list of normal volume levels- matching the devices above
(current playing volume takes precedence for normal volume)
REFRESH_TOKEN - the new preference over EMAIL/PASSWORD can be obtained here: https://github.com/adn77/alexa-cookie-cli
``````
alexa-remote-control [-d |ALL] -e > |
-b [list|<"AA:BB:CC:DD:EE:FF">] | -q | -n | -r <"station name"|stationid> |
-s | -t | -u | -v |
-w | -i | -p | -P | -S | -a | -z | -l | -h |
-m [device_1 .. device_X] | -lastalexa | -lastcommand-e : run command, additional SEQUENCECMDs:
weather,traffic,flashbriefing,goodmorning,singasong,tellstory,
speak:'',automation:'',sound:,
textcommand:'',
playmusic::''-b : connect/disconnect/list bluetooth device
-c : list 'playmusic' channels
-q : query queue
-n : query notifications
-r : play tunein radio
-s : play library track/library album
-t : play Prime playlist
-u : play Prime station
-v : play Prime historical queue
-w : play library playlist
-i : list imported library tracks
-p : list purchased library tracks
-P : list Prime playlists
-S : list Prime stations
-a : list available devices
-m : delete multiroom and/or create new multiroom containing devices
-lastalexa : print device that received the last voice command
-lastcommand : print last voice command or last voice command of specific device
-login : Logs in, without further command (downloads cookie)
-z : print current volume level
-l : logoff
-h : help
```Login via REFRESH_TOKEN
----
The Alexa-App way of logging in is using a REFRESH_TOKEN which allows for obtaining the session cookies. This replaces EMAIL/PASSWORD/MFA so those will not be exposed in any scripts anymore. For convenience I created a binary, ready to run: https://github.com/adn77/alexa-cookie-clihttps://blog.loetzimmer.de/2021/09/alexa-remote-control-shell-script.html