Miele 3rd party API in FHEM einbinden

Begonnen von xerion, 16 Januar 2019, 22:26:52

Vorheriges Thema - Nächstes Thema

xasher

Hallo zusammen,

ich würde mich gerne auch einklinken. Ich habe mich für die API registriert und meine Daten erhalten.
Ich habe auch Interesse meine Geäte einzubinden (Trockner, Waschmaschine, Spülmaschine und Backofen).
Ich bekomme die 200 auch bei allen Geräten zurückgeliefert.

Ich komm nur nicht dahinter, wie man an die Readings kommt. Mir fehlt da wohl völlig das Verständnis  :(

Kann mir vielleicht jemand Starthilfe geben?

Grüße,
Alex

xasher

Hallo nochmals,

ich habe es inzwischen hinbekommen. Für mich war die einfachste Lösung, das verbose=5 zu setzen und die Werte im Log herauszulsesen. Über das Swagger-Ui funktioniert es aber auch:

2019.04.02 13:29:23 5: miele_geschirrspueler: JSON Flatter sets ident_type_key_localized to Ger▒tetyp
2019.04.02 13:29:23 5: miele_geschirrspueler: JSON Flatter sets ident_type_value_localized to Geschirrsp▒ler
2019.04.02 13:29:23 5: miele_geschirrspueler: JSON Flatter sets ident_type_value_raw to 7


Hat jemand noch eine Lösung für das Umlautproblem?

Grüße,
Alex

amenomade

Da kannst Du evtl. mit (get|set|reading)[0-9]*Decode arbeiten.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

det.

Danke an alle hier,
Mit Hilfe dieses Treats habe ich seit Gestern meinen Geschirrspüler erfolgreich eingebunden. Hatte den vor ca. 2 Jahren vorsorglich mit Smart Connect gekauft. Jetzt sehe ich ob der Aus oder in Betrieb ist, und wie lange schon und wie lange noch das dauert.
Irgendwie erinnert mich das an die Frage ,,warum sich der Hund die ... leckt". Will sagen, einen praktischen Nutzen kann ich derzeit nicht erkennen, außer der Befriedigung das es geht.
Habt Ihr dazu Ideen?
Weitere Miele Geräte scheitern zum Glück an der Langlebigkeit des vorhandenen nicht smarten Waschautomaten und Ablufttrockners.
LG
det.

volschin

Ist doch oben beschrieben, z.B. die Steuerung in Verbindung mit einer Solaranlage, bzw. eine akustische oder visuelle Benachrichtigung, wenn die Maschine durch ist. OK, das zweite ist beim Geschirrspüler weniger interessant, bei de Waschmaschine aber schon.
Intel NUC+Ubuntu 22.04+Docker+FHEM6
HomeMatic: HM-MOD-RPI-PCB+HM-USB-CFG2+hmland+diverse, HUE: Hue-Bridge, RaspBee+deCONZ+diverse
Amzn Dash-Buttons, Siro Rollos
4xRPi, 4xCO20, OWL+USB, HarmonyHub, FRITZ!Box 7590, Echo Dots+Show8, Logi Circle 2, HomeBridge
TIG Stack (Telegraf, InfluxDB, Grafana)

det.

Da mir doch inzwischen ein halbwegs sinnvoller Nutzen eingefallen ist, habe ich mal bei Miele angefragt, ob die Datenabfrage zum Klarspülerfüllstand und zum Salzvorrat für den GS6860 noch in die API eingebaut wird. In der iOS App sind diese Daten vorhanden, werden also vom Gerät bereitgestellt.
LG
det.

Cobra

#66
Hallo zusammen,


ich klink mich hier auch mal ein da ich nicht weiterkomme.
Zuerst bekomm ich die Meldung 200 zurück und kurz danach auch die Meldung 401 Unauthorized

Hier mal das List meines Gerätes

Internals:
   BUSY       0
   CFGFN     
   CHANGED   
   DEF        https://api.mcs3.miele.com/v1/devices/00011xxxxx/?language=de 120
   FUUID      5ccb3ca4-f33f-366a-8f0f-98bafc562c2cee60
   Interval   120
   JSONEnabled 1
   LASTSEND   1556824105.88251
   LastAuthTry 2019-05-02 21:08:17
   MainURL    https://api.mcs3.miele.com/v1/devices/00011xxxx/?language=de
   ModuleVersion 3.5.9 - 13.2.2019
   NAME       myMieleWaschmaschine
   NOTIFYDEV  global
   NR         13020
   NTFY_ORDER 50-myMieleWaschmaschine
   STATE      ???
   TRIGGERTIME 1556824193.11517
   TRIGGERTIME_FMT 2019-05-02 21:09:53
   TYPE       HTTPMOD
   addr       https://api.mcs3.miele.com:443
   auth       0
   buf       
   code       401
   compress   1
   conn       
   data       
   displayurl https://api.mcs3.miele.com/v1/devices/00011xxxxx/?language=de
   header     Authorization: Bearer DE_c166b5de92e263655c22b571fee98769
Content-Type: application/json
   host       api.mcs3.miele.com
   httpheader HTTP/1.1 401 Unauthorized
Date: Thu, 02 May 2019 19:08:26 GMT
Content-Type: text/html
Content-Length: 188
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Strict-Transport-Security: max-age=15724800; includeSubDomains
   httpversion 1.0
   hu_blocking 0
   hu_filecount 1
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /v1/devices/00011xxxx/?language=de
   protocol   https
   redirects  0
   sid        DE_c166b5de92e263655c22b571fee98769
   timeout    2
   url        https://api.mcs3.miele.com/v1/devices/00011xxxxx/?language=de
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data       
     header     Authorization: Bearer $sid
Content-Type: application/json
     ignoreredirects 0
     retryCount 1
     type       update
     url        https://api.mcs3.miele.com/v1/devices/000119245250/?language=de
     value      0
   sslargs:
Attributes:
   enableControlSet 1
   reAuthRegex Unauthorized
   requestHeader01 Authorization: Bearer $sid
   requestHeader02 Content-Type: application/json
   sid1URL    https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=MeineClientID&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F
   sid2Data   email=meine@email.de&password=MeinPasswort&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&state=login&response_type=code&client_id=MeineClientID&vgInformationSelector=de-DE
   sid2IdRegex (?s)code=(DE_[0-9a-f]+)
   sid2IgnoreRedirects 1
   sid2URL    https://api.mcs3.miele.com/oauth/auth
   sid3Data   grant_type=authorization_code&code=$sid&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&client_id=MeineClientID&client_secret=MeineClientSecret
   sid3IdJSON access_token
   sid3URL    https://api.mcs3.miele.com/thirdparty/token/
   userattr   requestHeader01 requestHeader02 sid1URL sid2Data sid2IdRegex sid2IgnoreRedirects:0,1 sid2URL sid3Data sid3IdJSON sid3URL
   verbose    3





Und hier das Log auf Verbose 5 beim Reread:

2019.05.02 20:57:21 5: myMieleWaschmaschine: set called with reread
2019.05.02 20:57:21 4: myMieleWaschmaschine: GetUpdate called (reread)
2019.05.02 20:57:21 4: myMieleWaschmaschine: AddToQueue adds update, initial queue len: 0
2019.05.02 20:57:21 5: myMieleWaschmaschine: AddToQueue adds type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, no data, header Authorization: Bearer $sid
Content-Type: application/json, retry 0
2019.05.02 20:57:21 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 1
2019.05.02 20:57:21 4: myMieleWaschmaschine: HandleSendQueue sends request type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, No Data,
header: Authorization: Bearer DE_492051e092691803a2e5f643f5f45ee4
Content-Type: application/json
timeout 2
2019.05.02 20:57:21 5: HttpUtils url=https://api.mcs3.miele.com/v1/devices/000119245250/?language=de
2019.05.02 20:57:21 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 20:57:21 5: HttpUtils request header:
GET /v1/devices/000119245250/?language=de HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Authorization: Bearer DE_492051e092691803a2e5f643f5f45ee4
Content-Type: application/json
Content-Length: 0

2019.05.02 20:57:21 4: https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: HTTP response code 401
2019.05.02 20:57:21 5: HttpUtils https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: Got data, length: 29
2019.05.02 20:57:21 5: HttpUtils response header:
HTTP/1.1 401 Unauthorized
Date: Thu, 02 May 2019 18:57:21 GMT
Content-Type: application/vnd.miele.v1+json;charset=UTF-8
Content-Length: 29
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 20:57:21 4: myMieleWaschmaschine: Read callback: request type was update retry 0,
Body: { "message": "Unauthorized" }
2019.05.02 20:57:21 5: myMieleWaschmaschine: JSON Flatter called : prefix , ref is HASH(0x6990940)
2019.05.02 20:57:21 5: myMieleWaschmaschine: JSON Flatter sets message to Unauthorized
2019.05.02 20:57:21 4: myMieleWaschmaschine: extracted JSON values to internal
2019.05.02 20:57:21 5: myMieleWaschmaschine: ExtractSid called, context reading, num
2019.05.02 20:57:21 5: myMieleWaschmaschine: CheckAuth is checking buffer with ReAuthRegex Unauthorized
2019.05.02 20:57:21 4: myMieleWaschmaschine: CheckAuth decided new authentication required
2019.05.02 20:57:21 4: myMieleWaschmaschine: Auth called with Steps: 1 2 3
2019.05.02 20:57:21 4: myMieleWaschmaschine: AddToQueue adds auth3, initial queue len: 0, prio
2019.05.02 20:57:21 5: myMieleWaschmaschine: AddToQueue prepends type auth3 to URL https://api.mcs3.miele.com/thirdparty/token/, data grant_type=authorization_code&code=$sid&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&client_id=xxxx&client_secret=xxxx, no headers, retry 0
2019.05.02 20:57:21 4: myMieleWaschmaschine: AddToQueue adds auth2, initial queue len: 1, prio
2019.05.02 20:57:21 5: myMieleWaschmaschine: AddToQueue prepends type auth2 to URL https://api.mcs3.miele.com/oauth/auth, data email=xxxxx&password=3MGwD6v4&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&state=login&response_type=code&client_id=xxxxx&vgInformationSelector=de-DE, no headers, ignore redirects, retry 0
2019.05.02 20:57:21 4: myMieleWaschmaschine: AddToQueue adds auth1, initial queue len: 2, prio
2019.05.02 20:57:21 5: myMieleWaschmaschine: AddToQueue prepends type auth1 to URL https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F, no data, no headers, retry 0
2019.05.02 20:57:21 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 20:57:21 4: myMieleWaschmaschine: HandleSendQueue sends request type auth1 to URL https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F, No Data, No Header
timeout 2
2019.05.02 20:57:21 5: HttpUtils url=https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F
2019.05.02 20:57:21 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 20:57:21 4: myMieleWaschmaschine: AddToQueue adds update, initial queue len: 2
2019.05.02 20:57:21 5: myMieleWaschmaschine: AddToQueue adds type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, no data, header Authorization: Bearer $sid
Content-Type: application/json, retry 1
2019.05.02 20:57:21 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 20:57:21 5: myMieleWaschmaschine: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2019.05.02 20:57:21 4: myMieleWaschmaschine: CheckAuth requeued request update after auth, retryCount 0 ...
2019.05.02 20:57:21 5: HttpUtils request header:
GET /thirdparty/login/?response_type=code&state=login&client_id=xxxxx&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
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.05.02 20:57:23 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 20:57:23 5: myMieleWaschmaschine: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2019.05.02 20:57:23 4: https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F: HTTP response code 200
2019.05.02 20:57:23 5: HttpUtils https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F: Got data, length: 7610
2019.05.02 20:57:23 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Thu, 02 May 2019 18:57:23 GMT
Content-Type: text/html
Content-Length: 2174
Connection: close
Vary: Accept-Encoding
Content-Encoding: gzip
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 20:57:23 4: myMieleWaschmaschine: Read callback: request type was auth1 retry 0,
Body: <html lang="de">
<head>
    <!--Import Google Icon Font-->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <!--Import materialize.css-->
    <link type="text/css" rel="stylesheet" href="/assets/css/materialize.min.css" media="screen,projection"/>
    <!--Import own css-->
    <link type="text/css" rel="stylesheet" href="/assets/css/mieleStyle.css" media="screen,projection"/>
    <!-- Suppress favicon request-->
    <link rel="shortcut icon" type="image/x-icon"
          href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAAUAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/EwCL/xMAjP8TAIv/EgCL/xIAi/8TAIv/EgCL/xMAi/8SAIv/EwCL/xIAi/8TAIv/FACM/xQAjP8UAIz/FwON/yYUlf8bCY//KBaW/ysZmP8tG5j/JhSV/y4dmf8mFJX/KxmX/ygVlv8tG5j/JxSV/xQAjP8UAIz/EwCM/x4Lkf+BdsH/nJPO/7Ot2v+aks7/s63a/6Wd0/+9t9//lo3M/7Wv2/+noNT/vbff/5mQzf8mFJX/EwCL/xMAjP8cCJD/qaLV/8C64P+9uN//mpLO/4+GyP9pXLX/hnvE/3Fluv+1rtv/iH/F/4B2wf9zaLv/HQqR/xMAjP8UAIz/FwOO/zMhm/8mFZX/JxaV/y0bmP8fDZL/FwWO/xIAi/8VBI3/MiCa/yIRk/8SAIv/EgCL/xMAjP8UAIz/FACM/xQAjP8SAIv/EwCL/xMAi/8SAIv/EwCM/xQAjP8UAIz/FACM/xIAi/8TAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==">
    <!--Let browser know website is optimized for mobile-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta charset="utf-8">
</head>
<body id="mieleLoginSite">
<div class="mediumBox">
    <div class="center-btn">
        <img class="responsive-img"
             src="/assets/images/miele_logo.svg" width="150">
    </div>
    <h1 class="center-btn mediumFont">Login</h1>
    <form method="post" action="/oauth/auth">
        <div class="input-field">
            <i class="material-icons prefix">account_circle</i>
            <input required id="e-mail" type="email" name="email">
            <label for="e-mail">Email Adress</label>
        </div>
        <div class="input-field">
            <i class="material-icons prefix">https</i>
            <input required id="password" type="password" name="password">
            <label for="password">Password</label>
        </div>
        <input type="hidden" name="redirect_uri" value="https://api.mcs3.miele.com/thirdparty/login/">
            <input type="hidden" name="state" value="login">
        <input type="hidden" name="response_type" value="code">
        <input type="hidden" name="client_id" value="xxxxx">

        <div class="input-field">
            <i class="material-icons prefix">language</i>
            <select required name="vgInformationSelector" size="5">
                <option value="" disabled>Please select your country</option>
                    <option value="et-EE">Miele Eesti</option>
                    <option value="de-DE">Miele Deutschland</option>
                    <option value="no-NO">Miele Norge</option>
                    <option value="sr-RS">Miele Србија</option>
                    <option value="nl-BE">Miele België</option>
                    <option value="fi-FI">Miele Suomi</option>
                    <option value="zh-HK">Miele Hong Kong</option>
                    <option value="ru-RU">Miele Россия</option>
                    <option value="en-AE">Miele United Arab Emirates</option>
                    <option value="pt-PT">Miele Portugual</option>
                    <option value="bg-BG">Miele България</option>
                    <option value="de-CH">Miele Schweiz</option>
                    <option value="en-IN">Miele India</option>
                    <option value="de-SX">Miele Semi Pro</option>
                    <option value="ja-JP">Miele Nihon</option>
                    <option value="da-DK">Miele Danmark</option>
                    <option value="ko-KR">Miele Hanguk</option>
                    <option value="en-ZA">Miele South Africa</option>
                    <option value="lt-LT">Miele Lietuva</option>
                    <option value="es-CL">Miele Chile</option>
                    <option value="de-LU">Miele Luxemburg</option>
                    <option value="hr-HR">Miele Croatia</option>
                    <option value="lv-LV">Miele Latvija</option>
                    <option value="zh-CN">Miele Zhōngguó</option>
                    <option value="el-GR">Miele Ελλάδα</option>
                    <option value="it-IT">Miele Italia</option>
                    <option value="es-MX">Miele México</option>
                    <option value="fr-FR">Miele France</option>
                    <option value="en-MY">Miele Malaysia</option>
                    <option value="en-NZ">Miele New Zealand</option>
                    <option value="ru-UA">Miele Україна</option>
                    <option value="hu-HU">Miele Magyarország</option>
                    <option value="es-ES">Miele España</option>
                    <option value="ru-KZ">Miele Казахстан</option>
                    <option value="sv-SE">Miele Sverige</option>
                    <option value="de-AT">Miele Österreich</option>
                    <option value="en-AU">Miele Australia</option>
                    <option value="en-SG">Miele Singapore</option>
                    <option value="en-TH">Miele Thailand</option>
                    <option value="el-CY">Miele Kypros</option>
                    <option value="sl-SI">Miele Slovenia</option>
                    <option value="ru-BY">Miele Беларуси</option>
                    <option value="cs-CZ">Miele Czechia</option>
                    <option value="sk-SK">Miele Slovensko</option>
                    <option value="en-GB">Miele UK</option>
                    <option value="en-IE">Miele Ireland</option>
                    <option value="pl-PL">Miele Polska</option>
                    <option value="ro-RO">Miele România</option>
                    <option value="en-CA">Miele Canada</option>
                    <option value="nl-NL">Miele Nederland</option>
                    <option value="tr-TR">Miele Türkiye</option>
                    <option value="en-US">Miele USA</option>
            </select>
            <label>Country</label>
        </div>

        <br>
        <div class="center-btn">
            <input class="waves-effect waves-light btn redButton" type="submit" value="SUBMIT">
        </div>
    </form>
</div>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/assets/js/materialize.min.js"></script>
<script>
    $(document).ready(function () {
        $('select').material_select();
    });
</script>
</body>
</html>

2019.05.02 20:57:23 3: myMieleWaschmaschine: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<html lang="de">\n<h...") at (eval 29086763) line 1.

2019.05.02 20:57:23 5: myMieleWaschmaschine: ExtractSid called, context sid, num 1
2019.05.02 20:57:24 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 20:57:24 4: myMieleWaschmaschine: HandleSendQueue sends request type auth2 to URL https://api.mcs3.miele.com/oauth/auth,
data: email=xxxxx&password=3MGwD6v4&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&state=login&response_type=code&client_id=xxxxx&vgInformationSelector=de-DE, No Header
timeout 2
2019.05.02 20:57:24 5: HttpUtils url=https://api.mcs3.miele.com/oauth/auth
2019.05.02 20:57:24 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 20:57:25 5: HttpUtils request header:
POST /oauth/auth HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Length: 219
Content-Type: application/x-www-form-urlencoded

2019.05.02 20:57:26 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 2
2019.05.02 20:57:26 5: myMieleWaschmaschine: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2019.05.02 20:57:27 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 2
2019.05.02 20:57:27 5: myMieleWaschmaschine: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2019.05.02 20:57:28 3: myMieleWaschmaschine: Read callback: Error: read from https://api.mcs3.miele.com:443 timed out
2019.05.02 20:57:28 4: myMieleWaschmaschine: Read callback: request type was auth2 retry 0, body empty
2019.05.02 20:57:28 5: myMieleWaschmaschine: ExtractSid called, context sid, num 2
2019.05.02 20:57:28 5: myMieleWaschmaschine: ExtractSid could not match buffer to IdRegex (?s)code=(DE_[0-9a-f]+)
2019.05.02 20:57:30 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 2
2019.05.02 20:57:30 4: myMieleWaschmaschine: HandleSendQueue sends request type auth3 to URL https://api.mcs3.miele.com/thirdparty/token/,
data: grant_type=authorization_code&code=DE_492051e092691803a2e5f643f5f45ee4&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&client_id=xxxxx&client_secret=xxxxx, No Header
timeout 2
2019.05.02 20:57:30 5: HttpUtils url=https://api.mcs3.miele.com/thirdparty/token/
2019.05.02 20:57:30 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 20:57:30 5: HttpUtils request header:
POST /thirdparty/token/ HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Length: 234
Content-Type: application/x-www-form-urlencoded

2019.05.02 20:57:32 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 1
2019.05.02 20:57:32 5: myMieleWaschmaschine: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2019.05.02 20:57:32 4: https://api.mcs3.miele.com/thirdparty/token/: HTTP response code 401
2019.05.02 20:57:32 5: HttpUtils https://api.mcs3.miele.com/thirdparty/token/: Got data, length: 29
2019.05.02 20:57:32 5: HttpUtils response header:
HTTP/1.1 401 Unauthorized
Date: Thu, 02 May 2019 18:57:32 GMT
Content-Type: application/json
Content-Length: 29
Connection: close
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 20:57:32 4: myMieleWaschmaschine: Read callback: request type was auth3 retry 0,
Body: {"message":"code is invalid"}
2019.05.02 20:57:32 5: myMieleWaschmaschine: JSON Flatter called : prefix , ref is HASH(0x6a4d6f0)
2019.05.02 20:57:32 5: myMieleWaschmaschine: JSON Flatter sets message to code is invalid
2019.05.02 20:57:32 4: myMieleWaschmaschine: extracted JSON values to internal
2019.05.02 20:57:32 5: myMieleWaschmaschine: ExtractSid called, context sid, num 3
2019.05.02 20:57:32 5: myMieleWaschmaschine: Checking SID with JSON access_token
2019.05.02 20:57:33 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 1
2019.05.02 20:57:33 4: myMieleWaschmaschine: HandleSendQueue sends request type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, No Data,
header: Authorization: Bearer DE_492051e092691803a2e5f643f5f45ee4
Content-Type: application/json
timeout 2
2019.05.02 20:57:33 5: HttpUtils url=https://api.mcs3.miele.com/v1/devices/000119245250/?language=de
2019.05.02 20:57:33 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 20:57:33 5: HttpUtils request header:
GET /v1/devices/000119245250/?language=de HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Authorization: Bearer DE_492051e092691803a2e5f643f5f45ee4
Content-Type: application/json
Content-Length: 0

2019.05.02 20:57:33 4: https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: HTTP response code 401
2019.05.02 20:57:33 5: HttpUtils https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: Got data, length: 29
2019.05.02 20:57:33 5: HttpUtils response header:
HTTP/1.1 401 Unauthorized
Date: Thu, 02 May 2019 18:57:33 GMT
Content-Type: application/vnd.miele.v1+json;charset=UTF-8
Content-Length: 29
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 20:57:33 4: myMieleWaschmaschine: Read callback: request type was update retry 1,
Body: { "message": "Unauthorized" }
2019.05.02 20:57:33 5: myMieleWaschmaschine: JSON Flatter called : prefix , ref is HASH(0x6c79cf8)
2019.05.02 20:57:33 5: myMieleWaschmaschine: JSON Flatter sets message to Unauthorized
2019.05.02 20:57:33 4: myMieleWaschmaschine: extracted JSON values to internal
2019.05.02 20:57:33 5: myMieleWaschmaschine: ExtractSid called, context reading, num
2019.05.02 20:57:33 5: myMieleWaschmaschine: CheckAuth is checking buffer with ReAuthRegex Unauthorized
2019.05.02 20:57:33 4: myMieleWaschmaschine: CheckAuth decided new authentication required
2019.05.02 20:57:33 4: myMieleWaschmaschine: Authentication still required but no retries left - did last authentication fail?
2019.05.02 20:57:33 5: myMieleWaschmaschine: Read starts parsing response to update with defined readings:
2019.05.02 20:57:33 3: myMieleWaschmaschine: Read response to update didn't match any Reading
2019.05.02 20:57:33 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 0



Wo könnte noch der Fehler liegen?

Gruß Cobra
RaspberryPI 3 mit Raspbian Jessie, HMLAN/HM-LAN-Gateway
Diverse HM-Komponenten, Netatmo, Hue, Sonos, Nuki, Alexa

det.

Hallo Cobra,

Kann Dir nicht wirklich helfen, bei mir ging es, nachdem ich mehrfach die Schritte lt. Beitrag hier im Forum kontrolliert hatte und auch noch den letzten kleinen Fehler gefunden und beseitigt hatte - bis zum letzten funktionierenden Reading am 2019-04-29 09:59:39
Danach 401 - mglw gab es da Änderungen an der API? Kann das noch jemand bestätigen?
LG
det.

Cobra

Hallo Det.

Danke für die Info.

Wenn du seither auch Probleme hast dann leg ich das ganze noch ein paar Tage auf Eis und warte mal ob sich auch andere mit dem gleichen Problem hier melden. Dann wissen wir zumindest ob es sich lohnt den Fehler in der eigenen Installation zu suchen oder ob es an der API liegt.
Hab nämlich erst am 29.4. abends damit angefangen das Gerät anzulegen.

Gruß Cobra
RaspberryPI 3 mit Raspbian Jessie, HMLAN/HM-LAN-Gateway
Diverse HM-Komponenten, Netatmo, Hue, Sonos, Nuki, Alexa

amenomade

#69
Macht mal bitte den Test hier: https://forum.fhem.de/index.php/topic,95989.msg922006.html#msg922006
und sagt Bescheid

Wobei:
Zitat2019.05.02 20:57:28 3: myMieleWaschmaschine: Read callback: Error: read from https://api.mcs3.miele.com:443 timed out
2019.05.02 20:57:28 4: myMieleWaschmaschine: Read callback: request type was auth2 retry 0, body empty
deutet auf irgendwelche Unverfügbarkeit von der Cloud API.
Jetzt aber funktioniert der Test hieroben, zumindest bei mir
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Cobra

Hey Amenomade,

bei mir kommt auch eine entsprechende URL zurück:

https://api.mcs3.miele.com/thirdparty/login/?code=DE_bd0d0b944cc09f6043be2e3ddfe5f275&state=login

So wie du ja weiter oben geschrieben hast ist es egal ob da steht Verknüpfung fehlgeschlagen solange so ein Code zurückkommt, oder?
RaspberryPI 3 mit Raspbian Jessie, HMLAN/HM-LAN-Gateway
Diverse HM-Komponenten, Netatmo, Hue, Sonos, Nuki, Alexa

amenomade

Und ein reread in Fhem bringt immer noch "timed out" ?
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Cobra

#72
Ne, weiterhin 401 Unauthorized

Gerade nochmals versucht, hier das LOG:

2019.05.02 23:49:29 5: myMieleWaschmaschine: set called with reread
2019.05.02 23:49:29 4: myMieleWaschmaschine: GetUpdate called (reread)
2019.05.02 23:49:29 4: myMieleWaschmaschine: AddToQueue adds update, initial queue len: 0
2019.05.02 23:49:29 5: myMieleWaschmaschine: AddToQueue adds type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, no data, header Authorization: Bearer $sid
Content-Type: application/json, retry 0
2019.05.02 23:49:29 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 1
2019.05.02 23:49:29 4: myMieleWaschmaschine: HandleSendQueue sends request type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, No Data,
header: Authorization: Bearer DE_b605ade72b97bcd30f61fe1c7b132b4f
Content-Type: application/json
timeout 2
2019.05.02 23:49:29 5: HttpUtils url=https://api.mcs3.miele.com/v1/devices/000119245250/?language=de
2019.05.02 23:49:29 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 23:49:29 5: HttpUtils request header:
GET /v1/devices/000119245250/?language=de HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Authorization: Bearer DE_b605ade72b97bcd30f61fe1c7b132b4f
Content-Type: application/json
Content-Length: 0

2019.05.02 23:49:29 4: https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: HTTP response code 401
2019.05.02 23:49:29 5: HttpUtils https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: Got data, length: 29
2019.05.02 23:49:29 5: HttpUtils response header:
HTTP/1.1 401 Unauthorized
Date: Thu, 02 May 2019 21:49:29 GMT
Content-Type: application/vnd.miele.v1+json;charset=UTF-8
Content-Length: 29
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 23:49:29 4: myMieleWaschmaschine: Read callback: request type was update retry 0,
Body: { "message": "Unauthorized" }
2019.05.02 23:49:29 5: myMieleWaschmaschine: JSON Flatter called : prefix , ref is HASH(0x6b1e128)
2019.05.02 23:49:29 5: myMieleWaschmaschine: JSON Flatter sets message to Unauthorized
2019.05.02 23:49:29 4: myMieleWaschmaschine: extracted JSON values to internal
2019.05.02 23:49:29 5: myMieleWaschmaschine: ExtractSid called, context reading, num
2019.05.02 23:49:29 5: myMieleWaschmaschine: CheckAuth is checking buffer with ReAuthRegex Unauthorized
2019.05.02 23:49:29 4: myMieleWaschmaschine: CheckAuth decided new authentication required
2019.05.02 23:49:29 4: myMieleWaschmaschine: Auth called with Steps: 1 2 3
2019.05.02 23:49:29 4: myMieleWaschmaschine: AddToQueue adds auth3, initial queue len: 0, prio
2019.05.02 23:49:29 5: myMieleWaschmaschine: AddToQueue prepends type auth3 to URL https://api.mcs3.miele.com/thirdparty/token/, data grant_type=authorization_code&code=$sid&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&client_id=xxxx&client_secret=xxxxx, no headers, retry 0
2019.05.02 23:49:29 4: myMieleWaschmaschine: AddToQueue adds auth2, initial queue len: 1, prio
2019.05.02 23:49:29 5: myMieleWaschmaschine: AddToQueue prepends type auth2 to URL https://api.mcs3.miele.com/oauth/auth, data email=xxxx&password=xxxx&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&state=login&response_type=code&client_id=xxxxx&vgInformationSelector=de-DE, no headers, ignore redirects, retry 0
2019.05.02 23:49:29 4: myMieleWaschmaschine: AddToQueue adds auth1, initial queue len: 2, prio
2019.05.02 23:49:29 5: myMieleWaschmaschine: AddToQueue prepends type auth1 to URL https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F, no data, no headers, retry 0
2019.05.02 23:49:29 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 23:49:29 4: myMieleWaschmaschine: HandleSendQueue sends request type auth1 to URL https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F, No Data, No Header
timeout 2
2019.05.02 23:49:29 5: HttpUtils url=https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F
2019.05.02 23:49:29 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 23:49:29 4: myMieleWaschmaschine: AddToQueue adds update, initial queue len: 2
2019.05.02 23:49:29 5: myMieleWaschmaschine: AddToQueue adds type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, no data, header Authorization: Bearer $sid
Content-Type: application/json, retry 1
2019.05.02 23:49:29 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 23:49:29 5: myMieleWaschmaschine: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2019.05.02 23:49:29 4: myMieleWaschmaschine: CheckAuth requeued request update after auth, retryCount 0 ...
2019.05.02 23:49:29 5: HttpUtils request header:
GET /thirdparty/login/?response_type=code&state=login&client_id=xxxxx&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
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.05.02 23:49:29 4: https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F: HTTP response code 200
2019.05.02 23:49:29 5: HttpUtils https://api.mcs3.miele.com/thirdparty/login/?response_type=code&state=login&client_id=xxxxx&scope=&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F: Got data, length: 7610
2019.05.02 23:49:29 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Thu, 02 May 2019 21:49:29 GMT
Content-Type: text/html
Content-Length: 2174
Connection: close
Vary: Accept-Encoding
Content-Encoding: gzip
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 23:49:29 4: myMieleWaschmaschine: Read callback: request type was auth1 retry 0,
Body: <html lang="de">
<head>
    <!--Import Google Icon Font-->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <!--Import materialize.css-->
    <link type="text/css" rel="stylesheet" href="/assets/css/materialize.min.css" media="screen,projection"/>
    <!--Import own css-->
    <link type="text/css" rel="stylesheet" href="/assets/css/mieleStyle.css" media="screen,projection"/>
    <!-- Suppress favicon request-->
    <link rel="shortcut icon" type="image/x-icon"
          href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAAUAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/EwCL/xMAjP8TAIv/EgCL/xIAi/8TAIv/EgCL/xMAi/8SAIv/EwCL/xIAi/8TAIv/FACM/xQAjP8UAIz/FwON/yYUlf8bCY//KBaW/ysZmP8tG5j/JhSV/y4dmf8mFJX/KxmX/ygVlv8tG5j/JxSV/xQAjP8UAIz/EwCM/x4Lkf+BdsH/nJPO/7Ot2v+aks7/s63a/6Wd0/+9t9//lo3M/7Wv2/+noNT/vbff/5mQzf8mFJX/EwCL/xMAjP8cCJD/qaLV/8C64P+9uN//mpLO/4+GyP9pXLX/hnvE/3Fluv+1rtv/iH/F/4B2wf9zaLv/HQqR/xMAjP8UAIz/FwOO/zMhm/8mFZX/JxaV/y0bmP8fDZL/FwWO/xIAi/8VBI3/MiCa/yIRk/8SAIv/EgCL/xMAjP8UAIz/FACM/xQAjP8SAIv/EwCL/xMAi/8SAIv/EwCM/xQAjP8UAIz/FACM/xIAi/8TAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/FACM/xQAjP8UAIz/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==">
    <!--Let browser know website is optimized for mobile-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta charset="utf-8">
</head>
<body id="mieleLoginSite">
<div class="mediumBox">
    <div class="center-btn">
        <img class="responsive-img"
             src="/assets/images/miele_logo.svg" width="150">
    </div>
    <h1 class="center-btn mediumFont">Login</h1>
    <form method="post" action="/oauth/auth">
        <div class="input-field">
            <i class="material-icons prefix">account_circle</i>
            <input required id="e-mail" type="email" name="email">
            <label for="e-mail">Email Adress</label>
        </div>
        <div class="input-field">
            <i class="material-icons prefix">https</i>
            <input required id="password" type="password" name="password">
            <label for="password">Password</label>
        </div>
        <input type="hidden" name="redirect_uri" value="https://api.mcs3.miele.com/thirdparty/login/">
            <input type="hidden" name="state" value="login">
        <input type="hidden" name="response_type" value="code">
        <input type="hidden" name="client_id" value="xxxx">

        <div class="input-field">
            <i class="material-icons prefix">language</i>
            <select required name="vgInformationSelector" size="5">
                <option value="" disabled>Please select your country</option>
                    <option value="et-EE">Miele Eesti</option>
                    <option value="de-DE">Miele Deutschland</option>
                    <option value="no-NO">Miele Norge</option>
                    <option value="sr-RS">Miele Србија</option>
                    <option value="nl-BE">Miele België</option>
                    <option value="fi-FI">Miele Suomi</option>
                    <option value="zh-HK">Miele Hong Kong</option>
                    <option value="ru-RU">Miele Россия</option>
                    <option value="en-AE">Miele United Arab Emirates</option>
                    <option value="pt-PT">Miele Portugual</option>
                    <option value="bg-BG">Miele България</option>
                    <option value="de-CH">Miele Schweiz</option>
                    <option value="en-IN">Miele India</option>
                    <option value="de-SX">Miele Semi Pro</option>
                    <option value="ja-JP">Miele Nihon</option>
                    <option value="da-DK">Miele Danmark</option>
                    <option value="ko-KR">Miele Hanguk</option>
                    <option value="en-ZA">Miele South Africa</option>
                    <option value="lt-LT">Miele Lietuva</option>
                    <option value="es-CL">Miele Chile</option>
                    <option value="de-LU">Miele Luxemburg</option>
                    <option value="hr-HR">Miele Croatia</option>
                    <option value="lv-LV">Miele Latvija</option>
                    <option value="zh-CN">Miele Zhōngguó</option>
                    <option value="el-GR">Miele Ελλάδα</option>
                    <option value="it-IT">Miele Italia</option>
                    <option value="es-MX">Miele México</option>
                    <option value="fr-FR">Miele France</option>
                    <option value="en-MY">Miele Malaysia</option>
                    <option value="en-NZ">Miele New Zealand</option>
                    <option value="ru-UA">Miele Україна</option>
                    <option value="hu-HU">Miele Magyarország</option>
                    <option value="es-ES">Miele España</option>
                    <option value="ru-KZ">Miele Казахстан</option>
                    <option value="sv-SE">Miele Sverige</option>
                    <option value="de-AT">Miele Österreich</option>
                    <option value="en-AU">Miele Australia</option>
                    <option value="en-SG">Miele Singapore</option>
                    <option value="en-TH">Miele Thailand</option>
                    <option value="el-CY">Miele Kypros</option>
                    <option value="sl-SI">Miele Slovenia</option>
                    <option value="ru-BY">Miele Беларуси</option>
                    <option value="cs-CZ">Miele Czechia</option>
                    <option value="sk-SK">Miele Slovensko</option>
                    <option value="en-GB">Miele UK</option>
                    <option value="en-IE">Miele Ireland</option>
                    <option value="pl-PL">Miele Polska</option>
                    <option value="ro-RO">Miele România</option>
                    <option value="en-CA">Miele Canada</option>
                    <option value="nl-NL">Miele Nederland</option>
                    <option value="tr-TR">Miele Türkiye</option>
                    <option value="en-US">Miele USA</option>
            </select>
            <label>Country</label>
        </div>

        <br>
        <div class="center-btn">
            <input class="waves-effect waves-light btn redButton" type="submit" value="SUBMIT">
        </div>
    </form>
</div>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/assets/js/materialize.min.js"></script>
<script>
    $(document).ready(function () {
        $('select').material_select();
    });
</script>
</body>
</html>

2019.05.02 23:49:29 3: myMieleWaschmaschine: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<html lang="de">\n<h...") at (eval 29128979) line 1.

2019.05.02 23:49:29 5: myMieleWaschmaschine: ExtractSid called, context sid, num 1
2019.05.02 23:49:30 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 3
2019.05.02 23:49:30 4: myMieleWaschmaschine: HandleSendQueue sends request type auth2 to URL https://api.mcs3.miele.com/oauth/auth,
data: email=xxxx&password=xxxx&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&state=login&response_type=code&client_id=xxxx&vgInformationSelector=de-DE, No Header
timeout 2
2019.05.02 23:49:30 5: HttpUtils url=https://api.mcs3.miele.com/oauth/auth
2019.05.02 23:49:30 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 23:49:30 5: HttpUtils request header:
POST /oauth/auth HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Length: 220
Content-Type: application/x-www-form-urlencoded

2019.05.02 23:49:31 4: https://api.mcs3.miele.com/oauth/auth: HTTP response code 302
2019.05.02 23:49:31 5: HttpUtils https://api.mcs3.miele.com/oauth/auth: Got data, length: 0
2019.05.02 23:49:31 5: HttpUtils response header:
HTTP/1.1 302 Found
Date: Thu, 02 May 2019 21:49:31 GMT
Connection: close
Location: https://api.mcs3.miele.com/thirdparty/login/?code=DE_9bd4f9d409125ddaa6e46ed42bff17c6&state=login
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 23:49:31 4: myMieleWaschmaschine: Read callback: request type was auth2 retry 0, body empty
2019.05.02 23:49:31 5: myMieleWaschmaschine: ExtractSid called, context sid, num 2
2019.05.02 23:49:31 4: myMieleWaschmaschine: ExtractSid set sid to DE_9bd4f9d409125ddaa6e46ed42bff17c6
2019.05.02 23:49:31 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 2
2019.05.02 23:49:31 4: myMieleWaschmaschine: HandleSendQueue sends request type auth3 to URL https://api.mcs3.miele.com/thirdparty/token/,
data: grant_type=authorization_code&code=DE_9bd4f9d409125ddaa6e46ed42bff17c6&redirect_uri=https%3A%2F%2Fapi.mcs3.miele.com%2Fthirdparty%2Flogin%2F&client_id=xxxx&client_secret=xxxxx, No Header
timeout 2
2019.05.02 23:49:31 5: HttpUtils url=https://api.mcs3.miele.com/thirdparty/token/
2019.05.02 23:49:31 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 23:49:31 5: HttpUtils request header:
POST /thirdparty/token/ HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Length: 234
Content-Type: application/x-www-form-urlencoded

2019.05.02 23:49:31 4: https://api.mcs3.miele.com/thirdparty/token/: HTTP response code 200
2019.05.02 23:49:31 5: HttpUtils https://api.mcs3.miele.com/thirdparty/token/: Got data, length: 151
2019.05.02 23:49:31 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Thu, 02 May 2019 21:49:31 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 151
Connection: close
Location: https://api.mcs3.miele.com/thirdparty/login/
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 23:49:31 4: myMieleWaschmaschine: Read callback: request type was auth3 retry 0,
Body: {"access_token":"DE_f06b326333594bc5cefe70613f4f3327","refresh_token":"DE_d9b4d6f232d0b418e07b716a9fc35ff3","token_type":"Bearer","expires_in":2592000}
2019.05.02 23:49:31 5: myMieleWaschmaschine: JSON Flatter called : prefix , ref is HASH(0x6884970)
2019.05.02 23:49:31 5: myMieleWaschmaschine: JSON Flatter sets access_token to DE_f06b326333594bc5cefe70613f4f3327
2019.05.02 23:49:31 5: myMieleWaschmaschine: JSON Flatter sets expires_in to 2592000
2019.05.02 23:49:31 5: myMieleWaschmaschine: JSON Flatter sets token_type to Bearer
2019.05.02 23:49:31 5: myMieleWaschmaschine: JSON Flatter sets refresh_token to DE_d9b4d6f232d0b418e07b716a9fc35ff3
2019.05.02 23:49:31 4: myMieleWaschmaschine: extracted JSON values to internal
2019.05.02 23:49:31 5: myMieleWaschmaschine: ExtractSid called, context sid, num 3
2019.05.02 23:49:31 5: myMieleWaschmaschine: Checking SID with JSON access_token
2019.05.02 23:49:31 4: myMieleWaschmaschine: ExtractSid set sid to DE_f06b326333594bc5cefe70613f4f3327
2019.05.02 23:49:32 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 1
2019.05.02 23:49:32 4: myMieleWaschmaschine: HandleSendQueue sends request type update to URL https://api.mcs3.miele.com/v1/devices/000119245250/?language=de, No Data,
header: Authorization: Bearer DE_f06b326333594bc5cefe70613f4f3327
Content-Type: application/json
timeout 2
2019.05.02 23:49:32 5: HttpUtils url=https://api.mcs3.miele.com/v1/devices/000119245250/?language=de
2019.05.02 23:49:32 4: IP: api.mcs3.miele.com -> 157.97.106.171
2019.05.02 23:49:32 5: HttpUtils request header:
GET /v1/devices/000119245250/?language=de HTTP/1.0
Host: api.mcs3.miele.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Authorization: Bearer DE_f06b326333594bc5cefe70613f4f3327
Content-Type: application/json
Content-Length: 0

2019.05.02 23:49:32 4: https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: HTTP response code 401
2019.05.02 23:49:32 5: HttpUtils https://api.mcs3.miele.com/v1/devices/000119245250/?language=de: Got data, length: 29
2019.05.02 23:49:32 5: HttpUtils response header:
HTTP/1.1 401 Unauthorized
Date: Thu, 02 May 2019 21:49:32 GMT
Content-Type: application/vnd.miele.v1+json;charset=UTF-8
Content-Length: 29
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Strict-Transport-Security: max-age=15724800; includeSubDomains
2019.05.02 23:49:32 4: myMieleWaschmaschine: Read callback: request type was update retry 1,
Body: { "message": "Unauthorized" }
2019.05.02 23:49:32 5: myMieleWaschmaschine: JSON Flatter called : prefix , ref is HASH(0x6c414e0)
2019.05.02 23:49:32 5: myMieleWaschmaschine: JSON Flatter sets message to Unauthorized
2019.05.02 23:49:32 4: myMieleWaschmaschine: extracted JSON values to internal
2019.05.02 23:49:32 5: myMieleWaschmaschine: ExtractSid called, context reading, num
2019.05.02 23:49:32 5: myMieleWaschmaschine: CheckAuth is checking buffer with ReAuthRegex Unauthorized
2019.05.02 23:49:32 4: myMieleWaschmaschine: CheckAuth decided new authentication required
2019.05.02 23:49:32 4: myMieleWaschmaschine: Authentication still required but no retries left - did last authentication fail?
2019.05.02 23:49:32 5: myMieleWaschmaschine: Read starts parsing response to update with defined readings: 06
2019.05.02 23:49:32 5: myMieleWaschmaschine: ExtractReading state with json state_status_value_raw ...
2019.05.02 23:49:32 5: myMieleWaschmaschine: ExtractReading state with json state_status_value_raw did not match a key directly - trying regex match to create a list
2019.05.02 23:49:32 5: myMieleWaschmaschine: ExtractReading state with json /^state_status_value_raw/ got keylist
2019.05.02 23:49:32 5: myMieleWaschmaschine: ExtractReading state did not match
2019.05.02 23:49:32 3: myMieleWaschmaschine: Read response to update didn't match any Reading
2019.05.02 23:49:32 5: myMieleWaschmaschine: HandleSendQueue called, qlen = 0
RaspberryPI 3 mit Raspbian Jessie, HMLAN/HM-LAN-Gateway
Diverse HM-Komponenten, Netatmo, Hue, Sonos, Nuki, Alexa

amenomade

#73
Das ist aber schon mal viel besser: du kriegst jetzt von sid3 ein Token (Bearer); vorher warst Du bei sid2 schon weg.

Nur dann, wenn er die "devices" Seite mit diesem Token aufruft, scheint es nicht zu funktionieren. Das muss ich mir anschauen. Heute Abend oder eher am Wochenende.

EDIT: versuch mal nur testweise, deine User/Passwort und den Language selector noch am Ende von sid3Data hinzufügen:
<was es schon gibt>&username=EMAIL&password=PASSWORT&vg=de-DE
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

det.

Zitat von: amenomade am 03 Mai 2019, 07:13:53
EDIT: versuch mal nur testweise, deine User/Passwort und den Language selector noch am Ende von sid3Data hinzufügen:
<was es schon gibt>&username=EMAIL&password=PASSWORT&vg=de-DE
Danke, aber das ändert leider nichts an der Sache.
LG
det.