Anbindung von FS20-Komponenten, ELV-Wetterstationen, EnOcean und DMX an HomeMatic
Moderator: Co-Administratoren
-
falke69
- Beiträge: 61
- Registriert: 05.11.2016, 19:51
Beitrag
von falke69 » 17.12.2017, 16:33
leider auch ohne Erfolg:
Code: Alles auswählen
/usr/local/addons/user$ ./alexa_remote_control_plain.sh -a
cookie do not exist. logging in ...
device list do not exist. downloading ...
cookie expired, logging in again ...
grep: /usr/local/addons/user/tmp/.alexa.devicelist.txt: No such file or directory
the following devices exist in your account:
-
fantasticn
- Beiträge: 102
- Registriert: 15.03.2016, 14:34
Beitrag
von fantasticn » 17.12.2017, 16:44
Gib mal folgendes ein:
sh -x alexa_remote_control_plain.sh -a
-
falke69
- Beiträge: 61
- Registriert: 05.11.2016, 19:51
Beitrag
von falke69 » 17.12.2017, 16:47
da kommt folgendes:
Code: Alles auswählen
/usr/local/addons/user$ h -x alexa_remote_control_plain.sh -a
-sh: h: not found
/usr/local/addons/user$ sh -x alexa_remote_control_plain.sh -a
+ EMAIL=xxxxx@xxxxx.de
+ PASSWORD=*********
+ LANGUAGE=de,en
+ AMAZON=amazon.de
+ ALEXA=layla.amazon.de
+ CURL=/usr/local/addons/cuxd/curl
+ OPTS=--compressed
+ TMP=/usr/local/addons/user/tmp
+ COOKIE=/usr/local/addons/user/tmp/.alexa.cookie
+ DEVLIST=/usr/local/addons/user/tmp/.alexa.devicelist.json
+ DEVTXT=/usr/local/addons/user/tmp/.alexa.devicelist.txt
+ GUIVERSION=0
+ LIST=
+ LOGOFF=
+ COMMAND=
+ STATIONID=
+ QUEUE=
+ SONG=
+ ASIN=
+ SEEDID=
+ HIST=
+ LEMUR=
+ CHILD=
+ PLIST=
+ BLUETOOTH=
+ [ 1 -gt 0 ]
+ LIST=true
+ shift
+ [ 0 -gt 0 ]
+ [ -z -a -z -a -z -a -z -a -z -a -z -a -z -a -z -a -z -a -z -a -n ]
+ [ ! -f /usr/local/addons/user/tmp/.alexa.cookie ]
+ echo cookie do not exist. logging in ...
cookie do not exist. logging in ...
+ log_in
+ rm -f /usr/local/addons/user/tmp/.alexa.devicelist.json
+ rm -f /usr/local/addons/user/tmp/.alexa.devicelist.txt
+ rm -f /usr/local/addons/user/tmp/.alexa.cookie
+ grep hidden
+ /usr/local/addons/cuxd/curl --compressed -s -D /usr/local/addons/user/tmp/.alexa.header -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H Accept-Language: de,en -H DNT: 1 -H Connection: keep-alive -H Upgrade-Insecure-Requests: 1 -L https://alexa.amazon.de
+ sed -r s/^.*name="([^"]+)".*value="([^"]+)".*/\1=\2\&/g
+ sed s/hidden/\n/g
+ grep value="
+ sed s/hidden/\n/g
+ grep hidden
+ sed s/Location: /Referer: /
+ grep value="
+ grep Location: /usr/local/addons/user/tmp/.alexa.header
+ sed -r s/^.*name="([^"]+)".*value="([^"]+)".*/\1=\2\&/g
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H Accept-Language: de,en -H DNT: 1 -H Connection: keep-alive -H Upgrade-Insecure-Requests: 1 -L -H -d @/usr/local/addons/user/tmp/.alexa.postdata https://www.amazon.de/ap/signin
+ awk $0 ~/.amazon.de.*session-id[\s\t]/ {print $7} /usr/local/addons/user/tmp/.alexa.cookie
awk: /usr/local/addons/user/tmp/.alexa.cookie: No such file or directory
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H Accept-Language: de,en -H DNT: 1 -H Connection: keep-alive -H Upgrade-Insecure-Requests: 1 -L -H Referer: https://www.amazon.de/ap/signin/ --data-urlencode email=xxxxx@xxxxx.de --data-urlencode password=********* -d @/usr/local/addons/user/tmp/.alexa.postdata2 https://www.amazon.de/ap/signin
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H DNT: 1 -H Connection: keep-alive -L -H Referer: https://alexa.amazon.de/spa/index.html -H Origin: https://alexa.amazon.de https://layla.amazon.de/api/language
+ rm -f /usr/local/addons/user/tmp/.alexa.header
+ rm -f /usr/local/addons/user/tmp/.alexa.postdata
+ rm -f /usr/local/addons/user/tmp/.alexa.postdata2
+ [ ! -f /usr/local/addons/user/tmp/.alexa.devicelist.json ]
+ echo device list do not exist. downloading ...
+ get_devlist
device list do not exist. downloading ...
+ awk $0 ~/.amazon.de.*csrf[\s\t]/ {print $7} /usr/local/addons/user/tmp/.alexa.cookie
awk: /usr/local/addons/user/tmp/.alexa.cookie: No such file or directory
+ /usr/local/addons/cuxd/curl --compressed -s -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H DNT: 1 -H Connection: keep-alive -L -H Content-Type: application/json; charset=UTF-8 -H Referer: https://alexa.amazon.de/spa/index.html -H Origin: https://alexa.amazon.de -H csrf: https://layla.amazon.de/api/devices-v2/device?cached=false
+ [ ! -f /usr/local/addons/user/tmp/.alexa.devicelist.txt ]
+ cat /usr/local/addons/user/tmp/.alexa.devicelist.json
+ sed s/[\,]/ /g
+ sed s/\"\:\"/\|/g
+ awk -v k=text {n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}
+ sed s/[{}]//g
+ sed s/\\\\\//\//g
+ sed s/\"//g
+ check_status
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H DNT: 1 -H Connection: keep-alive -L https://layla.amazon.de/api/bootstrap?version=0
+ sed -r s/^.*"authenticated":([^,]+),.*$/\1/g
+ AUTHSTATUS=
+ [ = true ]
+ return 0
+ [ 0 -eq 0 ]
+ echo cookie expired, logging in again ...
+ log_in
+ rm -f /usr/local/addons/user/tmp/.alexa.devicelist.json
cookie expired, logging in again ...
+ rm -f /usr/local/addons/user/tmp/.alexa.devicelist.txt
+ rm -f /usr/local/addons/user/tmp/.alexa.cookie
+ grep value="
+ sed s/hidden/\n/g
+ grep hidden
+ /usr/local/addons/cuxd/curl --compressed -s -D /usr/local/addons/user/tmp/.alexa.header -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H Accept-Language: de,en+ sed -r s/^.*name="([^"]+)".*value="([^"]+)".*/\1=\2\&/g
-H DNT: 1 -H Connection: keep-alive -H Upgrade-Insecure-Requests: 1 -L https://alexa.amazon.de
+ grep hidden
+ sed s/Location: /Referer: /
+ + sed -r s/^.*name="([^"]+)".*value="([^"]+)".*/\1=\2\&/g
grep value="
+ sed s/hidden/\n/g
+ grep Location: /usr/local/addons/user/tmp/.alexa.header
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H Accept-Language: de,en -H DNT: 1 -H Connection: keep-alive -H Upgrade-Insecure-Requests: 1 -L -H -d @/usr/local/addons/user/tmp/.alexa.postdata https://www.amazon.de/ap/signin
+ awk $0 ~/.amazon.de.*session-id[\s\t]/ {print $7} /usr/local/addons/user/tmp/.alexa.cookie
awk: /usr/local/addons/user/tmp/.alexa.cookie: No such file or directory
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H Accept-Language: de,en -H DNT: 1 -H Connection: keep-alive -H Upgrade-Insecure-Requests: 1 -L -H Referer: https://www.amazon.de/ap/signin/ --data-urlencode email=xxxxx@xxxxx.de --data-urlencode password=********* -d @/usr/local/addons/user/tmp/.alexa.postdata2 https://www.amazon.de/ap/signin
+ /usr/local/addons/cuxd/curl --compressed -s -c /usr/local/addons/user/tmp/.alexa.cookie -b /usr/local/addons/user/tmp/.alexa.cookie -A Mozilla/5.0 -H DNT: 1 -H Connection: keep-alive -L -H Referer: https://alexa.amazon.de/spa/index.html -H Origin: https://alexa.amazon.de https://layla.amazon.de/api/language
+ rm -f /usr/local/addons/user/tmp/.alexa.header
+ rm -f /usr/local/addons/user/tmp/.alexa.postdata
+ rm -f /usr/local/addons/user/tmp/.alexa.postdata2
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ [ -n true ]
+ ATTR=accountName
+ echo the following devices exist in your account:
+ sed s/ /_/g
+ sed s/^.*accountName|//
+ grep accountName| /usr/local/addons/user/tmp/.alexa.devicelist.txt
grep: /usr/local/addons/user/tmp/.alexa.devicelist.txt: No such file or directory
the following devices exist in your account:
+ [ -n ]
-
fantasticn
- Beiträge: 102
- Registriert: 15.03.2016, 14:34
Beitrag
von fantasticn » 17.12.2017, 17:00
Also OPTS ist wohl immer noch falsch gesetzt. Siehe meinen obigen Post.
Zudem befindet sich CURL bei mir in folgendem Pfad:
/usr/local/addons/cuxd/extra
Überprüf das mal bei Dir und passe die Pfadangabe im Script dann ggf. auch entsprechend an.
-
falke69
- Beiträge: 61
- Registriert: 05.11.2016, 19:51
Beitrag
von falke69 » 17.12.2017, 17:06
fantasticn hat geschrieben:Also OPTS ist wohl immer noch falsch gesetzt. Siehe meinen obigen Post.
Zudem befindet sich CURL bei mir in folgendem Pfad:
/usr/local/addons/cuxd/extra
Überprüf das mal bei Dir und passe die Pfadangabe im Script dann ggf. auch entsprechend an.
habe ich gemacht.
Ändert leider nichts.
-
fantasticn
- Beiträge: 102
- Registriert: 15.03.2016, 14:34
Beitrag
von fantasticn » 17.12.2017, 17:15
Also nur zur Kontrolle. Das sieht jetzt bei Dir im Script so aus:
# cURL binary
#CURL='/usr/bin/curl'
CURL='/usr/local/addons/cuxd/extra/curl'
#CURL='/curl'
# cURL options
# -k : if your cURL cannot verify CA certificates, you'll have to trust any
# --compressed : if your cURL was compiled with libz you may use compression
#OPTS='--compressed'
OPTS='-k --compressed'
###########################################
# nothing to configure below here
#
TMP="/usr/local/addons/user/tmp"
COOKIE="${TMP}/.alexa.cookie"
DEVLIST="${TMP}/.alexa.devicelist.json"
DEVTXT="${TMP}/.alexa.devicelist.txt"
-
falke69
- Beiträge: 61
- Registriert: 05.11.2016, 19:51
Beitrag
von falke69 » 17.12.2017, 17:18
genau
Code: Alles auswählen
# cURL binary
CURL='/usr/local/addons/cuxd/extra/curl'
# cURL options
# -k : if your cURL cannot verify CA certificates, you'll have to trust any
# --compressed : if your cURL was compiled with libz you may use compression
#OPTS='--compressed'
OPTS='-k --compressed'
###########################################
# nothing to configure below here
#
TMP="/usr/local/addons/user/tmp"
COOKIE="${TMP}/.alexa.cookie"
DEVLIST="${TMP}/.alexa.devicelist.json"
DEVTXT="${TMP}/.alexa.devicelist.txt"
-
Murmelbaerchen69
- Beiträge: 274
- Registriert: 01.12.2013, 22:55
- Wohnort: @home
Beitrag
von Murmelbaerchen69 » 17.12.2017, 17:20
Hallo,
bei mir läuft es so:
Code: Alles auswählen
# cURL binary
CURL='/usr/local/addons/cuxd/curl'
# cURL options
# -k : if your cURL cannot verify CA certificates, you'll have to trust any
# --compressed : if your cURL was compiled with libz you may use compression
# OPTS='--compressed'
OPTS=' -k --compressed'
###########################################
# nothing to configure below here
#
TMP="/tmp"
Gruß Ralf
Das soll ein neuer Computer sein ? Warum steht den auf der Tastatur "ALT" ?
-
falke69
- Beiträge: 61
- Registriert: 05.11.2016, 19:51
Beitrag
von falke69 » 17.12.2017, 17:22
da bekomme ich leider den gleichen Fehler.
-
fantasticn
- Beiträge: 102
- Registriert: 15.03.2016, 14:34
Beitrag
von fantasticn » 17.12.2017, 17:26
@Murmelbaerchen69
Also /usr/local/addons/cuxd oder /usr/local/addons/cuxd/extra sollte eigentlich egal sein. CURL liegt eigentlich in dem Unterverzeichnis extra, aber in der Ebene darüber befindet sich - normalerweise - in Verknüpfung gleichen Namens.
Das Leerzeichen vor dem -k, welches Du noch in Deinem Aufruf hast, ist wohl bei der neuen Version von Alex nicht mehr erforderlich. Hier muss man ohnehin den Eintrag bei OPTS nicht mehr selbst editieren, sondern kann mit Hilfe des #-Zeichens selektieren/de-selektieren, welchen Aufruf man haben will.
@falke69
geh mal nach /usr/local/addons/cuxd/extra und gib ein ./curl -h