mirror of
https://github.com/thorsten-gehrig/alexa-remote-control.git
synced 2024-11-22 08:49:02 +01:00
fixed new API endpoint for automations
This commit is contained in:
parent
6345f416c5
commit
8ceb743611
@ -61,6 +61,8 @@
|
||||
# ( https://github.com/thorsten-gehrig/alexa-remote-control/issues/108 )
|
||||
# 2020-12-12: v0.17a sounds now benefit from SPEAKVOL
|
||||
# fixed TuneIn IDs to also play podcasts
|
||||
# 2021-01-28: v0.17b fixed new API endpoint for automations
|
||||
# (thanks to Michael Winkler)
|
||||
#
|
||||
###
|
||||
#
|
||||
@ -218,7 +220,7 @@ usage()
|
||||
while [ "$#" -gt 0 ] ; do
|
||||
case "$1" in
|
||||
--version)
|
||||
echo "v0.17a"
|
||||
echo "v0.17b"
|
||||
exit 0
|
||||
;;
|
||||
-d)
|
||||
@ -643,7 +645,7 @@ if [ -n "${SEQUENCECMD}" ] ; then
|
||||
${CURL} ${OPTS} -s -b ${COOKIE} -A "${BROWSER}" -H "DNT: 1" -H "Connection: keep-alive" -L\
|
||||
-H "Content-Type: application/json; charset=UTF-8" -H "Referer: https://alexa.${AMAZON}/spa/index.html" -H "Origin: https://alexa.${AMAZON}"\
|
||||
-H "csrf: $(awk "\$0 ~/.${AMAZON}.*csrf[ \\s\\t]+/ {print \$7}" ${COOKIE})" -X GET \
|
||||
"https://${ALEXA}/api/behaviors/automations?limit=200" > "${TMP}/.alexa.automation"
|
||||
"https://${ALEXA}/api/behaviors/v2/automations?limit=200" > "${TMP}/.alexa.automation"
|
||||
|
||||
AUTOMATION=$(jq --arg utterance "${UTTERANCE}" -r '.[] | select( .triggers[].payload.utterance == $utterance) | .automationId' "${TMP}/.alexa.automation")
|
||||
if [ -z "${AUTOMATION}" ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user