[Neues Modul] Miele@Home

Begonnen von choenig, 14 Juni 2020, 11:08:17

Vorheriges Thema - Nächstes Thema

fhemfrederik

Hier mit Verbose 5

2020.06.21 23:29:27 5: MieleConnection (MieleAtHome::MAH_refreshAccessToken:453) called
2020.06.21 23:29:27 5: Cmd: >deletereading MieleConnection lastError<
2020.06.21 23:29:27 5: MieleConnection (MieleAtHome::MAH_doThirdpartyLoginRequest:489) called
2020.06.21 23:29:27 5: HttpUtils url=https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F
2020.06.21 23:29:27 4: IP: api.mcs3.miele.com -> 137.117.150.39
2020.06.21 23:29:28 5: HttpUtils request header:
GET /thirdparty/login/?response_type=code&state=login&client_id=xxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate

2020.06.21 23:29:28 4: https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F: HTTP response code 200
2020.06.21 23:29:28 5: HttpUtils https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxx=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F: Got data, length: 6426
2020.06.21 23:29:28 5: HttpUtils response header:
HTTP/1.1 200 OK
Server: openresty/1.15.8.2
Date: Sun, 21 Jun 2020 21:29:28 GMT
Content-Type: text/html
Content-Length: 2228
Connection: close
Strict-Transport-Security: max-age=15724800; includeSubDomains
Vary: Accept-Encoding
Content-Encoding: gzip
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: PUT, GET, POST, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
2020.06.21 23:29:28 5: MieleConnection (MieleAtHome::MAH_onThirdpartyLoginReply:522) reply: err:, code:200, SKIPPING DATA
2020.06.21 23:29:28 5: MieleConnection (MieleAtHome::MAH_doOauthLoginRequest:539) called
2020.06.21 23:29:28 5: HttpUtils url=https://api.mcs3.miele.com/oauth/auth
2020.06.21 23:29:28 4: IP: api.mcs3.miele.com -> 137.117.150.39
2020.06.21 23:29:28 5: HttpUtils request header:
POST /oauth/auth HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Length: 221
Content-Type: application/x-www-form-urlencoded

2020.06.21 23:29:28 4: https://api.mcs3.miele.com/oauth/auth: HTTP response code 400
2020.06.21 23:29:28 5: HttpUtils https://api.mcs3.miele.com/oauth/auth: Got data, length: 45
2020.06.21 23:29:28 5: HttpUtils response header:
HTTP/1.1 400 Bad Request
Server: openresty/1.15.8.2
Date: Sun, 21 Jun 2020 21:29:28 GMT
Content-Type: application/json
Content-Length: 45
Connection: close
Strict-Transport-Security: max-age=15724800; includeSubDomains
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: PUT, GET, POST, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
2020.06.21 23:29:28 5: MieleConnection (MieleAtHome::MAH_onOauthLoginReply:587) reply: err:, code:400: data:{"code":400,"message":"HTTP 400 Bad Request"}
2020.06.21 23:29:28 2: MieleConnection (MieleAtHome::MAH_onOauthLoginReply:597) headers: HTTP/1.1 400 Bad Request
Server: openresty/1.15.8.2
Date: Sun, 21 Jun 2020 21:29:28 GMT
Content-Type: application/json
Content-Length: 45
Connection: close
Strict-Transport-Security: max-age=15724800; includeSubDomains
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: PUT, GET, POST, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
2020.06.21 23:29:28 2: MieleConnection (MieleAtHome::MAH_onOauthLoginReply:598) Error: Bearer code not found

Viele Grüße
Frederik

P.S. Bin dann mal weg für heute. Danke!

choenig

Erstmal danke für das Log, guck ich mir morgen im Detail an.

Aber zum Thema Sonderzeichen. Möglicheweise ist das doch ein Problem, weil ich die un-encodiert in die URL schreibe. Benutzt Du Sonderzeichen, die möglicherweise die URL kaputt machen? Sowas wie '?' oder '&' z.B.? Werde die mal percent-encode in der nächsten Version, vielleicht hilft das schon.

LG und gute Nacht
Christian

fhemfrederik

Diese sind es nicht, aber ja. Eines davon macht unescaped die URL kaputt!  ;)

choenig

Ok, dann fixe ich das ASAP :)

LG
Christian

fhemfrederik

Super. Danke! Jetzt aber wirklich gute Nacht  :)

choenig

So, ich habe gerade im ersten Post die 0.8.0 hochgeladen. In der urlEncode ich jetzt alle Daten, die ich für das oauth2 versende. Hoffentlich hilft das :).

Jetzt hoffe ich, dass Dein Sonderzeichen kein " " ist, das kann man vermutlich nichtmal per 'set' setzen ;).

Die $action-Warnung hab' ich auch noch gefixt.

LG
Christian

fhemfrederik

#21
Als ich das Passwort neu gesetzt hatte, habe ich HTTP ERROR 400 bekommen!? Aber es klappt! Dishwasher ist da!
Danke. Wenn Du auf dem Weg zur 1.0 noch einen Tester brauchst einfach melden.

Viele Grüße
Frederik

choenig

Prima,

ich freu mich, wenn Du es beobachtest, und irgendwann nochmal Feedback gibst. Bei Probleme natürlich sofort :)

LG
Christian

JoWiemann

Hallo Christian,

gibt man set <gateway> autocreate in der Fhem Commandline an, ohne das es schon in der Befehlsliste im Fhem Web auswählbar ist, so schmiert Fhem mit folgender Fehlermeldung ab:

myMiele (MieleAtHome::MAH_onThirdpartyTokenReply:660) Error: code != 200: 401
Can't use string ("Please authenticate first") as an ARRAY ref while "strict refs" in use at ./FHEM/48_MieleAtHome.pm line 1087.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

choenig

ui  :-\

guck ich mir an. Danke :)

LG
Christian

JoWiemann

Hallo Christian,

könntest Du das Interval noch über Attribut definierbar machen. 1800 Sekunden finde ich etwas lang.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

amenomade

Zitat von: JoWiemann am 23 Juni 2020, 10:43:59
Hallo Christian,

könntest Du das Interval noch über Attribut definierbar machen. 1800 Sekunden finde ich etwas lang.

Grüße Jörg
Im DEF ändern
https://forum.fhem.de/index.php/topic,112114.msg1064713.html#msg1064713
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

JoWiemann

Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

JoWiemann

#28
Hallo Christian,

wenn unsere Waschmaschine ausgeschaltet ist wird folgender Fehler im Log protokolliert (da Interval == 60, alle 60 Sekunden):


2020.06.23 13:04:38 3: Miele_000150198748 (MieleAtHome::MAH_onGetDeviceIdentAndStateReply:793) Error: read from https://api.mcs3.miele.com:443 timed out
2020.06.23 13:02:37 3: Miele_000150198748 (MieleAtHome::MAH_onGetDeviceActionsReply:920) Error: read from https://api.mcs3.miele.com:443 timed out


Grüße Jörg

PS: Die Log-Einträge sind 10 Minuten lang aufgetaucht. Dann war wieder Ruhe.
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

JoWiemann

Zitat von: choenig am 15 Juni 2020, 20:40:34
Es ist zur Zeit so, dass das eingestellte INTERVAL nur gilt, so lange die WaMa 'Off' ist, sobald sie eingeschaltet ist, wird immer 60s verwendet.

Hallo Christian,

wie bekommst Du mit, dass die WaMa on geht, wenn das Intervall per default 1800 Sekunden ist? Ggf läuft die Maschine dann ja schon eine ganze Zeit.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM