Merge pull request #66 from adn77/master
Added Volume setting via routine, and $SPEAKVOL
|2 months ago|
|README.md||2 months ago|
|alexa_remote_control.sh||2 months ago|
|alexa_remote_control_plain.sh||2 months ago|
control Amazon Alexa from command Line
The settings can now be controlled via environment variables.
EMAIL - your login email PASSWORD - your login password BROWSER - the User-Agent your browser sends in the request header LANGUAGE - the Accept-Language 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 OATHTOOL - command line for oathtool MFA MFA_SECRET- the MFA secret SPEAKVOL - the volume for speak messages
You will very likely want to set the language to:
alexa-remote-control [-d <device>|ALL] -e <pause|play|next|prev|fwd|rwd|shuffle|repeat|vol:<0-100>> | -b [list|<"AA:BB:CC:DD:EE:FF">] | -q | -r <"station name"|stationid> | -s <trackID|'Artist' 'Album'> | -t <ASIN> | -u <seedID> | -v <queueID> | -w <playlistId> | -i | -p | -P | -S | -a | -l | -h | -m <multiroom_device> [device_1 .. device_X] | -lastalexa -e : run command, additional SEQUENCECMDs: weather,traffic,flashbriefing,goodmorning,singasong,tellstory, speak:'<text>',automation:'<routine name>' -b : connect/disconnect/list bluetooth device -q : query queue -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 -l : logoff -h : help
There’s also a “plain” version, which lacks some functionality (-i, -p, -P, -S and no radio station names and no routines) but doesn’t require ‘jq’ for JSON processing.
In order to use MFA, one needs to obtain the MFA_SECRET from Amazon account:
1234 5678 9ABC DEFG HIJK LMNO PQRS TUVW XYZ0 1234 5678 9ABC DEFG
oathtool -b --totp "<MFA shared secret from above>"and enter that in the web form
It is assumed that MFA secured accounts are less likely to get a captcha response during login - that’s why MFA might yield better results if the plain username/password didn’t work for you.