this guy build a pretty easy script to Control Alexa:
https://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html
Great Work, running well. Have Fun!
Commandline Options:
echo "$0 [-d <device>|ALL] -e <pause|play|next|prev|fwd|rwd|shuffle|vol:<0-100>> | -b [list|<\"AA:BB:CC:DD:EE:FF\">] | -q | -r <\"station name\"|stationid> | -s <trackID> | -t <ASIN> |"
echo " -u <seedID> | -v <queueID> | -w <playlistId> | -i | -p | -P | -S | -a | -m <multiroom_device> [device_1 .. device_X] | -lastalexa | -l | -h"
echo " -e : run command"
echo " -b : connect/disconnect/list bluetooth device"
echo " -q : query queue"
echo " -r : play tunein radio"
echo " -s : play library track"
echo " -t : play Prime playlist"
echo " -u : play Prime station"
echo " -v : play Prime historical queue"
echo " -w : play library playlist"
echo " -i : list imported library tracks"
echo " -p : list purchased library tracks"
echo " -P : list Prime playlists"
echo " -S : list Prime stations"
echo " -a : list available devices"
echo " -m : delete multiroom and/or create new multiroom containing devices"
echo " -lastalexa : print device that received the last voice command"
echo " -l : logoff"
echo " -h : help"
}
Version History:
Amazon Alexa Remote Control
alex(at)loetzimmer.de
2017-10-10: v0.1 initial release
2017-10-11: v0.2 TuneIn Station Search
2017-10-11: v0.2a commands on special device “ALL” are executed on all ECHO+WHA
2017-10-16: v0.3 added playback of library tracks
2017-10-24: v0.4 added playback information
2017-11-21: v0.5 added Prime station and playlist
2017-11-22: v0.6 added Prime historical queue and replaced getopts
2017-11-25: v0.6a cURL is now configurable
2017-11-25: v0.7 added multiroom create/delete, playback of library playlist
2017-11-30: v0.7a added US config, fixed device names containing spaces
2017-12-07: v0.7b added Bluetooth connect/disconnect
2017-12-18: v0.7c fixed US version
2017-12-19: v0.7d fixed AWK csrf extraction on some systems
2017-12-20: v0.7e moved get_devlist after check_status
2018-01-08: v0.7f added echo-show to ALL group, TuneIn station can now be up to 6 digits
2018-01-08: v0.8 added bluetooth list function
2018-01-10: v0.8a abort when login was unsuccessful
2018-01-25: v0.8b added echo-spot to ALL group
2018-01-28: v0.8c added configurable browser string
2018-02-17: v0.8d no need to write the cookie file on every "check_status"
2018-02-27: v0.8e added “lastalexa” option for HA-Bridge to send its command to a specific device
(Markus Wennesheimer: https://wennez.wordpress.com/light-on-with-alexa-for-each-room/)
2018-02-27: v0.9 unsuccessful logins will now give a short info how to debug the login
2018-03-09: v0.9a workaround for login problem, force curl to use http1.1
2018-05-17: v0.9b update browser string and accept language
(no BASHisms were used, should run with any shell)
- requires cURL for web communication
- (GNU) sed and awk for extraction
- jq as command line JSON parser (optional for the fancy bits)