FHEM Forum

FHEM => Sonstiges => Thema gestartet von: holzwurm83 am 28 Oktober 2017, 16:35:28

Titel: HTTPMOD Login
Beitrag von: holzwurm83 am 28 Oktober 2017, 16:35:28
Hallo zusammen,

ich würde gerne meine Wasserenthärtungsanlage per HTTPMOD auslesen. Allerdings scheitere ich schon bereits am Verständnis, wie ich mich auf der Website einlogge.

https://wifi.ecowater.com/Site/Login (https://wifi.ecowater.com/Site/Login)

Habe auch schon die Beschreibungen gelesen, aber damit komme ich leider nicht weiter.

Ich hoffe ihr könnt mir weiterhelfen?
Titel: Antw:HTTPMOD Login
Beitrag von: fiedel am 29 Oktober 2017, 09:04:41
Dieser Thread (https://forum.fhem.de/index.php/topic,76220.0.html) enthält viele nützliche Infos zum Login. Vielleicht kommst du damit weiter...
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 29 Oktober 2017, 18:49:28
Danke, das hat mich auf jeden Fall ein Stück weiter gebracht. Ohne eure Hilfe werde ich allerdings nicht an Ziel kommen. Schaffe den Login leider immer noch nicht. Habe es versucht zu verstehen und anzupassen, aber dass ist für mich leider nicht so einfach.

Hier mal ein List was ich bis jetzt habe:

Internals:
   BUSY       0
   CFGFN
   CHANGED
   DEF        https://wifi.ecowater.com/Dashboard/Index/meineMail/AC000W000028486 60
   HTTPCookies ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/
 
   Interval   60
   LASTSEND   1509299112.62502
   MainURL    https://wifi.ecowater.com/Dashboard/Index/meineMail/AC000W000028486
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       H2O_Anlage
   NR         10453
   STATE      ???
   TRIGGERTIME 1509299172.62435
   TRIGGERTIME_FMT 2017-10-29 18:46:12
   TYPE       HTTPMOD
   addr       https://wifi.ecowater.com:443
   buf
   code       400
   conn
   data
   displayurl https://wifi.ecowater.com/Dashboard/Index/meineMail/AC000W000028486
   header     Cookie: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/
 
   host       wifi.ecowater.com
   httpheader HTTP/1.1 400 Bad Request
 
Content-Type: text/html; charset=us-ascii
 
Server: Microsoft-HTTPAPI/2.0
 
Date: Sun, 29 Oct 2017 17:45:11 GMT
 
Connection: close
 
Content-Length: 311
   httpversion 1.0
   hu_blocking 0
   hu_filecount 254
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /Dashboard/Index/meineMail/AC000W000028486
   protocol   https
   redirects  0
   timeout    2
   url        https://wifi.ecowater.com/Dashboard/Index/meineMail/AC000W000028486
   value      0
   HTTPCookieHash:
     ASP.NET_SessionId:
       Options    path=/; HttpOnly
 
       Value      kuz312cvgdmpth5b2mtc5dbn
     path:
       Options
       Value      /
 
   QUEUE:
   READINGS:
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://wifi.ecowater.com/Dashboard/Index/meineMail/AC000W000028486
     value      0
   sslargs:
Attributes:
   enableCookies 1
   reAuthRegex id="login"|Unauthorized
   reading01Name VerbrauchHeute
   reading01Regex <h1 id="water_today" </h1>[^0-9]
   room       test
   sid01Data  username=meineMail&password=meinPasswort
   sid01URL   https://wifi.ecowater.com/Site/Login
   userattr   reading01Name reading01Regex sid01Data sid01URL
   verbose    5


Hier ist ein Auszug aus dem Log:

2017.10.29 18:27:51 4: H2O_Anlage: GetUpdate called (update)
2017.10.29 18:27:51 4: H2O_Anlage: update timer modified: will call GetUpdate in 60.0 seconds at 2017-10-29 18:28:51
2017.10.29 18:27:51 4: H2O_Anlage: AddToQueue adds update, initial queue len: 0
2017.10.29 18:27:51 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486, no data, no headers, retry 0
2017.10.29 18:27:51 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.10.29 18:27:51 5: H2O_Anlage: HandleSendQueue is adding Cookies: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/
2017.10.29 18:27:51 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/
,
timeout 2
2017.10.29 18:27:51 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486
2017.10.29 18:27:51 5: HttpUtils request header:
GET /Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/

Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.10.29 18:27:51 4: https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486: HTTP response code 400
2017.10.29 18:27:51 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486: Got data, length: 311
2017.10.29 18:27:51 5: HttpUtils response header:
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 29 Oct 2017 17:27:49 GMT
Connection: close
Content-Length: 311
2017.10.29 18:27:51 4: H2O_Anlage: Read callback: request type was update retry 0,
Header: HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 29 Oct 2017 17:27:49 GMT
Connection: close
Content-Length: 311,
Body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

2017.10.29 18:27:51 5: H2O_Anlage: looking for Cookies in HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 29 Oct 2017 17:27:49 GMT
Connection: close
Content-Length: 311
2017.10.29 18:27:51 5: H2O_Anlage: ExtractSid called, context reading, num
2017.10.29 18:27:51 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex id="login"|Unauthorized
2017.10.29 18:27:51 4: H2O_Anlage: CheckAuth decided no authentication required
2017.10.29 18:27:51 5: H2O_Anlage: Read starts parsing response to update with defined readings: 01
2017.10.29 18:27:51 5: H2O_Anlage: ExtractReading VerbrauchHeute with regex /<h1 id="water_today" </h1>[^0-9]/...
2017.10.29 18:27:51 5: H2O_Anlage: ExtractReading VerbrauchHeute did not match
2017.10.29 18:27:51 3: H2O_Anlage: Read response to update didn't match any Reading
2017.10.29 18:27:51 5: H2O_Anlage: HandleSendQueue called, qlen = 02017.10.29 18:27:54 3: SB_SERVER_Notify(SqueezeBoxServer): mediaserver changed to present presence: present
2017.10.29 18:28:10 3: H2O_Anlage: Defined with URL https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486 and interval 60
2017.10.29 18:28:10 4: H2O_Anlage: update timer modified: will call GetUpdate in 2.0 seconds at 2017-10-29 18:28:12
2017.10.29 18:28:10 5: H2O_Anlage: UpdateHintList called
2017.10.29 18:28:10 5: H2O_Anlage: UpdateHintList: setlist =
2017.10.29 18:28:10 5: H2O_Anlage: UpdateHintList: getlist =
2017.10.29 18:28:12 4: H2O_Anlage: GetUpdate called (update)
2017.10.29 18:28:12 4: H2O_Anlage: update timer modified: will call GetUpdate in 60.0 seconds at 2017-10-29 18:29:12
2017.10.29 18:28:12 4: H2O_Anlage: AddToQueue adds update, initial queue len: 0
2017.10.29 18:28:12 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486, no data, no headers, retry 0
2017.10.29 18:28:12 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.10.29 18:28:12 5: H2O_Anlage: HandleSendQueue is adding Cookies: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/
2017.10.29 18:28:12 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/
,
timeout 2
2017.10.29 18:28:12 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486
2017.10.29 18:28:12 5: HttpUtils request header:
GET /Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: ASP.NET_SessionId=kuz312cvgdmpth5b2mtc5dbn; path=/

Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.10.29 18:28:13 4: https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486: HTTP response code 400
2017.10.29 18:28:13 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486: Got data, length: 311
2017.10.29 18:28:13 5: HttpUtils response header:
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 29 Oct 2017 17:28:11 GMT
Connection: close
Content-Length: 311
2017.10.29 18:28:13 4: H2O_Anlage: Read callback: request type was update retry 0,
Header: HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 29 Oct 2017 17:28:11 GMT
Connection: close
Content-Length: 311,
Body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

2017.10.29 18:28:13 5: H2O_Anlage: looking for Cookies in HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 29 Oct 2017 17:28:11 GMT
Connection: close
Content-Length: 311
2017.10.29 18:28:13 5: H2O_Anlage: ExtractSid called, context reading, num
2017.10.29 18:28:13 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex id="login"|Unauthorized
2017.10.29 18:28:13 4: H2O_Anlage: CheckAuth decided no authentication required
2017.10.29 18:28:13 5: H2O_Anlage: UpdateReadingList created list of reading.* nums to parse during getUpdate as 01
2017.10.29 18:28:13 5: H2O_Anlage: Read starts parsing response to update with defined readings: 01
2017.10.29 18:28:13 5: H2O_Anlage: ExtractReading VerbrauchHeute with regex /<h1 id="water_today" </h1>[^0-9]/...
2017.10.29 18:28:13 5: H2O_Anlage: ExtractReading VerbrauchHeute did not match
2017.10.29 18:28:13 3: H2O_Anlage: Read response to update didn't match any Reading
2017.10.29 18:28:13 5: H2O_Anlage: HandleSendQueue called, qlen = 0




Ich würde mich freuen wenn ihr euch die Zeit nehmen könnt mir zu helfen?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 01 November 2017, 14:27:59
Probier mal mit
attr H2O_Anlage reAuthRegex Please Sign In
attr H2O_Anlage Email=EMAIL&Password=PASSWORT&Remember=false
EMAIL und PASSWORT durch deine eigene ersetzen.

Dann musst Du prüfen, dass die Seite, die Du aufrufst, immer gleich ist: https://wifi.ecowater.com/Dashboard/Index/XXXXmeine_MAIL_xxxx/AC000W000028486
Insbesondere die Nummer am Ende. AC00W00028486. Hat es mit deinem Zähler zu tun, oder ist es irgendwelche dynamische Data?


Poste mal dann wieder die Log mit verbose 5 und ein "list H20_Anlage" (bitte vorher anonymisieren, insb Email und Passwort)
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 01 November 2017, 17:21:54
Hi,

vielen Dank für dein Feedback!!! :)

Die Nummer muss immer gleich sein. Das ist die meiner Anlage.

Hier ist der LIST:
Internals:
   BUSY       0
   CFGFN
   CHANGED
   DEF        https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486 60
   HTTPCookies ASP.NET_SessionId=egtrn2zewdtlvqunyh1mcsxw; path=/
 
   Interval   60
   LASTSEND   1509552923.81186
   LastAuthTry 2017-11-01 17:07:18
   MainURL    https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       H2O_Anlage
   NR         10453
   STATE      ???
   TRIGGERTIME 1509552983.81014
   TRIGGERTIME_FMT 2017-11-01 17:16:23
   TYPE       HTTPMOD
   addr       https://wifi.ecowater.com:443
   buf
   code       400
   conn
   data
   displayurl https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486
   header     Cookie: ASP.NET_SessionId=egtrn2zewdtlvqunyh1mcsxw; path=/
 
   host       wifi.ecowater.com
   httpheader HTTP/1.1 400 Bad Request
 
Content-Type: text/html; charset=us-ascii
 
Server: Microsoft-HTTPAPI/2.0
 
Date: Wed, 01 Nov 2017 16:15:13 GMT
 
Connection: close
 
Content-Length: 311
   httpversion 1.0
   hu_blocking 0
   hu_filecount 253
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486
   protocol   https
   redirects  0
   timeout    2
   url        https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486
   value      0
   HTTPCookieHash:
     ASP.NET_SessionId:
       Options    path=/; HttpOnly
 
       Value      egtrn2zewdtlvqunyh1mcsxw
     path:
       Options
       Value      /
 
   QUEUE:
   READINGS:
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486
     value      0
   sslargs:
Attributes:
   enableCookies 1
   reAuthRegex Please Sign In
   reading01Name VerbrauchHeute
   reading01Regex <h1 id="water_today" </h1>[^0-9]
   room       test
   sid01Data  attr H2O_Anlage Email=MEINE_MAIL&Password=XXXXXXXXX&Remember=false
   sid01URL   https://wifi.ecowater.com/Site/Login
   userattr   reading01Name reading01Regex sid01Data sid01URL
   verbose    5

Und hier noch der LOG:
2017.11.01 17:10:19 4: H2O_Anlage: GetUpdate called (update)
2017.11.01 17:10:19 4: H2O_Anlage: update timer modified: will call GetUpdate in 60.0 seconds at 2017-11-01 17:11:19
2017.11.01 17:10:19 4: H2O_Anlage: AddToQueue adds update, initial queue len: 0
2017.11.01 17:10:19 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486, no data, no headers, retry 0
2017.11.01 17:10:19 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.11.01 17:10:19 5: H2O_Anlage: HandleSendQueue is adding Cookies: ASP.NET_SessionId=egtrn2zewdtlvqunyh1mcsxw; path=/
2017.11.01 17:10:19 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=egtrn2zewdtlvqunyh1mcsxw; path=/
,
timeout 2
2017.11.01 17:10:19 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486
2017.11.01 17:10:19 5: HttpUtils request header:
GET /Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: ASP.NET_SessionId=egtrn2zewdtlvqunyh1mcsxw; path=/

Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.01 17:10:19 4: https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486: HTTP response code 400
2017.11.01 17:10:19 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/xxxxxmeine_Mailxxxx/AC000W000028486: Got data, length: 311
2017.11.01 17:10:19 5: HttpUtils response header:
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 01 Nov 2017 16:10:08 GMT
Connection: close
Content-Length: 311
2017.11.01 17:10:19 4: H2O_Anlage: Read callback: request type was update retry 0,
Header: HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 01 Nov 2017 16:10:08 GMT
Connection: close
Content-Length: 311,
Body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

2017.11.01 17:10:19 5: H2O_Anlage: looking for Cookies in HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 01 Nov 2017 16:10:08 GMT
Connection: close
Content-Length: 311
2017.11.01 17:10:19 5: H2O_Anlage: ExtractSid called, context reading, num
2017.11.01 17:10:19 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex Please Sign In
2017.11.01 17:10:19 4: H2O_Anlage: CheckAuth decided no authentication required
2017.11.01 17:10:19 5: H2O_Anlage: Read starts parsing response to update with defined readings: 01
2017.11.01 17:10:19 5: H2O_Anlage: ExtractReading VerbrauchHeute with regex /<h1 id="water_today" </h1>[^0-9]/...
2017.11.01 17:10:19 5: H2O_Anlage: ExtractReading VerbrauchHeute did not match
2017.11.01 17:10:19 3: H2O_Anlage: Read response to update didn't match any Reading
2017.11.01 17:10:19 5: H2O_Anlage: HandleSendQueue called, qlen = 0
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 00:02:33
Sorry
attr H2O_Anlage sid01Data Email=MEINE_MAIL&Password=XXXXXXXXX&Remember=false
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 07:53:10
Also... ich habe mir ein Konto bei ecowater.com angelegt, und ein bisschen rumgespielt.
Ich befürchte, es wird nicht funktionieren: das Loginverfahren ist 2-stufig, und es werden zwei Cookies an unterschiedene Momente gelegt.

=> Get Loginseite (noch ohne Cookie) => OK, Antwort: Set-Cookie: ASP.NET_SessionId=edemr1ebflmclaa4oalcqok5
=> Post Logindata (mit oberem Cookie) => OK, Antwort: Set-Cookie: .ASPXAUTH=A306AE16640B4BC17A4365F60C04C173D6DC0usw...

Dieses 2. Cookie wird aber von HTTPMOD nicht mehr gesetzt, und bei nachfolgenden Gets nicht mitgegeben. Deswegen vermutlich die systematische Antwort: HTTP 400 Bad Request. Leider ändert sich .ASPXAUTH bei jedem neuen Login, so dass man es nicht "fest" mitgeben kann.

Vielleicht wird Stefan eine Idee haben:
Zitat
FHEM/98_HTTPMOD.pm           stefanstrobel        Sonstiges
aber m.A. wird es nur mit Perl lösbar.
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 08:47:29
So schaffe ich mit CURL das Login (da ich selbst kein ecowater Gerät habe, kann ich am Ende nur die Seite erreichen, wo man ein Gerät anlegen kann, sprich /Customer/Connect):

curl -v https://wifi.ecowater.com/Site/LoginAus der Antwort nehme ich das SessionId, dann:
curl -v -b ASP.NET_SessionId=0ma3mjbvjwwofh1s31ibrbdv -d Email=meinEmail&Password=meinpasswort https://wifi.ecowater.com/Site/LoginAus der Antwort nehme ich das XAUTH, dann:
curl -v -b "ASP.NET_SessionId=0ma3mjbvjwwofh1s31ibrbdv;.ASPXAUTH=2083AE0FF1FA76667F893FD98F7usw..." https://wifi.ecowater.com/Customer/Connect/meinEmail
Und schon kommen die Daten.

Vielleicht ist doch was mit HTTPMOD (und die "replacement" Attribute) möglich. Ich muss noch spielen.
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 11:39:15
Also: so funktioniert es bei mir... wie gesagt: ich kann nur die Seite /Customer/Connect abfragen. Vielleicht sind noch einige Anpassungen nötig

defmod ecowater HTTPMOD https://wifi.ecowater.com/Customer/Connect/meineEmail 60
attr ecowater userattr requestHeader1 requestHeader2 sid01Data sid01Header1 sid01IdRegex sid01IgnoreRedirects:0,1 sid01URL sid02Data sid02Header1 sid02IdRegex sid02URL sidURL
attr ecowater clearSIdBeforeAuth 1
attr ecowater disable 0
attr ecowater reAuthRegex (class="login-item"|Bad Request)
attr ecowater requestHeader1 Cookie: $sid
attr ecowater room ecowater
attr ecowater sid01IdRegex (ASP.NET_SessionId[^;;\n]+)
attr ecowater sid02Data Email=meineEmail&Password=meinPasswort&Remember=false
attr ecowater sid02Header1 Cookie: $sid
attr ecowater sid02IdRegex Cookie: ([^\n]+)
attr ecowater sidURL https://wifi.ecowater.com/Site/Login
attr ecowater verbose 5
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 02 November 2017, 20:51:14
Also ich habe das jetzt mal so eingetragen nur mit meiner URL. Es tut sich auf jeden Fall einiges nur blicke ich da nicht durch. Sieht aber nicht so aus als ob das funktioniert.

Hier mal der Log:
2017.11.02 20:26:40 4: H2O_Anlage: GetUpdate called (update)
2017.11.02 20:26:40 4: H2O_Anlage: update timer modified: will call GetUpdate in 60.0 seconds at 2017-11-02 20:27:40
2017.11.02 20:26:40 4: H2O_Anlage: AddToQueue adds update, initial queue len: 0
2017.11.02 20:26:40 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, no data, header Cookie: $sid, retry 0
2017.11.02 20:26:40 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.11.02 20:26:40 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, No Data,
header: Cookie: DC_SESSION_DATA=; path=/
,
timeout 2
2017.11.02 20:26:40 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
2017.11.02 20:26:40 5: HttpUtils request header:
GET /Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: DC_SESSION_DATA=; path=/

Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.02 20:26:40 4: https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: HTTP response code 400
2017.11.02 20:26:40 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: Got data, length: 311
2017.11.02 20:26:40 5: HttpUtils response header:
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 02 Nov 2017 19:26:26 GMT
Connection: close
Content-Length: 311
2017.11.02 20:26:40 4: H2O_Anlage: Read callback: request type was update retry 0,
Header: HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 02 Nov 2017 19:26:26 GMT
Connection: close
Content-Length: 311,
Body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

2017.11.02 20:26:40 5: H2O_Anlage: ExtractSid called, context reading, num
2017.11.02 20:26:40 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex (class="login-item"|Bad Request)
2017.11.02 20:26:40 4: H2O_Anlage: CheckAuth decided new authentication required
2017.11.02 20:26:40 4: H2O_Anlage: Auth called with Steps: 01 02
2017.11.02 20:26:40 4: H2O_Anlage: AddToQueue adds auth02, initial queue len: 0, prio
2017.11.02 20:26:40 5: H2O_Anlage: AddToQueue prepends type auth02 to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, no data, header Cookie: $sid, retry 0
2017.11.02 20:26:40 4: H2O_Anlage: AddToQueue adds auth01, initial queue len: 1, prio
2017.11.02 20:26:40 5: H2O_Anlage: AddToQueue prepends type auth01 to URL https://wifi.ecowater.com/Site/Login, data Email=xxxxmeineMailxxxx&Password=xxxxxxxx&Remember=false, no headers, retry 0
2017.11.02 20:26:40 5: H2O_Anlage: HandleSendQueue called, qlen = 2
2017.11.02 20:26:40 4: H2O_Anlage: HandleSendQueue sends request type auth01 to URL https://wifi.ecowater.com/Site/Login,
data: Email=xxxxmeineMailxxxx&Password=xxxxxxxx&Remember=false, No Header,
timeout 2
2017.11.02 20:26:40 4: HttpUtils url=https://wifi.ecowater.com/Site/Login
2017.11.02 20:26:40 4: H2O_Anlage: AddToQueue adds update, initial queue len: 1
2017.11.02 20:26:40 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, no data, header Cookie: $sid, retry 1
2017.11.02 20:26:40 5: H2O_Anlage: HandleSendQueue called, qlen = 2
2017.11.02 20:26:40 5: H2O_Anlage: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2017.11.02 20:26:40 4: H2O_Anlage: CheckAuth requeued request update after auth, retryCount 0 ...
2017.11.02 20:26:40 5: HttpUtils request header:
POST /Site/Login HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Content-Length: 67
Content-Type: application/x-www-form-urlencoded

2017.11.02 20:26:41 4: https://wifi.ecowater.com/Site/Login: HTTP response code 302
2017.11.02 20:26:41 4: HttpUtils https://wifi.ecowater.com/Site/Login: Redirect to https://wifi.ecowater.com:443/Site/Index
2017.11.02 20:26:41 4: HttpUtils url=https://wifi.ecowater.com:443/Site/Index
2017.11.02 20:26:41 5: HttpUtils request header:
POST /Site/Index HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Content-Length: 67
Content-Type: application/x-www-form-urlencoded

2017.11.02 20:26:41 5: H2O_Anlage: HandleSendQueue called, qlen = 2
2017.11.02 20:26:41 5: H2O_Anlage: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2017.11.02 20:26:41 4: https://wifi.ecowater.com:443/Site/Index: HTTP response code 200
2017.11.02 20:26:41 4: HttpUtils https://wifi.ecowater.com:443/Site/Index: Got data, length: 2686
2017.11.02 20:26:41 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
Set-Cookie: ASP.NET_SessionId=egwpd1dzcmyu3b3d0ixffbia; path=/; HttpOnly
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 02 Nov 2017 19:26:27 GMT
Connection: close
Content-Length: 2686
2017.11.02 20:26:41 4: H2O_Anlage: Read callback: request type was auth01 retry 0,
Header: HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
Set-Cookie: ASP.NET_SessionId=egwpd1dzcmyu3b3d0ixffbia; path=/; HttpOnly
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 02 Nov 2017 19:26:27 GMT
Connection: close
Content-Length: 2686,
Body: <p><h3>Object reference not set to an instance of an object.</h3><br/><b>https://wifi.ecowater.com/Site/Index<br/>/Site/Index</b><h3>51 Query String Params</h3><ul><li>Email = xxxxmeineMailxxxx</li><li>Password = xxxxxxxx</li><li>Remember = false</li><li>ASP.NET_SessionId = egwpd1dzcmyu3b3d0ixffbia</li><li>ALL_HTTP = HTTP_CONTENT_LENGTH:67
HTTP_CONTENT_TYPE:application/x-www-form-urlencoded
HTTP_HOST:wifi.ecowater.com
HTTP_USER_AGENT:fhem
</li><li>ALL_RAW = Content-Length: 67
Content-Type: application/x-www-form-urlencoded
Host: wifi.ecowater.com
User-Agent: fhem
</li><li>APPL_MD_PATH = /LM/W3SVC/10/ROOT</li><li>APPL_PHYSICAL_PATH = C:\inetpub\wwwroot\ecowater_wifi_site\</li><li>CERT_KEYSIZE = 256</li><li>CERT_SECRETKEYSIZE = 2048</li><li>CERT_SERVER_ISSUER = C=US, S=Arizona, L=Scottsdale, O="GoDaddy.com, Inc.", OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2</li><li>CERT_SERVER_SUBJECT = OU=Domain Control Validated, CN=mail.chipsunlimited.com</li><li>CONTENT_LENGTH = 67</li><li>CONTENT_TYPE = application/x-www-form-urlencoded</li><li>GATEWAY_INTERFACE = CGI/1.1</li><li>HTTPS = on</li><li>HTTPS_KEYSIZE = 256</li><li>HTTPS_SECRETKEYSIZE = 2048</li><li>HTTPS_SERVER_ISSUER = C=US, S=Arizona, L=Scottsdale, O="GoDaddy.com, Inc.", OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2</li><li>HTTPS_SERVER_SUBJECT = OU=Domain Control Validated, CN=mail.chipsunlimited.com</li><li>INSTANCE_ID = 10</li><li>INSTANCE_META_PATH = /LM/W3SVC/10</li><li>LOCAL_ADDR = 172.31.23.189</li><li>PATH_INFO = /Site/Index</li><li>PATH_TRANSLATED = C:\inetpub\wwwroot\ecowater_wifi_site\Site\Index</li><li>REMOTE_ADDR = 193.159.63.77</li><li>REMOTE_HOST = 193.159.63.77</li><li>REMOTE_PORT = 53643</li><li>REQUEST_METHOD = POST</li><li>SCRIPT_NAME = /Site/Index</li><li>SERVER_NAME = wifi.ecowater.com</li><li>SERVER_PORT = 443</li><li>SERVER_PORT_SECURE = 1</li><li>SERVER_PROTOCOL = HTTP/1.0</li><li>SERVER_SOFTWARE = Microsoft-IIS/8.5</li><li>URL = /Site/Index</li><li>HTTP_CONTENT_LENGTH = 67</li><li>HTTP_CONTENT_TYPE = application/x-www-form-urlencoded</li><li>HTTP_HOST = wifi.ecowater.com</li><li>HTTP_USER_AGENT = fhem</li></ul><br/><h3>Stack Trace</h3>   at DCWebLib.Infrastructure.DCAuthorizeAttribute.HandleUnauthorizedRequest(AuthorizationContext filterContext)
<br/>   at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
<br/>   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState)</p>
2017.11.02 20:26:41 5: H2O_Anlage: ExtractSid called, context sid, num 01
2017.11.02 20:26:41 4: H2O_Anlage: ExtractSid set sid to ASP.NET_SessionId=egwpd1dzcmyu3b3d0ixffbia
2017.11.02 20:26:42 5: H2O_Anlage: HandleSendQueue called, qlen = 2
2017.11.02 20:26:42 4: H2O_Anlage: HandleSendQueue sends request type auth02 to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=egwpd1dzcmyu3b3d0ixffbia,
timeout 2
2017.11.02 20:26:42 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
2017.11.02 20:26:43 5: HttpUtils request header:
GET /Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: ASP.NET_SessionId=egwpd1dzcmyu3b3d0ixffbia
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.02 20:26:43 4: https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: HTTP response code 302
2017.11.02 20:26:43 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: Redirect to https://wifi.ecowater.com:443/Site/Login?returnUrl=%2FDashboard%2FIndex%2FxxxxmeineMailxxxx%2FAC000W000028486&status=NotLoggedIn
2017.11.02 20:26:43 4: HttpUtils url=https://wifi.ecowater.com:443/Site/Login?returnUrl=%2FDashboard%2FIndex%2FxxxxmeineMailxxxx%2FAC000W000028486&status=NotLoggedIn
2017.11.02 20:26:43 5: HttpUtils request header:
GET /Site/Login?returnUrl=%2FDashboard%2FIndex%2FxxxxmeineMailxxxx%2FAC000W000028486&status=NotLoggedIn HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: ASP.NET_SessionId=egwpd1dzcmyu3b3d0ixffbia
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.02 20:26:43 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.11.02 20:26:43 5: H2O_Anlage: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2017.11.02 20:26:43 4: https://wifi.ecowater.com:443/Site/Login?returnUrl=%2FDashboard%2FIndex%2FxxxxmeineMailxxxx%2FAC000W000028486&status=NotLoggedIn: HTTP response code 200
2017.11.02 20:26:43 4: HttpUtils https://wifi.ecowater.com:443/Site/Login?returnUrl=%2FDashboard%2FIndex%2FxxxxmeineMailxxxx%2FAC000W000028486&status=NotLoggedIn: Got data, length: 8101
2017.11.02 20:26:43 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
Set-Cookie: DC_SESSION_DATA=; path=/
X-Powered-By: ASP.NET
Date: Thu, 02 Nov 2017 19:26:29 GMT
Connection: close
Content-Length: 8101
2017.11.02 20:26:43 4: H2O_Anlage: Read callback: request type was auth02 retry 0,
Header: HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
Set-Cookie: DC_SESSION_DATA=; path=/
X-Powered-By: ASP.NET
Date: Thu, 02 Nov 2017 19:26:29 GMT
Connection: close
Content-Length: 8101,
Body: <!DOCTYPE html>

<html>
<head>
    <title>Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='shortcut icon' href='img/favicon.ico' type='image/x-icon'/>

<!--CSS STYLES-->
   
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
    <link href="/Content/css/jquery-ui-1.91.custom.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/chosen.min.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/datepicker3.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/main.css?11.8.2016" rel="stylesheet" type="text/css">
   

<!--JAVASCRIPT-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="/Scripts/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    <script src="/Scripts/chosen.jquery.min.js"></script>
    <script src="/Scripts/ion.rangeSlider.min.js"></script>
    <script src="/Scripts/Chart.min.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Scripts/bootstrap-datepicker.js"></script>
    <script src="/Scripts/main.js"></script>

</head>
<body>

<!--TOP FIXED NAVIGATION-->
    <div id="header" class="navbar navbar-default navbar-fixed-top public-page" role="navigation">
        <div class="nav-container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".sidebar-offcanvas" data-canvas="body">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-logo" href="http://www.ecowater.com">
                    <img src="/Content/img/mobile_logo.png" />
                </a>
            </div>
            <div id="language" class="language-lg">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
        </div>
        <div id="global" class="global-lg">
            <ul class="nav navbar-nav navbar-right navbar-custom">
                <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
            </ul>
        </div>
    </div>
<!--END TOP FIXED NAVIGATION-->

    <div id="wrapper" class="row row-offcanvas row-offcanvas-left">
       
    <!--OFF CANVAS MENU-->
        <div id="navigation-sm" class="sidebar-offcanvas">
            <div id="language" class="language-sm">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>

            <h4 id="global-title">My Account</h4>
            <div id="global">
                <ul>
                    <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
                  </ul>
            </div>
        </div>
    <!--END OFF CANVAS MENU-->

       

<div id="intro-page" class="container">
    <div class=" col-xs-12 col-lg-10 col-lg-offset-1">
        <div class="intro-column1">
            <img src="/Content/img/EcoWater_Logo.png"/>
            <h1 class="intro">Welcome!</h1>
            <p>Congratulations on purchasing your new HydroLink Plus<sup>®</sup> Water Treatment System. Click the Create Account button to get started with setup and registration.</p>
            <a href="/Customer/Create" class="btn-submit">New Account</a>
        </div>
        <div class="intro-column2">
<form action="/Site/Login?returnUrl=%2FDashboard%2FIndex%2FxxxxmeineMailxxxx%2FAC000W000028486&status=NotLoggedIn" method="post">                <h2>Please Sign In</h2>

        <div class="alert alert-info" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            Your session has expired. Please log in to continue.
        </div>
                <div class="login-item">
                    <label for="username">
                        <img src="/Content/img/icon_user.png"/>
                    </label>
                    <input data-val="true" data-val-required="The Email field is required." id="username" name="Email" placeholder="username" type="text" value="" />
                    <label for="username">
                        <img src="/Content/img/icon_password.png"/>
                    </label>
                    <input data-val="true" data-val-required="The Password field is required." id="password" name="Password" placeholder="password" type="password" />
                </div>
                <div class="col-xs-6 no-margin">
                    <input type="submit" class="btn-login" value="Login" />
                </div>
                <div class="col-xs-6">
                    <div class="row">
                        <input class="col-xs-1" data-val="true" data-val-required="The Remember Me? field is required." id="remember" name="Remember" type="checkbox" value="true" /><input name="Remember" type="hidden" value="false" />
                        <p id="remember" class="col-xs-11">Remember me</p>
                    </div>
                    <a class="special forgotten" href="/Site/Forgot">Forgotten Password?</a>
                </div>
</form>        </div>
    </div>
</div>

    <!--////////////////// BACKGROUND ////////////////-->

        <div id="background" class="background-index">
            <img id="background-left" src="/Content/img/ecowater_background_left.png" />
            <img id="background-right" src="/Content/img/ecowater_background_right.png" />
        </div>

    <!--////////////////// FOOTER ////////////////-->

        <div class="subfooter">
            <p>©2014 EcoWater Systems LLC | 1-800-86WATER | <a class="special" href="http://www.ecowater.com">ecowater.com</a> | <a class="special" href="http://www.ecowater-europe.com">ecowater-europe.com</a></p>
        </div>

    </div>

    <script type="text/javascript">
        function setCulture(culture) {
            window.location = '/Site/SetCulture' + '?name=' + culture;
        }
    </script>
   

</body>
</html>
2017.11.02 20:26:43 5: H2O_Anlage: ExtractSid called, context sid, num 02
2017.11.02 20:26:43 4: H2O_Anlage: ExtractSid set sid to DC_SESSION_DATA=; path=/
2017.11.02 20:26:44 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.11.02 20:26:44 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, No Data,
header: Cookie: DC_SESSION_DATA=; path=/
,
timeout 2
2017.11.02 20:26:44 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
2017.11.02 20:26:45 5: HttpUtils request header:
GET /Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: DC_SESSION_DATA=; path=/

Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.02 20:26:45 4: https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: HTTP response code 400
2017.11.02 20:26:45 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: Got data, length: 311
2017.11.02 20:26:45 5: HttpUtils response header:
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 02 Nov 2017 19:26:30 GMT
Connection: close
Content-Length: 311
2017.11.02 20:26:45 4: H2O_Anlage: Read callback: request type was update retry 1,
Header: HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 02 Nov 2017 19:26:30 GMT
Connection: close
Content-Length: 311,
Body: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

2017.11.02 20:26:45 5: H2O_Anlage: ExtractSid called, context reading, num
2017.11.02 20:26:45 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex (class="login-item"|Bad Request)
2017.11.02 20:26:45 4: H2O_Anlage: CheckAuth decided new authentication required
2017.11.02 20:26:45 4: H2O_Anlage: Authentication still required but no retries left - did last authentication fail?
2017.11.02 20:26:45 5: H2O_Anlage: Read starts parsing response to update with defined readings: 01
2017.11.02 20:26:45 5: H2O_Anlage: ExtractReading VerbrauchHeute with regex /<h1 id="water_today" </h1>[^0-9]/...
2017.11.02 20:26:45 5: H2O_Anlage: ExtractReading VerbrauchHeute did not match
2017.11.02 20:26:45 3: H2O_Anlage: Read response to update didn't match any Reading
2017.11.02 20:26:45 5: H2O_Anlage: HandleSendQueue called, qlen = 0


Hier auch noch ein List:
Internals:
   BUSY       0
   CFGFN
   CHANGED
   DEF        https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486 60
   Interval   60
   LASTSEND   1509651838.77531
   LastAuthTry 2017-11-02 20:43:52
   MainURL    https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       H2O_Anlage
   NR         10453
   STATE      ???
   TRIGGERTIME 1509651891.52597
   TRIGGERTIME_FMT 2017-11-02 20:44:51
   TYPE       HTTPMOD
   addr       https://wifi.ecowater.com:443
   buf
   code       400
   conn
   data
   displayurl https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   header     Cookie: DC_SESSION_DATA=; path=/
 
   host       wifi.ecowater.com
   httpheader HTTP/1.1 400 Bad Request
 
Content-Type: text/html; charset=us-ascii
 
Server: Microsoft-HTTPAPI/2.0
 
Date: Thu, 02 Nov 2017 19:43:45 GMT
 
Connection: close
 
Content-Length: 311
   httpversion 1.0
   hu_blocking 0
   hu_filecount 165
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   protocol   https
   redirects  0
   sid        DC_SESSION_DATA=; path=/
 
   timeout    2
   url        https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data
     header     Cookie: $sid
     ignoreredirects 0
     retryCount 1
     type       update
     url        https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
     value      0
   sslargs:
Attributes:
   clearSIdBeforeAuth 1
   disable    0
   reAuthRegex (class="login-item"|Bad Request)
   reading01Name VerbrauchHeute
   reading01Regex <h1 id="water_today" </h1>[^0-9]
   requestHeader1 Cookie: $sid
   room       test
   sid01Data  Email=xxxxmeineMailxxxx&Password=xxxxxxxx&Remember=false
   sid01IdRegex (ASP.NET_SessionId[^;;\n]+)
   sid01URL   https://wifi.ecowater.com/Site/Login
   sid02Header1 Cookie: $sid
   sid02IdRegex Cookie: ([^\n]+)
   userattr   requestHeader1 requestHeader2 sid01Data sid01Header1 sid01IdRegex sid01IgnoreRedirects:0,1 sid01URL sid02Data sid02Header1 sid02IdRegex sid02URL sidURL
   verbose    5


Ich habe jetzt auch noch mal 1:1 deine config ausprobiert. Da steht allerdings am ende auch das es nicht erfolgreich war, wenn ich das richtig verstehe.
2017.11.02 20:47:19 5: ecowater: ExtractSid called, context reading, num
2017.11.02 20:47:19 5: ecowater: CheckAuth is checking buffer with ReAuthRegex (class="login-item"|Bad Request)
2017.11.02 20:47:19 4: ecowater: CheckAuth decided no authentication required
2017.11.02 20:47:19 5: ecowater: Read starts parsing response to update with defined readings:
2017.11.02 20:47:19 3: ecowater: Read response to update didn't match any Reading
2017.11.02 20:47:19 5: ecowater: HandleSendQueue called, qlen = 0

Kann dir dazu auch gerne nochmal alles schicken, wenn im ersten Log nichts zu sehen ist.

Vielen Dank schon mal
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 22:00:04
Zitat
sid01Data  Email=xxxxmeineMailxxxx&Password=xxxxxxxx&Remember=false

Das ist falsch. Das muss sid02Data sein. Beim ersten Vorgang (01) muss man nichts schicken, das ist nur um den ASPNET sid zu kriegen. Lösch den sid01Data Attribute, und kreiere den sid02Data

Zitat
sid01URL   https://wifi.ecowater.com/Site/Login
Das ist auch falsch. Es muss sidURL sein (ohne Zahlen): damit wird die URL für beide Vorgänge (01 und 02) benutzt.

Dann wieder die Log und das "list" bitte.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 02 November 2017, 23:09:31
Sorry! Jetzt nochmal! Sieht aber schon mal gut aus. Im Log ist die Seite komplett geladen, so wie ich das sehe. Es passt nur nicht der Export der Daten die ich haben möchte, wenn ich das richtig verstehe.


Hier List:

Internals:
   BUSY       0
   CFGFN
   CHANGED
   DEF        https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486 60
   Interval   60
   LASTSEND   1509659636.00995
   LastAuthTry 2017-11-02 22:52:56
   MainURL    https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       H2O_Anlage
   NR         10453
   STATE      ???
   TRIGGERTIME 1509659696.00928
   TRIGGERTIME_FMT 2017-11-02 22:54:56
   TYPE       HTTPMOD
   addr       https://wifi.ecowater.com:443
   buf
   code       200
   conn
   data
   displayurl https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   header     Cookie: ASP.NET_SessionId=xvx3sdezzldu2pyucqau51ta
   host       wifi.ecowater.com
   httpheader HTTP/1.1 200 OK
 
Cache-Control: private, s-maxage=0
 
Content-Type: text/html; charset=utf-8
 
Server: Microsoft-IIS/8.5
 
X-AspNetMvc-Version: 5.2
 
X-AspNet-Version: 4.0.30319
 
X-Powered-By: ASP.NET
 
Date: Thu, 02 Nov 2017 21:53:42 GMT
 
Connection: close
 
Content-Length: 31702
   httpversion 1.0
   hu_blocking 0
   hu_filecount 930
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   protocol   https
   redirects  0
   sid        ASP.NET_SessionId=xvx3sdezzldu2pyucqau51ta
   timeout    2
   url        https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data
     header     Cookie: $sid
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
     value      0
   sslargs:
Attributes:
   clearSIdBeforeAuth 1
   disable    0
   reAuthRegex (class="login-item"|Bad Request)
   reading01Name VerbrauchHeute
   reading01Regex <h1 id="water_today" </h1>[^0-9]
   requestHeader1 Cookie: $sid
   room       test
   sid01IdRegex (ASP.NET_SessionId[^;;\n]+)
   sid02Data  Email=xxxxmeineMailxxxx&Password=xxxxxxxx&Remember=false
   sid02Header1 Cookie: $sid
   sid02IdRegex Cookie: ([^\n]+)
   sidURL     https://wifi.ecowater.com/Site/Login
   userattr   requestHeader1 requestHeader2 sid01Data sid01Header1 sid01IdRegex sid01IgnoreRedirects:0,1 sid01URL sid02Data sid02Header1 sid02IdRegex sid02URL sidURL
   verbose    5

Und hier auch noch der Log:

[code]2017.11.02 22:53:56 4: H2O_Anlage: GetUpdate called (update)
2017.11.02 22:53:56 4: H2O_Anlage: update timer modified: will call GetUpdate in 60.0 seconds at 2017-11-02 22:54:56
2017.11.02 22:53:56 4: H2O_Anlage: AddToQueue adds update, initial queue len: 0
2017.11.02 22:53:56 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, no data, header Cookie: $sid, retry 0
2017.11.02 22:53:56 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2017.11.02 22:53:56 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=xvx3sdezzldu2pyucqau51ta,
timeout 2
2017.11.02 22:53:56 4: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486
2017.11.02 22:53:56 5: HttpUtils request header:
GET /Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Cookie: ASP.NET_SessionId=xvx3sdezzldu2pyucqau51ta
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.02 22:53:57 4: https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: HTTP response code 200
2017.11.02 22:53:57 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486: Got data, length: 31702
2017.11.02 22:53:57 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private, s-maxage=0
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 02 Nov 2017 21:53:42 GMT
Connection: close
Content-Length: 31702
2017.11.02 22:53:57 4: H2O_Anlage: Read callback: request type was update retry 0,
Header: HTTP/1.1 200 OK
Cache-Control: private, s-maxage=0
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 02 Nov 2017 21:53:42 GMT
Connection: close
Content-Length: 31702,
Body:
<!DOCTYPE html>

<html>
<head>
    <title>Dashboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='shortcut icon' href="/Content/img/favicon.ico" type='image/x-icon'/>

<!--CSS STYLES-->
   
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
    <link href="/Content/css/jquery-ui-1.91.custom.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/chosen.min.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/datepicker3.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/main.min.css?8.23.2017.3" rel="stylesheet" type="text/css">
   

<!--JAVASCRIPT-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
    <script src="/Scripts/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    <script src="/Scripts/chosen.jquery.min.js"></script>
    <script src="/Scripts/ion.rangeSlider.min.js"></script>
    <script src="/Scripts/Chart.min.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Scripts/bootstrap-datepicker.js"></script>
    <script src="/Scripts/main.js"></script>

   

</head>
<body>



<!--TOP FIXED NAVIGATION-->
    <div id="header" class="navbar navbar-default navbar-fixed-top system-page-unshared" role="navigation">
        <div class="nav-container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".sidebar-offcanvas" data-canvas="body">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-logo" href="/Customer/List">
                    <img src="/Content/img/mobile_logo.png" />
                </a>
                <a class="navbar-home" href="/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486">
                    <img src="/Content/img/mobile_home.png" />
                </a>
            </div>
            <div id="language" class="language-lg">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
        </div>
        <div id="global" class="global-lg">
            <ul class="nav navbar-nav navbar-right navbar-custom">
                <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
                <li id="global-account" ><a href="/Customer/Account/xxxxmeineMailxxxx">xxxxmeineMailxxxx</a></li>
                <li id="global-logout"><a class="logout-btn" href="/Site/Logout">Logout</a></li>
            </ul>
        </div>
    </div>
<!--END TOP FIXED NAVIGATION-->

    <div id="wrapper" class="row row-offcanvas row-offcanvas-left">
       
    <!--OFF CANVAS MENU-->
        <div id="navigation-sm" class="sidebar-offcanvas">
            <div id="language" class="language-sm">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
            <h4 id="global-title">My Account</h4>
            <div id="global">
                <ul>
                    <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
                    <li id="global-account" ><a href="/Customer/Account/xxxxmeineMailxxxx/AC000W000028486">xxxxmeineMailxxxx</a></li>
                    <li id="global-logout"><a class="logout-btn" href="/Site/Logout">Logout</a></li>
                </ul>
            </div>
                    <h4 id="device-title">Customer's Account</h4>
            <div id="device" class="device-sm">
                <ul>
                    <li><a id="customer-id-name" href="/Customer/Account/xxxxmeineMailxxxx/AC000W000028486">Waldemar  Preis </a></li>
                    <li id="device-select">
                        <span id="device-id-nickname">Select a system</span>
                    </li>
                    <li>
                        <ul id="device-list">
                            <li class="title">
                                ———   Systems   ———
                            </li>
                                <li class="shared" onclick="window.location = '/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486';">
                                    <span id="AC000W000028486-nickname">ho2-Rimpar</span>
                                    <span id="AC000W000028486-dsn">AC000W000028486</span>
                                </li>
                        </ul>
                    </li>
                    <li  class="device-page"><a id="device-support" href="/Support/Index/xxxxmeineMailxxxx/AC000W000028486">
                        <img src="/Content/img/device_support.png">Support</a>
                    </li>
                    <li class="device-page"><a id="device-settings" href="/Settings/Basic/xxxxmeineMailxxxx/AC000W000028486">
                        <img src="/Content/img/device_settings.png">Settings</a>
                    </li>
                    <li class="device-page"><a id="device-alerts" href="/Alerts/Index/xxxxmeineMailxxxx/AC000W000028486">
                        <img src="/Content/img/device_alert.png">Alerts</a>
                    </li>
                    <li class="device-page"><a id="device-home" href="/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486">
                        <img src="/Content/img/device_home.png">Dashboard</a>
                    </li>
                </ul>
            </div>
        </div>
    <!--END OFF CANVAS MENU-->

        <div id="page" class="container system-page-unshared">

            <img id="page-logo" src="/Content/img/EcoWater_Logo.png" /><br><br>
            <h2 id="page-title">
                    <span id="device-id-nickname">ho2-Rimpar</span>
                    <span id="device-id-dsn">AC000W000028486</span>
               
            </h2>

           

           


            <div class="content-wrapper">


<div id="navigation-lg">
    <div id="device" class="device-lg">
        <ul>
            <li>
                <a id="customer-id-name" href="/Customer/Account/xxxxmeineMailxxxx/AC000W000028486">Waldemar  Preis </a>
            </li>
                <li id="device-select">
                    <span class="device-nickname">Select a system</span>
                    <ul id="device-list">
                        <li class="title">
                            ———   Systems   ———
                        </li>
                        <li class="shared" onclick="window.location = '/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486';">
                            <span id="device-id-nickname">ho2-Rimpar</span>
                            <span id="device-id-dsn">AC000W000028486</span>
                        </li>
                    </ul>
                </li>
                    <li  class="device-page"><a id="device-support" href="/Support/Index/xxxxmeineMailxxxx/AC000W000028486">
                <img src="/Content/img/device_support.png">Support</a>
            </li>
                    <li class="device-page"><a id="device-settings" href="/Settings/Basic/xxxxmeineMailxxxx/AC000W000028486">
                <img src="/Content/img/device_settings.png">Settings</a>
            </li>
                    <li class="device-page"><a id="device-alerts" href="/Alerts/Index/xxxxmeineMailxxxx/AC000W000028486">
                <img src="/Content/img/device_alert.png">Alerts</a>
            </li>
                    <li class="device-page"><a id="device-home" href="/Dashboard/Index/xxxxmeineMailxxxx/AC000W000028486">
                <img src="/Content/img/device_home.png">Dashboard</a>
            </li>
        </ul>
    </div>
</div>
               

<div id="section" class="dashboard">
    <div id="section-navigation">
        <div id="recharge-disabled-message" class="alert alert-danger hidden">Regeneration on this system has been disabled. Please contact your dealer to have regenerations enabled.</div>
        <ul class="dashboard">
           


<li class="recharge ">
    <a data-toggle="modal" data-target="#modal-rechargeNow"><img src="/Content/img/icon_refresh.png"/>Recharge Now</a>
</li>
   
<li>
    <script type="text/javascript">
        $('#device-info-lastRecharge').html('Yesterday');
    </script>

        <script type="text/javascript">$('#device-info-nextRecharge').html('Not Scheduled');</script>

        <script type="text/javascript">$('#recharge-disabled-message').addClass('hidden');</script>

</li>

<li class="recharge ">
    <a data-toggle="modal" data-target="#modal-rechargeSchedule"><img src="/Content/img/icon_timer.png"/>Schedule Recharge</a>
</li>



        </ul>
        <ul class="info-block">
            <li>
                <h2 id="#device-id-nickname">ho2-Rimpar</h2>
            </li>
            <li>DSN: <span id="device-id-d=sn">AC000W000028486</span></li>
            <li><strong>Model: <span id="device-id-model">GREENLINE 110</span></strong></li>
            <li>Status: <span id="device-info-status">Online</span></li>

                <li>Out of Salt Date: <span id="device-info-saltDate">19/02/2018</span></li>

            <li>Last Recharge: <span id="device-info-lastRecharge">Yesterday</span></li>

                <li>Scheduled Recharge: <span id="device-info-nextRecharge">Not Scheduled</span></li>
        </ul>
                <div class="salt-level">
                    <label for="salt-level">Current Salt Level</label>
                    <input id="SaltLevelCurrent" name="SaltLevelCurrent" type="hidden" value="4" />
                    <input data-val="true" data-val-number="The field SaltLevel must be a number." data-val-required="The SaltLevel field is required." id="SaltLevel" name="SaltLevel" type="hidden" value="4" />
                    <script type="text/javascript">
                        $("#SaltLevel").ionRangeSlider({
                            min: '0',
                            max: '8',
                            from: '4',
                            onStart: function () { $('#SaltLevel').data('adjusting', true); },
                            onFinish: function () { $('#SaltLevel').data('adjusting', false); $('#modal-saltChange').modal('show'); }
                        });
                    </script>
                </div>
    </div>

    <div id="section-content">

        <div id="section-title">
    <h1>Dashboard</h1>
    <h5>
        <span id="device-id-nickname">ho2-Rimpar</span>
        <span id="device-id-dsn">AC000W000028486</span>
        <span id="device-id-model">GREENLINE 110</span>
    </h5>
</div>

        <div id="system_offline" class="alert alert-danger dashboard-alert">
            <button type="button" class="close" onclick="$(this).parent().removeClass('show');"><span aria-hidden="true">×</span></button>
            This system is currently offline.
        </div>
        <div id="refresh_paused" class="alert alert-info dashboard-alert">
            Refresh paused
            <a class="btn-primary" onclick="updateFrequentData();" aria-label="Resume">Resume</a>
        </div>
        <div id="metrics" class="metrics">
            <ul>
                <li class="metrics-column">
                    <h1 id="water_today" class="less">238</h1>
                    <h2 class="volume">Liters</h2>
                    <h3>Used Today</h3>
                </li>
                <li class="metrics-column">
                    <h1 id="water_avg">367</h1>
                    <h2 class="volume">Liters</h2>
                    <h3>Daily Average</h3>
                </li>
                <li class="metrics-column">
                        <h1 id="water_avail">1851</h1>
                        <h2 class="volume">Liters</h2>
                        <h3>Available</h3>
                </li>
            </ul>
        </div>
        <div id="canvas-holder1">
            <ul class="canvas-items">
                <li class="canvas-label">
                    <select id="chart-title" onchange="updateGraph();">
                        <option value="usage">Water Usage</option>
                        <option value="flow">Water Flow</option>
                    </select>
                </li>
                <li class="canvas-label">
                    <select id="graph_by" onchange="updateGraph();">
                        <option value="day">By Day</option>
                        <option value="week" selected="selected">By Week</option>
                        <option value="month">By Month</option>
                        <option value="year">By Year</option>
                    </select>
                </li>
                <li class="canvas-label">
                    <div class="input-daterange input-group" id="datepicker">
                        <span class="input-group-addon">For</span>
                        <input type="text" id="startDate" class="form-control" />
                       
                    </div>
                </li>
                <li>
                    <ul class="pagination">
                        <li id="graph_prev" onclick="adjustGraph(false);"><a aria-label="Previous"><span aria-hidden="true">«</span></a></li>
                        <li id="graph_next" onclick="adjustGraph(true);"><a aria-label="Next"><span aria-hidden="true">»</span></a></li>
                        <li id="graph_update" class="page-submit" onclick="updateGraph();">
                            <a aria-label="Load"><span aria-hidden="true">Go</span></a>
                            <img class="loading-spinner hidden" src="/Content/img/spinner.gif" />
                        </li>
                    </ul>
                </li>
            </ul>
            <div id="graph">
                <div class="usage">Liters</div>
                <div class="flow">LPM</div>
                <canvas id="canvas"></canvas>
            </div>
        </div>
    </div>
</div>

<!--////////////////// MODALS ////////////////-->

<div class="modal fade" id="modal-saltChange" tabindex="-1" role="dialog" aria-labelledby="modal-saltChange" aria-hidden="true">
    <div class="modal-dialog">
        <form class="modal-content">
            <div class="modal-header">
                <h2>Are you sure you want to change the salt level?</h2>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn-default btn-left" data-dismiss="modal" onclick="resetSaltLevel();">No</button>
                <button type="button" class="btn-primary btn-right" onclick="setSaltLevel();">Yes</button>
            </div>
        </form>
    </div>
</div>

<div class="modal fade" id="modal-rechargeNow" tabindex="-1" role="dialog" aria-labelledby="modal-rechargeNow" aria-hidden="true">
    <div class="modal-dialog">
        <form class="modal-content">
            <div class="modal-header">
                <h2>Are you sure you want to recharge now?</h2>
            </div>
            <div class="modal-body">This action can not be cancelled.</div>
            <div class="modal-footer">
                <button type="button" class="btn-default btn-left" data-dismiss="modal">No</button>
                <button type="button" class="btn-primary btn-right" onclick="rechargeNow();">Yes</button>
            </div>
        </form>
    </div>
</div>

<div class="modal fade" id="modal-cancelRecharge" tabindex="-1" role="dialog" aria-labelledby="modal-rechargeNow" aria-hidden="true">
    <div class="modal-dialog">
        <form class="modal-content">
            <div class="modal-header">
                <h2>Are you sure you want to cancel this recharge?</h2>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn-default btn-left" data-dismiss="modal">No</button>
                <button type="button" class="btn-primary btn-right" onclick="cancelRecharge();">Yes</button>
            </div>
        </form>
    </div>
</div>

<div class="modal fade" id="modal-rechargeSchedule" tabindex="-1" role="dialog" aria-labelledby="modal-rechargeSchedule" aria-hidden="true">
    <div class="modal-dialog">
        <form class="modal-content">
            <div class="modal-header">
                <h2>Are you sure you want to schedule a recharge for later?</h2>
            </div>
            <div class="modal-body">The time of this recharge is set by your device settings.</div>
            <div class="modal-footer">
                <button type="button" class="btn-default btn-left" data-dismiss="modal">No</button>
                <button type="button" class="btn-primary btn-right" onclick="scheduleRecharge();">Yes</button>
            </div>
        </form>
    </div>
</div>

<div class="modal fade" id="modal-alert" tabindex="-1" role="dialog" aria-labelledby="modal-alert" aria-hidden="true">
    <div class="modal-dialog">
        <form class="modal-content">
            <div class="modal-header">
                <h2 id="modal-alert-title"></h2>
            </div>
            <div id="modal-alert-message" class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn-default" data-dismiss="modal">Ok</button>
            </div>
        </form>
    </div>
</div>





            </div>

        </div>

    <!--////////////////// BACKGROUND ////////////////-->

        <div id="background">
            <img id="background-left" src="/Content/img/ecowater_background_left.png" />
            <img id="background-right" src="/Content/img/ecowater_background_right.png" />
        </div>

    <!--////////////////// FOOTER ////////////////-->

        <div class="subfooter">
            <p>©2014 EcoWater Systems LLC | 1-800-86WATER | <a class="special" href="http://www.ecowater.com">ecowater.com</a> | <a class="special" href="http://www.ecowater-europe.com">ecowater-europe.com</a></p>
        </div>

    </div>

    <script type="text/javascript">
        $(".device-sm #device-select").click(function () {
            $(".device-sm #device-list").slideToggle('fast');
        });
        $(".device-lg #device-select").click(function () {
            $(".device-lg #device-list").slideToggle('fast');
        });
        $("#section select, .chosen").chosen({
            disable_search_threshold: 10,
            search_contains: true
        });
        function setCulture(culture) {
            window.location = '/Site/SetCulture' + '?name=' + culture;
        }
    </script>

   

    <!--////////////////// GRAPH ////////////////-->
    <script type="text/javascript">
        $('#datepicker #startDate').datepicker({
            format: 'dd/mm/yyyy',
            todayBtn: 'linked',
            autoclose: true
        }).on('changeDate', function () {
            updateGraph($(this).datepicker('getDate'));
        });

        function adjustGraph(inc) {
            var date = $('#datepicker #startDate').datepicker('getDate');
            var graph_by = $('#graph_by').val();
            switch (graph_by) {
                case "day": date.setDate(date.getDate() + (inc ? 1 : -1)); break;
                case "week": date.setDate(date.getDate() + (inc ? 7 : -7)); break;
                case "month": date.setMonth(date.getMonth() + (inc ? 1 : -1)); break;
                case "year": date.setFullYear(date.getFullYear() + (inc ? 1 : -1)); break;
            }
            $('#datepicker #startDate').datepicker('setDate', date);
        }
        function newGraph(labels, data) {
            if (window.lineGraph != null) {
                window.lineGraph.destroy();
                window.lineGraph = null;
            }
            if (window.lineGraph == null) {
                var chartData = {
                    labels: labels,
                    datasets: [{
                        label: $('#chart-title').val(),
                        fillColor: "rgba(151,187,205,0.2)",
                        strokeColor: "rgba(151,187,205,1)",
                        pointColor: "rgba(151,187,205,1)",
                        pointStrokeColor: "#fff",
                        pointHighlightFill: "#fff",
                        pointHighlightStroke: "rgba(220,220,220,1)",
                        data: data
                    }]
                };
                var ctx = document.getElementById("canvas").getContext("2d");
                window.lineGraph = new Chart(ctx).Line(chartData, { responsive: true, animationSteps: 30, scaleBeginAtZero: true });
            }
        }
        function addGraphPoint(label, value) {
            if (window.lineGraph == null || window.lineGraph.datasets[0].label != $('#chart-title').val()) {
                newGraph(['', '', '', '', '', '', '', '', '', '', ''], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
                window.lineGraph.last_label = null;
            }
            if (label == window.lineGraph.last_label) {
                label = "";
            } else {
                window.lineGraph.last_label = label;
            }
            window.lineGraph.removeData();
            window.lineGraph.addData([value], label);
        }
        function updateGraph(date) {
            var url = null;
            var data = null;
            var graph_type = $('#chart-title').val();
            $('#graph div').hide().filter('.' + graph_type).show();
            if (graph_type == "flow") {
                $('#graph_by_chosen, #datepicker, #graph_prev, #graph_next, #graph_update').css({ 'pointer-events': 'none', 'opacity': 0.5 });
                addGraphPoint("", 0);
            } else {
                $('#canvas-holder1 .loading-spinner').removeClass('hidden');
                $('#graph_by_chosen, #datepicker, #graph_prev, #graph_next, #graph_update').css({ 'pointer-events': 'all', 'opacity': 1 });
                if (date == null) date = $('#datepicker #startDate').datepicker('getDate');
                var graph_by = $('#graph_by').val();
                url = '/Dashboard/GraphBy';
                data = { by: graph_by, date: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(), dsn: 'AC000W000028486' };
            }
            if (url != null) {
                $.ajax({
                    url: url,
                    data: data,
                    success: function (result) {
                        if (result.success != false) {
                            newGraph(result.labels, result.data);
                        }
                    },
                    complete: function () {
                        $('#canvas-holder1 .loading-spinner').addClass('hidden');
                    }
                });
            }
        }
        $(function () {
            var now = new Date();
            now.setHours(0);
            now.setMinutes(0);
            now.setSeconds(0);
            now.setMilliseconds(0);
            $('#datepicker #startDate').datepicker('setDate', now);
        });
    </script>

    <script type="text/javascript">

        function showAlertModal(title, message) {
            $('#modal-alert-title').html(title);
            $('#modal-alert-message').html(message);
            $('#modal-alert').modal('show');
        }
        function doRechargeAction(action, modal) {
            $.ajax({
                type: 'POST',
                url: action,
                data: { dsn: 'AC000W000028486' },
                success: function (result) {
                    if (result.success == false) {
                        //an error ocurred
                    } else {
                        $('#section-navigation .dashboard li:not(.access)').detach();
                        $('#section-navigation .dashboard').prepend(result);
                        $('#' + modal).modal('hide');
                    }
                },
                error: function (result) {
                    $('#' + modal).modal('hide');
                    showAlertModal('Unable to communicate with EcoWater services.', '');
                }
            });
        }
        function rechargeNow() {
            doRechargeAction('/Dashboard/RechargeNow', 'modal-rechargeNow');
        }
        function scheduleRecharge() {
            doRechargeAction('/Dashboard/ScheduleRecharge', 'modal-rechargeSchedule');
        }
        function cancelRecharge() {
            doRechargeAction('/Dashboard/CancelRecharge', 'modal-cancelRecharge');
        }
        function resetSaltLevel() {
            $('#SaltLevel').data("ionRangeSlider").update({ from: $('#SaltLevelCurrent').val() });
        }
        function setSaltLevel() {
            var level = $("#SaltLevel").val();
            $('#device-info-saltDate').append('<img class="loading-spinner" src="/Content/img/spinner_dashboard.gif" />');
            $('#modal-saltChange').modal('hide');
            $.ajax({
                type: 'POST',
                url: '/Dashboard/SetSaltLevel',
                data: { level: level, dsn: 'AC000W000028486' },
                success: function (result) {
                    $('#SaltLevelCurrent').val(result.salt_level);
                    $('#SaltLevel').data("ionRangeSlider").update({ from: result.salt_level });
                    $('#device-info-saltDate').html(result.out_of_salt);
                },
                error: function () {
                    $('#device-info-saltDate img').detach();
                    $('#SaltLevel').data("ionRangeSlider").update({ from: level });
                    showAlertModal('Unable to communicate with EcoWater services.', '');
                }
            });
        }

        function updateFrequentData() {
            var spinners = $('#metrics .loading-spinner').removeClass('hidden');
            $('#refresh_paused').removeClass('show');
            $('#system_offline').removeClass('show');
            clearTimeout(window.next_freq_data);
            if (window.update_freq_data == null) {
                window.update_freq_data = $.ajax({
                    type: 'POST',
                    url: '/Dashboard/UpdateFrequentData',
                    data: { dsn: 'AC000W000028486' },
                    success: function (result) {
                        window.update_freq_data = null;
                        if (result.success == false) {
                            $('#refresh_paused').addClass('show');
                            spinners.addClass('hidden');
                            window.begin_freq_data = null;
                        } else {
                            $('#system_offline').toggleClass('show', !result.online);
                            $('#device-info-status').html(result.online ? 'Online' : 'Offline');
  &n
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 23:15:03
Ouch! Bitte die Log auch in code tags! ;)
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 23:18:03
Deine Regex geht nicht. Teste mal auf https://regex101.com
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 02 November 2017, 23:20:50
Probier mal mit water_today".*?>([\d]+)
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 03 November 2017, 12:40:38
 ;D Jetzt sind wir drin!!!

2017.11.03 10:56:22 5: H2O_Anlage: ExtractSid called, context reading, num
2017.11.03 10:56:22 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex (class="login-item"|Bad Request)
2017.11.03 10:56:22 4: H2O_Anlage: CheckAuth decided no authentication required
2017.11.03 10:56:22 5: H2O_Anlage: Read starts parsing response to update with defined readings: 01,02,03,04
2017.11.03 10:56:22 5: H2O_Anlage: ExtractReading VerbrauchHeute with regex /<h1 id="water_today".*?>([\d]+)/...
2017.11.03 10:56:22 5: H2O_Anlage: 1 capture group(s), matchlist = 113
2017.11.03 10:56:22 4: H2O_Anlage: ExtractReading for reading01-1 sets VerbrauchHeute to 113
2017.11.03 10:56:22 5: H2O_Anlage: ExtractReading Tagesdurchschnitt with regex /<h1 id="water_avg".*?>([\d]+)/...
2017.11.03 10:56:22 5: H2O_Anlage: 1 capture group(s), matchlist = 359
2017.11.03 10:56:22 4: H2O_Anlage: ExtractReading for reading02-1 sets Tagesdurchschnitt to 359
2017.11.03 10:56:22 5: H2O_Anlage: ExtractReading Verfügbar with regex /<h1 id="water_avail".*?>([\d]+)/...
2017.11.03 10:56:22 5: H2O_Anlage: 1 capture group(s), matchlist = 1324
2017.11.03 10:56:22 4: H2O_Anlage: ExtractReading for reading03-1 sets Verfügbar to 1324
2017.11.03 10:56:22 5: H2O_Anlage: ExtractReading Salzstand with regex /<span class="irs-single".*?>([\d]+)/...
2017.11.03 10:56:22 5: H2O_Anlage: ExtractReading Salzstand did not match
2017.11.03 10:56:22 4: H2O_Anlage: Read response to update matched Reading(s) VerbrauchHeute Tagesdurchschnitt Verfügbar
2017.11.03 10:56:22 4: H2O_Anlage: Read response to update did not match Salzstand
2017.11.03 10:56:22 5: H2O_Anlage: HandleSendQueue called, qlen = 0

Das einzige Problem beim auslesen der Daten, was mir noch aufgefallen ist, dass die erst an etwa 5-10 sec nach dem Login von der Anlage abgeholt werden. Aktuell wird dann immer der alte Wert ausgelesen. Erst wenn ich mich selbst auf die Seite im Browser einloggen und kurz warte, werden die Werte neu geladen und dann auch wieder von fhem richtig ausgelesen. Können wir da noch eine Wartezeit einsetzten, oder so.

Ich komme auch noch mit diesen beiden Werten nicht zurecht wie ich sie auslesen soll?

<span class="irs-single" style="left: 45.56575%;">4</span>
<span id="device-info-saltDate">19.02.2018</span>
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 03 November 2017, 13:19:10
Zitat
Erst wenn ich mich selbst auf die Seite im Browser einloggen und kurz warte, werden die Werte neu geladen und dann auch wieder von fhem richtig ausgelesen. Können wir da noch eine Wartezeit einsetzten, oder so.
Wenn diese Verzögerung zwischen Zähler und ecowater.com passiert, weiss ich nicht, wie es zu lösen. Vielleicht könnte man den HTTP Trafic vom Browser analysieren, und feststellen, was evtl. vom Browser ausgelöst wird, um ein Refresh zu zwingen. Da kann ich aber selbst nicht testen.

device-info-saltDate.*?>([\d\/\.]+) sollte gehen. (es kann sein, dass Fhem die Daten in einer andere Sprache holt, dann wird es nicht 19.02.2018 sondern 19/02/2018 sein... mal sehen.

Wegen irs-single, sehe ich die Daten in keinem Logauszug zum prüfen. Deine Regex sieht aber gut aus, wenn das genau ist wie du es geschrieben hast. Interessant wäre den Wert in der fhem Log zu finden. Vielleicht kannst Du die Regex zu kürzen:
irs-single".*?>([\d]+)
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 03 November 2017, 18:43:06
Wenn es nich anders geht könnte ich dir meine zugangsdaten einmal zukommen lassen, so dass du es mal testen kannst?
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 09:34:44
Hallo liebe Fhem´ler,
ich habe zu dem gleichen Thema eine Frage:
Und zwar möchte ich auch etwas auslesen auf einer Seite (myTischtennis), die ein Login verlangt.
Ich habe von einem Kollegen eine in Perl geschriebene Anmeldefunktion erhalten.
Diese Funktioniert auch, denn er nutzt diese Außerhalb von FHEM.

Wie kann ich eine in Perl geschriebene Funktion nun in fhem bzw HTPMOD einbinden?
Ich weiß von besagtem Kollegen, dass für den Login ein Cockie nachgebildet werden musste.
Ich habe selber leider wenig Ahnung =(

Hier die Login Funktion:
function login($url, $data)
   {
      $fp = fopen("cookie.txt", "w");
      fclose($fp);
      $login = curl_init();
      $cookiePath = dirname(__FILE__) . "\\cookie.txt";

      curl_setopt($login, CURLOPT_TIMEOUT, 4000000000);
      curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE);
      curl_setopt($login, CURLOPT_COOKIE, 'CFID=c7a592d8-5798-4471-9af4-4c4d954d03cd; cfid=c7a592d8-5798-4471-9af4-4c4d954d03cd; MYTT_COOKIESOK=1; CFTOKEN0=; cftoken=0; SRV=74');
      curl_setopt($login, CURLOPT_COOKIEFILE, $cookiePath);
      curl_setopt($login, CURLOPT_COOKIEJAR, $cookiePath);
      curl_setopt($login, CURLOPT_URL, $url);
      curl_setopt($login, CURLOPT_HTTPHEADER, array('Accept-Encoding: gzip'));
      curl_setopt($login, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17');
      curl_setopt($login, CURLOPT_FOLLOWLOCATION, 1);
      curl_setopt($login, CURLOPT_AUTOREFERER, true);
      curl_setopt($login, CURLOPT_POST, TRUE);
      curl_setopt($login, CURLOPT_POSTFIELDS, $data);
      curl_setopt($login, CURLOPT_VERBOSE, 1);
      ob_start();
      $curl_exec = curl_exec($login);
      ob_end_clean();
      $content = @gzdecode($curl_exec);
      return $content !== false ? $content : $curl_exec;
   }

Lg Matze
Titel: Antw:HTTPMOD Login
Beitrag von: EinEinfach am 07 November 2017, 10:00:07
Zitat
Wie kann ich eine in Perl geschriebene Funktion nun in fhem bzw HTPMOD einbinden?

Ich kann dir nur diesen WIKI-Artikel ans Herz legen:
https://wiki.fhem.de/wiki/HTTPMOD (https://wiki.fhem.de/wiki/HTTPMOD)

Dort findest alles was der HTTPMOD-Modul kann, einschließlich wie man Log-In-Sequenzen erstellt bzw. Handling mit Cookies. Musst du einwenig fummeln bzw. mit Burp-Suite lauschen was dein Browser macht, aber ich denke komplett ohne PERL-Kentnisse bzw. dem Quellcode von deinem Kollegen lösbar.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 10:18:17
Erstmal danke für deine Hinweise.

Wäre ja auch zu schön gewesen, einfach den Quellcode benutzen zu können.
Ich hatte ein wenig die Hoffnung, dass jemand anhand des Quellcodes die Anmeldeprozedur erkennen kann.

Die Seite die du mir geschickt hast, ist recht umfangreich. Dort stehen ja einige unterschiedliche Anmeldeprozeduren.
Kannst du mir ggf einen Tipp geben an welche ich mich halten muss?

Lg Matze
Titel: Antw:HTTPMOD Login
Beitrag von: EinEinfach am 07 November 2017, 10:22:51
Leider nicht, ich kenne die Seite nicht, wo die gewünschten Daten gespeichert sind. Aber wie gesagt, lausch erstmal mit burp-Suite was dein Browser während der Anmeldung macht, dann hast du schon mal einen Ansatz.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 11:06:05
Ok, mit Burp Suite konnte ich schonmal den Login beobachten...

Sehe ich das richtig, dass ich nun mit verschiedenen Readings versuchen muss die cfid und cookie id in Fhem einzulesen?
Das wäre doch jetzt mein erster Schritt oder?

Hier mein Auszug vom Login (mit Burp Suite abgefangen):
POST /community/login HTTP/1.1
Host: www.mytischtennis.de
Content-Type: application/x-www-form-urlencoded
Origin: https://www.mytischtennis.de
Accept-Encoding: gzip, deflate
Accept-Encoding: gzip, deflate
Cookie: ISPREMIUM=%248%5C%24%2CF0%20%20%0A;
LOGGEDINAS=Vorname%20Nachname;
INTANALYTICS=s=1510048001088&r=https%3A//www.mytischtennis.de/community/login;
SRV=82;
ISPREMIUM=%248%5C%24%2CF0%20%20%0A;
LOGGEDINAS=Vorname%20Nachname;
cfid=9e108b94-22c9-4e43-be02-669c47c52744;
cftoken=0;
__utma=74314254.1984056961.1473454699.1510046084.1510048518.145;
__utmb=74314254.1.10.1510048518;
__utmc=74314254;
__utmt=1;
__utmz=74314254.1496401155.113.28.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided);
__gads=ID=1fc611a5fd63261b:T=1473675881:S=ALNI_MYkBV2oNCHMZbzJCDrAa-rNkMrEzQ
Connection: close

userNameB=UserName&userPassWordB=Passwort
Titel: Antw:HTTPMOD Login
Beitrag von: EinEinfach am 07 November 2017, 11:33:28
Nein, das einlesen der Readings macht für dich HTTPMOD. Du solltest mit burp-Suite rausfinden welche POST bzw. GET-Requests (URL, Header und Daten) schickt dein Browser an die Seite. Diese verpackst du in die dazu vorgesehenen Attribute des HTTPMOD-Moduls.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 11:45:05
Nein, das einlesen der Readings macht für dich HTTPMOD. Du solltest mit burp-Suite rausfinden welche POST bzw. GET-Requests (URL, Header und Daten) schickt dein Browser an die Seite. Diese verpackst du in die dazu vorgesehenen Attribute des HTTPMOD-Moduls.
Also ist das was ich bislang von Burp Suits erhalten habe nicht brauchbar?
Mehr erhalte ich leider nicht, da die Anmeldung nicht komplett durch läuft solange der Proxy eingeschaltet ist.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 12:26:54
Ok also ich habe das jetzt mal ein wenig mit dem Beispiel aus diesem Thread verglichen...
Folgendes habe ich jetzt in FHEM angelegt:

Internals
BUSY 0
CFGFN CHANGED
DEF https://www.mytischtennis.de/community/ 60
Interval 60
LASTSEND 1510054242.72836
MainURL https://www.mytischtennis.de/community/
ModuleVersion 3.4.0 - 9.9.2017
NAME myTischtennis
NR 87525
STATE ???
TRIGGERTIME 1510054302.71991
TRIGGERTIME_FMT 2017-11-07 12:31:42
TYPE HTTPMOD
addr https://www.mytischtennis.de:443
buf
code 200
conn
data
displayurl https://www.mytischtennis.de/community/
header Cookie: $sid
host www.mytischtennis.de
httpheader HTTP/1.1 200 OK Content-Type: text/html;charset=UTF-8 Content-Language: de-DE Server: Microsoft-IIS/7.5 Content-Length: 0 Accept-Ranges: bytes Date: Tue, 07 Nov 2017 11:30:43 GMT X-Varnish: 1556939965 Age: 0 Via: 1.1 varnish Connection: close X-Cache: Miss Set-Cookie: SRV=82; path=/
httpversion 1.0
hu_blocking 0
hu_filecount 85
hu_port 443
hu_portSfx
ignoreredirects 0
loglevel 4
path /community/
protocol
https
redirects 0
timeout 2
url https://www.mytischtennis.de/community/
value 0

Attributes
clearSIdBeforeAuth 1
disable 0
reAuthRegex (class="login-item"|Bad Request)
requestHeader1 Cookie: $sid
sid01IdRegex (cfid[^;\n]+)
sid02Data userNameB=MeinUser& userPassWordB=MeinPasswort&Remember=false
sid02IdRegex Cookie: ([^\n]+)
sidURL https://www.mytischtennis.de/community/
userattr requestHeader1 requestHeader2 sid01Data sid01Header1 sid01IdRegex sid01IgnoreRedirects:0,1 sid01URL sid02Data sid02Header1 sid02IdRegex sid02URL sidURL
verbose 5

Im Log von FHEM erhalte ich:
2017.11.07 12:24:28 4: https://www.mytischtennis.de/community/: HTTP response code 200
2017.11.07 12:24:28 4: HttpUtils https://www.mytischtennis.de/community/: Got data, length: 0
2017.11.07 12:24:28 5: HttpUtils response header:
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 07 Nov 2017 11:24:28 GMT
X-Varnish: 1556930775
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss
Set-Cookie: SRV=82; path=/
2017.11.07 12:24:28 4: myTischtennis: Read callback: request type was update retry 0,
Header: HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 07 Nov 2017 11:24:28 GMT
X-Varnish: 1556930775
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss
Set-Cookie: SRV=82; path=/, body empty
2017.11.07 12:24:28 5: myTischtennis: ExtractSid called, context reading, num
2017.11.07 12:24:28 5: myTischtennis: CheckAuth is checking buffer with ReAuthRegex (class="login-item"|Bad Request)
2017.11.07 12:24:28 4: myTischtennis: CheckAuth decided no authentication required
2017.11.07 12:24:28 5: myTischtennis: Read starts parsing response to update with defined readings:
2017.11.07 12:24:28 3: myTischtennis: Read response to update didn't match any Reading
2017.11.07 12:24:28 5: myTischtennis: HandleSendQueue called, qlen = 0
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 12:32:21
Wenn es nich anders geht könnte ich dir meine zugangsdaten einmal zukommen lassen, so dass du es mal testen kannst?

Sorry, hatte das Thema vergessen. Dank mazze aber wieder gefunden.
Ja, sowas kannst Du ruhig machen.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 12:35:52
Sorry, hatte das Thema vergessen. Dank mazze aber wieder gefunden.
Ja, sowas kannst Du ruhig machen.
Immer wieder gerne  ;D ;D
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 12:39:09
@mazze2000: m.A. brauchst Du für diese Seite dieses komplizierten Verfahern mit requestHeaders sid01IdRegex & Co nicht. Die built-in Funktion sid/cookie sollte reichen.

Du musst nur in reAuthRegex etwas vernünftiges haben, das feststellen kann, dass ein login benötigt ist
und enableCookie 1 setzen.
und natürlich die richtige sid01Data Daten geben.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 12:52:21
Ok...
Danke für die Hinweise.
So ganz ohne Beispiel ist es schwierig, wenn man nicht 100% verstanden hat was man hier tut.  ;D

Also nehme ich jetzt
requestHeader1 Cookie: $sid
sid01IdRegex (cfid[^;\n]+)
sid02IdRegex Cookie: ([^\n]+)
clearSIdBeforeAuth 1
disable 0

alles wieder raus?

Wie kann ich denn feststellen dass ein Login benötigt wird?  :o
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 12:56:25
probier mal einfach mit:

   enableCookies 1
   reAuthRegex community/login
   sid01Data  userNameB=deinUserName&userPassWordB=deinPasswort
   sid01URL   https://www.mytischtennis.de/community/login
   verbose    5
und der Rest weg.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 13:08:46
Habe mal ein neues Device dafür angelegt:
Folgenden Logeintrag erhalte ich nun:
2017.11.07 13:05:07 4: myTischtennis2: GetUpdate called (update)
2017.11.07 13:05:07 4: myTischtennis2: update timer modified: will call GetUpdate in 60.0 seconds at 2017-11-07 13:06:07
2017.11.07 13:05:07 4: myTischtennis2: AddToQueue adds update, initial queue len: 0
2017.11.07 13:05:07 5: myTischtennis2: AddToQueue adds type update to URL https://www.mytischtennis.de/community/, no data, no headers, retry 0
2017.11.07 13:05:07 5: myTischtennis2: HandleSendQueue called, qlen = 1
2017.11.07 13:05:07 5: myTischtennis2: HandleSendQueue is adding Cookies: SRV=81
2017.11.07 13:05:07 4: myTischtennis2: HandleSendQueue sends request type update to URL https://www.mytischtennis.de/community/, No Data,
header: Cookie: SRV=81,
timeout 2
2017.11.07 13:05:07 4: HttpUtils url=https://www.mytischtennis.de/community/
2017.11.07 13:05:07 5: HttpUtils request header:
GET /community/ HTTP/1.0
Host: www.mytischtennis.de
User-Agent: fhem
Cookie: SRV=81
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.07 13:05:07 4: https://www.mytischtennis.de/community/: HTTP response code 200
2017.11.07 13:05:07 4: HttpUtils https://www.mytischtennis.de/community/: Got data, length: 0
2017.11.07 13:05:07 5: HttpUtils response header:
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 07 Nov 2017 12:05:07 GMT
X-Varnish: 778708016
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss
2017.11.07 13:05:07 4: myTischtennis2: Read callback: request type was update retry 0,
Header: HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 07 Nov 2017 12:05:07 GMT
X-Varnish: 778708016
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss, body empty
2017.11.07 13:05:07 5: myTischtennis2: looking for Cookies in HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 07 Nov 2017 12:05:07 GMT
X-Varnish: 778708016
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss
2017.11.07 13:05:07 5: myTischtennis2: ExtractSid called, context reading, num
2017.11.07 13:05:07 5: myTischtennis2: CheckAuth is checking buffer with ReAuthRegex community/login
2017.11.07 13:05:07 4: myTischtennis2: CheckAuth decided no authentication required
2017.11.07 13:05:07 5: myTischtennis2: Read starts parsing response to update with defined readings:
2017.11.07 13:05:07 3: myTischtennis2: Read response to update didn't match any Reading
2017.11.07 13:05:07 5: myTischtennis2: HandleSendQueue called, qlen = 0

Ich muss doch jetzt aber noch irgendwo definieren was er dann suchen soll oder nicht?
Quellcode Auszug der Seite:
gimmeMoreUrl = 'ajax/_moreTimeLine';
ttrFortimeline = 1583;
ttrTypeString = 'TTR'

Dort soll er dann nach ttrFortimeline suchen und 1583 zurückgeben...
Titel: Antw:HTTPMOD Login
Beitrag von: EinEinfach am 07 November 2017, 13:22:31
Wenn das Login geklappt hat, müssen in dem Device-Internal "buf" schon Daten zu sehen sein.

Siehst du dort von dir gewünschte Readings?
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 13:24:06
Nein, dort ist noch nichts zu sehen...
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 13:26:02
Das Problem ist: du bist immer noch nicht eingeloggt
Zitat
2017.11.07 13:05:07 4: myTischtennis2: CheckAuth decided no authentication required
und HTTPMOD schaltet deswegen nicht zur Login Seite, weil die erste Antwort leer ist.

Ich muss mal selbst testen, aber ich kann von der Arbeit aus nicht wirklich :) Vielleicht heute Abend.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 13:27:29
Wenn du das für mich machen könntest wäre super.
Mach einfach wenn du Zeit hast =)
Viele Dank schonmal!
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 13:49:03
Mach mal ein paar Headers dazu, insbesondere das mit gzip, deflate. Auf meinem Windows Testrechner in der Arbeit, kriege ich krÿptische Antwort (hängt wahrscheinlich an fhem/windows/gzip), aber zumindest eine Antwort, die nicht leer ist:

attr myTischtennis2 requestHeader1 User-Agent: Mozilla/5.0 (Windows NT 10.0;; WOW64;; rv:45.0) Gecko/20100101 Firefox/45.0
attr myTischtennis2 requestHeader2 Accept: text/html,application/xhtml+xml,application/xml;;q=0.9,*/*;;q=0.8
attr myTischtennis2 requestHeader3 Accept-Language: en-GB,en;;q=0.5
attr myTischtennis2 requestHeader4 Accept-Encoding: gzip, deflate
Ansonsten, der Rest heute Abend ;)
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 14:45:38
Also: das geht bei mir mit:
define tennis HTTPMOD https://www.mytischtennis.de/community/ 60
attr tennis enableCookies 1
attr tennis reAuthRegex name="userNameB"
attr tennis requestHeader4 Accept-Encoding: identity
attr tennis sid01Data userNameB=meinUsername&userPassWordB=meinPasswort&targetPage=index?fromlogin=1&goLogin=Einloggen
attr tennis sid01Header4 Accept-Encoding: identity
attr tennis sid01URL https://www.mytischtennis.de/community/login
attr tennis verbose 5

Jetzt musst Du deine reading[0-9]+Name und reading[0-9]+Regex bauen, um die Daten zu holen, die Du als Readings möchtest.

Einzige Anmerkung: wie gesagt funktioniert bei mir (in der Arbeit)
attr tennis requestHeader4 Accept-Encoding: gzip, deflate
attr tennis sid01Header4 Accept-Encoding: gzip, deflate
nicht.

Mit "identity" zwinge ich die Abfrage und die Antwort ohne Komprimierung, was natürlich FHEM (und die Leitung und meine Log und mein Browser) stark belastet. Deswegen empfehle ich ein Test mit "gzip, deflate", es wäre viel besser. Und erst wenn es nicht funktioniert, dann mit "identity".
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 16:11:31
Also mit identity schreibt er mir, wie du es ja schon geschrieben hast, mein Logfile mit dem Inhalt der gewünschten Webseite voll.
Nehme ich das identity raus, ist der ja gezipt und so nicht im Log lesbar.

Mit:
attr myTischtennis readingsName1 TTR
attr myTischtennis readingsRegex1 ttrFortimeline = ([\d]+)

wollte ich meinen TTR Wert (1583) aus der Webseite auslesen. Da scheint er nichts zu finden. Egal ob gezipt oder ungezipt.
Auf der Webseite: https://regex101.com scheint mein Regex zu funktionieren.

Also muss ja doch mein Regex fehlerhaft zu sein...
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 18:16:20
Ich habe selbst keine TTR Daten. Deshalb kann ich nicht testen. Zeig mal das relevante Teil der Log.

Und auch ein "list <dein httpmodDevice>". Die Attribute sollten eigentlich nicht readingsName1 und readingsRegex1 heissen (deprecated), sondern reading1Name und reading1Regex

EDIT: nicht vergessen => anonymisieren!
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 18:21:03
Ich denke das sollte der relevante Teil sein:
2017.11.07 18:19:17 5: myTischtennis2: ExtractSid called, context reading, num
2017.11.07 18:19:17 5: myTischtennis2: CheckAuth is checking buffer with ReAuthRegex name="userNameB"
2017.11.07 18:19:17 4: myTischtennis2: CheckAuth decided no authentication required
2017.11.07 18:19:17 5: myTischtennis2: UpdateReadingList created list of reading.* nums to parse during getUpdate as 1
2017.11.07 18:19:17 5: myTischtennis2: Read starts parsing response to update with defined readings: 1
2017.11.07 18:19:17 5: myTischtennis2: ExtractReading TTR with regex /ttrFortimeline = ([\d]+)/...
2017.11.07 18:19:17 5: myTischtennis2: ExtractReading TTR did not match
2017.11.07 18:19:17 3: myTischtennis2: Read response to update didn't match any Reading
2017.11.07 18:19:17 5: myTischtennis2: HandleSendQueue called, qlen = 0
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 18:41:59
Internals
BUSY 0
CHANGED
DEF https://www.mytischtennis.de/community/ 60
HTTPCookies SRV=82; cfid=fcb61e49-8f35-4a23-8ef9-bade7e289caa; cftoken=0
Interval 60
LASTSEND 1510076097.07451
LastAuthTry 2017-11-07 15:00:50
MainURL https://www.mytischtennis.de/community/
ModuleVersion 3.4.0 - 9.9.2017
NAME myTischtennis2
NR 96
STATE 1
TRIGGERTIME 1510076157.06736
TRIGGERTIME_FMT 2017-11-07 18:35:57
TYPE HTTPMOD
addr https://www.mytischtennis.de:443
buf
code 200
conn
data
displayurl https://www.mytischtennis.de/community/
header Accept-Encoding: gzip, deflate Cookie: SRV=82; cfid=fcb61e49-8f35-4a23-8ef9-bade7e289caa; cftoken=0
host www.mytischtennis.de
httpheader HTTP/1.1 200 OK Content-Encoding: gzip Content-Type: text/html;charset=UTF-8 Content-Language: de-DE Server: Microsoft-IIS/7.5 Content-Length: 13514 Accept-Ranges: bytes Date: Tue, 07 Nov 2017 17:34:58 GMT X-Varnish: 1557465454 Age: 0 Via: 1.1 varnish Connection: close X-Cache: Miss
httpversion 1.0
hu_blocking 0
hu_filecount 221
hu_port 443
hu_portSfx
ignoreredirects 0
loglevel 4
path /community/
protocol https
redirects 0
timeout 2
url https://www.mytischtennis.de/community/
value 0

Attributes
enableCookies 1
reAuthRegex name="userNameB"
readingsName1 TTR
readingsRegex1 ttrFortimeline = ([\d]+)
requestHeader4 Accept-Encoding: gzip, deflate
sid01Data userNameB=USER&userPassWordB=PW&targetPage=index?fromlogin=1&goLogin=Einloggen
sid01Header4 Accept-Encoding: gzip, deflate
sid01URL https://www.mytischtennis.de/community/login
userattr readingsName1 readingsRegex1 requestHeader1 requestHeader2 requestHeader3 requestHeader4 sid01Data sid01Header4 sid01URL sidURL
verbose 5

Bei reAuthRegex name habe ich userNameB drin stehen... oder muss dann da auch direkt der Benutzer rein?
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 07 November 2017, 19:46:15
Ich habe nochmal ein neues Device angelegt. Das ständige rum probieren macht es ja nicht gerade leichter.
Und siehe da: Ich kann jetzt meinen Wert erfolgreich auslesen. Danke schonmal dafür, dass du dir die Zeit genommen hast.

Jedoch kann ich den Wert nur auslesen wenn ich ohne Komprimierung arbeite. Das ist an sich nicht so schlimm. Ein auslesen des Wertes findet ohnehin nur ein mal pro Tag statt. Kann man irgendwie verhindern, dass er mir meinen Log so dermaßen voll schreibt?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 07 November 2017, 22:05:38
Ja, setze wieder verbose auf 1 oder 0
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 09 November 2017, 08:29:54
Also das funktioniert jetzt echt wunderbar.
Ich habe die automatische Abfrage jetzt komplett abgeschaltet und frage den Wert jetzt immer morgens um 5 Uhr ab.
Da die Werte auf der Seite immer über Nacht aktualisiert werden reicht es völlig aus.
Soweit so gut =)

Wenn ich mich jetzt innerhalb der Seite weiter bewegen möchte lege ich doch sid02Data, sid02Header und sid02URL an oder sehe ich das falsch?
Woher weiß das HTTPMOD Modul denn welche Readings zu welcher sid gehören?

Kann ich beispielsweise, wenn ich mir jetzt ein neues Device anlege, diesem HTTPMOD unterschiedliche Data Werte übergeben? Momentan würde ich vermuten ich stelle im HTTMOD keine festen Werte ein sondern Werte aus einem Dummy, die er sich holen soll, ein. Diese Werte im Dummy würde ich dann vor der Abfrage nach belieben setzen. Richtig oder ist da ein Denkfehler drin?

Vielen Dank schonmal =)
Titel: Antw:HTTPMOD Login
Beitrag von: EinEinfach am 09 November 2017, 08:53:13
Zitat
Wenn ich mich jetzt innerhalb der Seite weiter bewegen möchte lege ich doch sid02Data, sid02Header und sid02URL an oder sehe ich das falsch?

Sid brauchst du nur um eine gültige Session herzustellen, also wenn der HTTPMOD sich einmal erfolgreich angemeldet hat, dann brauchst du in der Regele keine weiteren Sid-Attribute.
Um sich weiter innerhalb der Seite zu bewegen kannst du die get Attribute verwenden:
getXName - Getname innerhalb der Fhem-Instanz
getXURL - Eine URL die bei Ausführung des gGet-Befehls aufgerufen wird
getHeader - der zu verwendende Header beim Aufruf

Gruß
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 09 November 2017, 15:00:23
Zitat
Um sich weiter innerhalb der Seite zu bewegen kannst du die get Attribute verwenden:
getXName - Getname innerhalb der Fhem-Instanz
getXURL - Eine URL die bei Ausführung des gGet-Befehls aufgerufen wird
getHeader - der zu verwendende Header beim Aufruf
und auf jeden Fall noch eine passende getXRegex

getXUrl nur wenn Du eine andere Seite (als die von DEF) erreichen willst.
getXHeader.* wenn die von  requestHeader.* nicht reichen.

I.d.R. reichen einfach paare getXName / getXRegex innerhalb der Seite: somit erhältst Du die entsprechende get Kommandos, die Du dann explizit (z.B. mit at) aufrufen musst.
Wenn du eine automatische Abfrage innerhalb der Seite willst, dann eher readingXName und readingXRegex. Die Anzahl Abfragen kannst Du mit dem Parameter <Interval> in der DEF anpassen

Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 09 November 2017, 15:02:50
@holzwurm83: hab dich nicht vergessen. Leider konnte ich gestern nur eine halbe Stunde weiter testen. Bin noch nicht weiter gekommen. Nächster Versuch heute Abend.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 09 November 2017, 15:05:38
Ok! Danke für dein Feedback!


Gesendet von iPhone mit Tapatalk
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 09 November 2017, 19:33:46
und auf jeden Fall noch eine passende getXRegex

getXUrl nur wenn Du eine andere Seite (als die von DEF) erreichen willst.
getXHeader.* wenn die von  requestHeader.* nicht reichen.

I.d.R. reichen einfach paare getXName / getXRegex innerhalb der Seite: somit erhältst Du die entsprechende get Kommandos, die Du dann explizit (z.B. mit at) aufrufen musst.
Wenn du eine automatische Abfrage innerhalb der Seite willst, dann eher readingXName und readingXRegex. Die Anzahl Abfragen kannst Du mit dem Parameter <Interval> in der DEF anpassen

Kann ich in der getXURL auch am Ende der Url eine ID mit übergeben?

Sehe ich das richtig, dass die die getX... Befehle dann nur per direktem Aufruf durchgeführt werden? Oder ebenfalls über den unter DEF eingestellte Interval?

Sorry, habe mich mit dem Wiki darüber versucht schlau zu machen. Aber so ganz blicke ich das damit nicht - daher so viele Fragen :-)

Über die get Befehle get1URL, get1Name und get1Regex bekomme ich leider nur folgenden Log:
2017.11.09 20:16:36 5: myTischtennisV1: UpdateHintList called
2017.11.09 20:16:36 5: myTischtennisV1: UpdateHintList: setlist = interval reread:noArg stop:noArg start:noArg upgradeAttributes:noArg storeKeyValue
2017.11.09 20:16:36 5: myTischtennisV1: UpdateHintList: getlist = Rainer:noArg
2017.11.09 20:16:40 5: myTischtennisV1: get called with Rainer
2017.11.09 20:16:40 5: myTischtennisV1: get found option Rainer in attribute get1Name
2017.11.09 20:16:40 4: myTischtennisV1: get will now request Rainer, no optional value
2017.11.09 20:16:40 4: myTischtennisV1: AddToQueue adds get1, initial queue len: 0
2017.11.09 20:16:40 5: myTischtennisV1: AddToQueue adds type get1 to URL https://www.mytischtennis.de/community/, no data, no headers, retry 0
2017.11.09 20:16:40 5: myTischtennisV1: HandleSendQueue called, qlen = 1
2017.11.09 20:16:40 5: myTischtennisV1: HandleSendQueue is adding Cookies: SRV=82; cfid=e841b97b-9e06-4fc9-a7a2-3ab93dc76fa5; cftoken=0
2017.11.09 20:16:40 4: myTischtennisV1: HandleSendQueue sends request type get1 to URL https://www.mytischtennis.de/community/, No Data,
header: Cookie: SRV=82; cfid=e841b97b-9e06-4fc9-a7a2-3ab93dc76fa5; cftoken=0,
timeout 2
2017.11.09 20:16:40 4: HttpUtils url=https://www.mytischtennis.de/community/
2017.11.09 20:16:40 5: HttpUtils request header:
GET /community/ HTTP/1.0
Host: www.mytischtennis.de
User-Agent: fhem
Cookie: SRV=82; cfid=e841b97b-9e06-4fc9-a7a2-3ab93dc76fa5; cftoken=0
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.11.09 20:16:40 4: https://www.mytischtennis.de/community/: HTTP response code 200
2017.11.09 20:16:40 4: HttpUtils https://www.mytischtennis.de/community/: Got data, length: 0
2017.11.09 20:16:40 5: HttpUtils response header:
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Thu, 09 Nov 2017 19:16:40 GMT
X-Varnish: 1560347860
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss
2017.11.09 20:16:40 4: myTischtennisV1: Read callback: request type was get1 retry 0,
Header: HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Thu, 09 Nov 2017 19:16:40 GMT
X-Varnish: 1560347860
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss, body empty
2017.11.09 20:16:40 5: myTischtennisV1: looking for Cookies in HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Language: de-DE
Server: Microsoft-IIS/7.5
Content-Length: 0
Accept-Ranges: bytes
Date: Thu, 09 Nov 2017 19:16:40 GMT
X-Varnish: 1560347860
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: Miss
2017.11.09 20:16:40 5: myTischtennisV1: ExtractSid called, context get, num 1
2017.11.09 20:16:40 5: myTischtennisV1: CheckAuth is checking buffer with ReAuthRegex name="userNameB"
2017.11.09 20:16:40 4: myTischtennisV1: CheckAuth decided no authentication required
2017.11.09 20:16:40 5: myTischtennisV1: ExtractReading Rainer with regex /<span>TTR:</span> ([\d\.]+)/...
2017.11.09 20:16:40 5: myTischtennisV1: ExtractReading Rainer did not match
2017.11.09 20:16:40 5: myTischtennisV1: UpdateReadingList created list of reading.* nums to parse during getUpdate as 1 2 3 4 5
2017.11.09 20:16:40 3: myTischtennisV1: Read response to get1 didn't match any Reading
2017.11.09 20:16:40 5: myTischtennisV1: HandleSendQueue called, qlen = 0

Jemand eine Idee woran das liegt? Fehlt da eventuell ein zusätzlicher Header?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 09 November 2017, 23:17:28
Zitat
Sehe ich das richtig, dass die die getX... Befehle dann nur per direktem Aufruf durchgeführt werden?
Prinzipiell richitg. Nur wenn Du noch dazu "getXPoll 1" setzt, wird es  über den unter DEF eingestellte Interval abgefragt. Nachteil im Vergleich mit readingX... ist dass jedes get eine http Abfrage macht, wenn readingX... nur eine http Abfrage macht, und dann alle readings interpretiert.

Zitat
Sorry, habe mich mit dem Wiki darüber versucht schlau zu machen
CommandREF ist auch empfehlenswert.

Wegen get1... kann man ein "list" von deinem HTTPMOD (anonymisiert) sehen?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 09 November 2017, 23:29:41
@holzwurm83: ich hab es. Mit der Lösung bin ich nicht ganz zufrieden (ich musste das "update" im Loginprozess einbauen und bei jeder Abfrage ein Login zwingen), aber zumindest funktioniert es... eigentlich nur wenn Du Wasser holst - ich habe zwischen 21:30 Uhr und 23:00 Uhr ein Zweifel gehabt ;) :

defmod H2O_Anlage HTTPMOD https://wifi.ecowater.com/Dashboard/Index/xxxmailxxx/AC000W000028486 60
attr H2O_Anlage clearSIdBeforeAuth 1
attr H2O_Anlage enableControlSet 1
attr H2O_Anlage reAuthAlways 1
attr H2O_Anlage reAuthRegex (class="login-item"|Bad Request)
attr H2O_Anlage reading01Name VerbrauchHeute
attr H2O_Anlage reading01Regex water_today".*?>([\d]+)
attr H2O_Anlage reading02Name Saltdate
attr H2O_Anlage reading02Regex device-info-saltDate.*?>([\d\/\.]+)
attr H2O_Anlage requestHeader1 Cookie: $sid
attr H2O_Anlage requestHeader2 Cache-Control: no-cache
attr H2O_Anlage sid01IdRegex (ASP.NET_SessionId[^;;\n]+)
attr H2O_Anlage sid01URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/xxxmailxxx/AC000W000028486
attr H2O_Anlage sid02Data Email=xxxmailxxx&Password=xxxpasswortxxx&Remember=false
attr H2O_Anlage sid02Header1 Cookie: $sid
attr H2O_Anlage sid02IdRegex Cookie: ([^\n]+)
attr H2O_Anlage sid02URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/xxxmailxxx/AC000W000028486
attr H2O_Anlage sid03Data dsn=AC000W000028486
attr H2O_Anlage sid03Header1 Referer: https://wifi.ecowater.com/Dashboard/Index/xxxmailxxx/AC000W000028486
attr H2O_Anlage sid03Header2 X-Requested-With: XMLHttpRequest
attr H2O_Anlage sid03Header3 User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
attr H2O_Anlage sid03Header5 Cookie: $sid
attr H2O_Anlage sid03URL https://wifi.ecowater.com/Dashboard/UpdateFrequentData
attr H2O_Anlage verbose 5

Das <interval> könntest Du m.A. auf 300 oder mehr setzen, um kein Ärger von ecowater zu kriegen ;) Das hab ich auch bei mir gemacht.
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 10 November 2017, 10:39:04
Zitat
Wegen get1... kann man ein "list" von deinem HTTPMOD (anonymisiert) sehen?

disable 0
enableControlSet 1
enableCookies 1
get1Name Rainer
get1Regex <span>TTR:</span> ([\d\.]+)
get1URL https://www.mytischtennis.de/community/events?personId=127937
group Abfrage
reAuthRegex name="userNameB"
reading1Name Matthias
reading1Regex ttrFortimeline = ([\d\.]+)
... bis reading5...
requestHeader4 Accept-Encoding: identity
room Tischtennis
sid01Data userNameB=USER&userPassWordB=PASS&targetPage=index?fromlogin=1&goLogin=Einloggen
sid01Header4 Accept-Encoding: identity
sid01URL https://www.mytischtennis.de/community/login
stateFormat {ReadingsTimestamp('myTischtennisV1','Matthias','')}
userattr get1Name get1Regex get1URL reading1Name reading1Regex reading2Name reading2Regex reading3Name reading3Regex reading4Name reading4Regex reading5Name reading5Regex requestHeader4 sid01Data sid01Header4 sid01URL
verbose 5

Schön wäre es wenn man bei dem get die PersonID in der URL noch mit übergeben könnte.
Sodass man eine Abfrage anlegt und für alle abzufragenden Personen benutzen kann.
Aber sollte das nicht gehen, ist es mit dem get schon sehr komfortabel =)

@amenomade: Beschäftigst du dich mit dem Thema auch beruflich? Oder warum kannst du das so gut? :-)
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 10 November 2017, 15:36:42
Mehrere TTR (vorgegeben):
attr tennis getHeader4 Accept-Encoding: identity
attr tennis getURL https://www.mytischtennis.de/community/events?personId=%%ttrid%%
attr tennis replacement01Mode text
attr tennis replacement01Regex %%ttrid%%

attr tennis get20Name Erik
attr tennis get20Regex <span>TTR:</span> ([\d\.]+)
attr tennis get20Replacement01Value 127937

attr tennis get21Name Steven
attr tennis get21Regex <span>TTR:</span> ([\d\.]+)
attr tennis get21Replacement01Value 123456

attr tennis get22Name Amenomade
attr tennis get22Regex <span>TTR:</span> ([\d\.]+)
attr tennis get22Replacement01Value 111111

Einzel TTR (als Arg im get Kommando):
attr tennis get30Header4 Accept-Encoding: identity
attr tennis get30Name PersonId
attr tennis get30RecombineExpr join ": ", @matchlist
attr tennis get30Regex (?s)ttr-box">\n<h3>\n([^\n]+).*?TTR:<\/span> ([\d]+)
attr tennis get30TextArg 1
attr tennis get30URL https://www.mytischtennis.de/community/events?personId=$val
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 10 November 2017, 15:49:02
Schöner:
attr tennis get30RecombineExpr join (" ","Id: ",$matchlist[2],"Name:",$matchlist[0],"TTR:",$matchlist[1])
Ich bin zwar in der IT Branche, aber eher seitens Infrastrukur (Netzwerk, Servers, usw). Entwicklung ist ein Hobby ;)
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 12 November 2017, 18:18:36
Hallo amenomade,

vielen vielen Dank für deine Unterstützung. Ich hätte das sonnst in dem umfang mit Sicherheit nicht hinbekommen.

Trotz des Errors gibt es bis auf zwei Readings keine weiteren Probleme. Der hat für diese zwei attr. kein match. Daher kommt wascheidlich auch der Fehler:

attr H2O_Anlage reading04Name Salzstand
attr H2O_Anlage reading04Regex <span class="irs-single" style="left:.*?>([\d]+)
attr H2O_Anlage reading06Name Regeneration
attr H2O_Anlage reading06Regex device-info-lastRecharg.*?>([\d\/\.]+)
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 12 November 2017, 19:03:19
Wie gesagt, "irs-single" finde ich nirgendwo auf der Seite.

Probier mal mit:attr H2O_Anlage reading04Name Salzstand
attr H2O_Anlage reading04Regex SaltLevelCurrent.*?value="([\d]+)"

Das Problem bei Regeneration ist dass, es nicht nur ein Datum sein kann, sondern auch z.B. "Gestern". Probier mal mit:
attr H2O_Anlage reading06Name Regeneration
attr H2O_Anlage reading06Regex device-info-lastRecharge">(.*?)<
Titel: Antw:HTTPMOD Login
Beitrag von: mazze2000 am 16 November 2017, 16:06:40
Ich habe dann doch nochmal eine Frage: (es geht weiterhin um myTischtennis)

Wenn ich jetzt nicht auf den Quellcode (Ressourcen (Safari)) der Seite sondern auf Elemente der Seite zugreifen will?
Soll heißen, die Seite erstellt eine Tabelle. In der Tabelle stehen meine benötigten Werte. Diese stehen halt nicht im Quellcode.
Schaue ich mir beim Laden der Seite den Netzwerktransfer an, so sehe ich das bei dem Element um das es geht die Methode POST steht.
Alles andere wäre "GET".
Im Wiki steht etwas von "requestData.*" um an die Daten der Seite zu kommen. Meine Idee wäre den "requestHeader4" damit zu ersetzten. Ebenfalls mit "Accept-Encoding: identity" als Wert.

attr tennis requestData.* Accept-Encoding: identity
attr tennis getURL https://www.mytischtennis.de/community/events?personId=%%ttrid%%
attr tennis replacement01Mode text
attr tennis replacement01Regex %%ttrid%%

attr tennis get20Name Erik
attr tennis get20Regex <span>TTR:</span> ([\d\.]+)
attr tennis get20Replacement01Value 127937

Dies funktioniert leider nicht. Hat jemand eine Idee was ich falsch mache?

LG Matze
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 18 November 2017, 02:12:24
requestData (ohne .* am Ende) wird benutzt, um post "data" zu schicken. Aber diese Post Data ist wahrscheinlich nicht "Accept-Encoding: identity", das hat keinen Sinn.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 28 November 2018, 23:09:03
Hallo amenomade,

kannst du mir hierbei noch mal helfen. Seit einigen Monaten werden die Readings nicht mehr aktualisiert.

H2O_Anlage: Read response to update didn't match any Reading
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 29 November 2018, 20:01:20
Da brauche ich aber ein bisschen mehr Input: list, log, usw.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 30 November 2018, 09:40:55
Da brauche ich aber ein bisschen mehr Input: list, log, usw.

Das kannst du gerne bekommen:

List:
Internals:
   BUSY       0
   CHANGED   
   DEF        https://wifi.ecowater.com/Dashboard/Index/walde*************/AC000W000028486 300

   Interval   300

   LASTSEND   1543566442.69177
   LastAuthTry 2018-11-30 09:27:19
   MainURL    https://wifi.ecowater.com/Dashboard/Index/wald***************/AC000W000028486
   ModuleVersion 3.5.1 - 5.7.2018
   NAME       H2O_Anlage
   NR         910
   STATE      ???
   TRIGGERTIME 1543566735.65303
   TRIGGERTIME_FMT 2018-11-30 09:32:15
   TYPE       HTTPMOD
   addr       https://wifi.ecowater.com:443
   auth       0
   buf       
   code       200
   compress   1
   conn       
   data       
   displayurl https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fwalde*********%2fAC000W000028486
   header     Cookie: ASP.NET_SessionId=mqbolf3tdl2o1cdzsihywxov
Cache-Control: no-cache
   host       wifi.ecowater.com
   httpheader HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-Frame-Options: SAMEORIGIN
X-AspNet-Version: 4.0.30319
Set-Cookie: DC_SESSION_DATA=; path=/
Set-Cookie: __RequestVerificationToken=KN9bVH_J6peD6EULLq9bdPo8bbaeqaUZxsCnDXWDUo6Y5eEqLzyJbLPgj7XSJmCSeYC2wCjEuEi0sSrJG8_3uqeY_FSJkofbQBF0rmyY2gk1; path=/; HttpOnly
X-Powered-By: ASP.NET
Date: Fri, 30 Nov 2018 08:26:59 GMT
Connection: close
Content-Length: 8275
   httpversion 1.0
   hu_blocking 0
   hu_filecount 108
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fwalde**********%2fAC000W000028486
   protocol   https
   redirects  1
   sid        ASP.NET_SessionId=mqbolf3tdl2o1cdzsihywxov
   timeout    2
   url        https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fwalde***************%2fAC000W000028486
   value      0
   QUEUE:
   READINGS:
     2018-04-13 21:56:25   Regeneration   
     2018-04-13 21:56:25   Salz_leer_am    09/08/2018
     2018-04-13 21:56:25   Tagesdurchschnitt 427
     2018-04-13 21:56:25   VerbrauchHeute  230
     2018-04-13 21:56:25   Verfügbar      458
   REQUEST:
     data       
     header     Cookie: $sid
Cache-Control: no-cache
     ignoreredirects 0
     retryCount 1
     type       update
     url        https://wifi.ecowater.com/Dashboard/Index/walde************/AC000W000028486
     value      0
   sslargs:
Attributes:
   clearSIdBeforeAuth 1
   enableControlSet 1
   reAuthAlways 1
   reAuthRegex (class="login-item"|Bad Request)
   reading01Name VerbrauchHeute
   reading01Regex water_today".*?>([\d]+)
   reading02Name Tagesdurchschnitt
   reading02Regex <h1 id="water_avg".*?>([\d]+)
   reading03Name Verfügbar
   reading03Regex <h1 id="water_avail".*?>([\d]+)
   reading04Name Salzstand
   reading04Regex <span class="irs-single" style="left:.*?>([\d]+)
   reading05Name Salz_leer_am
   reading05Regex device-info-saltDate.*?>([\d\/\.]+)
   reading06Name Regeneration
   reading06Regex device-info-lastRecharge">(.*?)
   requestHeader1 Cookie: $sid
   requestHeader2 Cache-Control: no-cache
   room       Keller
   sid01IdRegex (ASP.NET_SessionId[^;\n]+)
   sid01URL   https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/walde**************/AC000W000028486
   sid02Data  Email=waldemar.preis@online.de&Password=**********&Remember=false
   sid02Header1 Cookie: $sid
   sid02IdRegex Cookie: ([^\n]+)
   sid02URL   https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/walde************/AC000W000028486
   sid03Data  dsn=AC000W000028486
   sid03Header1 Referer: https://wifi.ecowater.com/Dashboard/Index/walde**********/AC000W000028486
   sid03Header2 X-Requested-With: XMLHttpRequest
   sid03Header3 User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
   sid03Header5 Cookie: $sid
   sid03URL   https://wifi.ecowater.com/Dashboard/UpdateFrequentData
   userattr   reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex reading04Name reading04Regex reading05Name reading05Regex reading06Name reading06Regex requestHeader1 requestHeader2 sid01IdRegex sid01URL sid02Data sid02Header1 sid02IdRegex sid02URL sid03Data sid03Header1 sid03Header2 sid03Header3 sid03Header5 sid03URL
   verbose    5

Log 5:

[code]
2018.11.30 09:32:17 5: H2O_Anlage: ExtractSid called, context sid, num 02
2018.11.30 09:32:17 5: H2O_Anlage: ExtractSid could not match buffer to IdRegex Cookie: ([^\n]+)
2018.11.30 09:32:17 5: H2O_Anlage: HandleSendQueue called, qlen = 2
2018.11.30 09:32:17 4: H2O_Anlage: HandleSendQueue sends request type auth03 to URL https://wifi.ecowater.com/Dashboard/UpdateFrequentData,
data: dsn=AC000W000028486,
header: Referer: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
Cookie: ASP.NET_SessionId=mnlxds22t2ja2a4zl5l4phoc
timeout 2
2018.11.30 09:32:17 5: HttpUtils url=https://wifi.ecowater.com/Dashboard/UpdateFrequentData
2018.11.30 09:32:18 5: HttpUtils request header:
POST /Dashboard/UpdateFrequentData HTTP/1.0
Host: wifi.ecowater.com
Accept-Encoding: gzip,deflate
Referer: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
Cookie: ASP.NET_SessionId=mnlxds22t2ja2a4zl5l4phoc
Content-Length: 19
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:18 4: https://wifi.ecowater.com/Dashboard/UpdateFrequentData: HTTP response code 200
2018.11.30 09:32:18 5: HttpUtils https://wifi.ecowater.com/Dashboard/UpdateFrequentData: Got data, length: 196
2018.11.30 09:32:18 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 30 Nov 2018 08:31:53 GMT
Connection: close
Content-Length: 196
2018.11.30 09:32:18 4: H2O_Anlage: Read callback: request type was auth03 retry 0,
Body: {"success":false,"status":"NotLoggedIn","message":"NotLoggedIn","redirectUrl":"/Site/Login?status=NotLoggedIn\u0026returnUrl=%2fDashboard%2fIndex%2fwaldemar.preis%2540online.de%2fAC000W000028486"}
2018.11.30 09:32:18 5: H2O_Anlage: ExtractSid called, context sid, num 03
2018.11.30 09:32:18 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2018.11.30 09:32:18 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=mnlxds22t2ja2a4zl5l4phoc
Cache-Control: no-cache
timeout 2
2018.11.30 09:32:18 5: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
2018.11.30 09:32:19 5: HttpUtils request header:
GET /Dashboard/Index/benutzername/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: ASP.NET_SessionId=mnlxds22t2ja2a4zl5l4phoc
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:19 4: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486: HTTP response code 302
2018.11.30 09:32:19 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486: Redirect to https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486
2018.11.30 09:32:19 5: HttpUtils url=https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486
2018.11.30 09:32:19 5: HttpUtils request header:
GET /Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: ASP.NET_SessionId=mnlxds22t2ja2a4zl5l4phoc
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:19 4: https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486: HTTP response code 200
2018.11.30 09:32:19 5: HttpUtils https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486: Got data, length: 8275
2018.11.30 09:32:19 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-Frame-Options: SAMEORIGIN
X-AspNet-Version: 4.0.30319
Set-Cookie: DC_SESSION_DATA=; path=/
Set-Cookie: __RequestVerificationToken=KhdaAQmFCR_1Yj1DkN_2D6GHeN8ASzm3iJnf9Cp_i1nBeW9GBmiPNgrUHjrU8jSDPLJjx8ATWcG1BruI0JM9rm0cQTZ4Ih7ev97Fv93HrtQ1; path=/; HttpOnly
X-Powered-By: ASP.NET
Date: Fri, 30 Nov 2018 08:31:55 GMT
Connection: close
Content-Length: 8275
2018.11.30 09:32:19 4: H2O_Anlage: Read callback: request type was update retry 0,
Body: <!DOCTYPE html>

<html>
<head>
    <title>Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='shortcut icon' href='img/favicon.ico' type='image/x-icon'/>

<!--CSS STYLES-->
   
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
    <link href="/Content/css/jquery-ui-1.91.custom.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/chosen.min.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/datepicker3.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/main.css?11.8.2016" rel="stylesheet" type="text/css">
   

<!--JAVASCRIPT-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="/Scripts/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    <script src="/Scripts/chosen.jquery.min.js"></script>
    <script src="/Scripts/ion.rangeSlider.min.js"></script>
    <script src="/Scripts/Chart.min.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Scripts/bootstrap-datepicker.js"></script>
    <script src="/Scripts/main.js"></script>

</head>
<body>

<!--TOP FIXED NAVIGATION-->
    <div id="header" class="navbar navbar-default navbar-fixed-top public-page" role="navigation">
        <div class="nav-container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".sidebar-offcanvas" data-canvas="body">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-logo" href="http://www.ecowater.com">
                    <img src="/Content/img/mobile_logo.png" />
                </a>
            </div>
            <div id="language" class="language-lg">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
        </div>
        <div id="global" class="global-lg">
            <ul class="nav navbar-nav navbar-right navbar-custom">
                <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
            </ul>
        </div>
    </div>
<!--END TOP FIXED NAVIGATION-->

    <div id="wrapper" class="row row-offcanvas row-offcanvas-left">
       
    <!--OFF CANVAS MENU-->
        <div id="navigation-sm" class="sidebar-offcanvas">
            <div id="language" class="language-sm">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>

            <h4 id="global-title">My Account</h4>
            <div id="global">
                <ul>
                    <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
                  </ul>
            </div>
        </div>
    <!--END OFF CANVAS MENU-->

       

<div id="intro-page" class="container">
    <div class=" col-xs-12 col-lg-10 col-lg-offset-1">
        <div class="intro-column1">
            <img src="/Content/img/EcoWater_Logo.png"/>
            <h1 class="intro">Welcome!</h1>
            <p>Congratulations on purchasing your new HydroLink Plus<sup>®</sup> Water Treatment System. Click the Create Account button to get started with setup and registration.</p>
            <a href="/Customer/Create" class="btn-submit">New Account</a>
        </div>
        <div class="intro-column2">
<form action="/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486" method="post"><input name="__RequestVerificationToken" type="hidden" value="f77ugAO98tkYNiNlMKCeFvEjEUxPrjDpKt3VMgL5we8VuhNntn0f1OnIek1x_cMWCQ_FEQNNj6iHKtRWWJJ3RUgmpag1mnGWqffNRTlOt9o1" />                <h2>Please Sign In</h2>

        <div class="alert alert-info" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            Your session has expired. Please log in to continue.
        </div>
                <div class="login-item">
                    <label for="username">
                        <img src="/Content/img/icon_user.png"/>
                    </label>
                    <input data-val="true" data-val-required="The Email field is required." id="username" name="Email" placeholder="username" type="text" value="" />
                    <label for="username">
                        <img src="/Content/img/icon_password.png"/>
                    </label>
                    <input data-val="true" data-val-required="The Password field is required." id="password" name="Password" placeholder="password" type="password" />
                </div>
                <div class="col-xs-6 no-margin">
                    <input type="submit" class="btn-login" value="Login" />
                </div>
                <div class="col-xs-6">
                    <div class="row">
                        <input class="col-xs-1" data-val="true" data-val-required="The Remember Me? field is required." id="remember" name="Remember" type="checkbox" value="true" /><input name="Remember" type="hidden" value="false" />
                        <p id="remember" class="col-xs-11">Remember me</p>
                    </div>                  
                    <a class="special forgotten" href="/Site/Forgot">Forgotten Password?</a>
                </div>
</form>        </div>
    </div>
</div>

    <!--////////////////// BACKGROUND ////////////////-->

        <div id="background" class="background-index">
            <img id="background-left" src="/Content/img/ecowater_background_left.png" />
            <img id="background-right" src="/Content/img/ecowater_background_right.png" />
        </div>

    <!--////////////////// FOOTER ////////////////-->

        <div class="subfooter">
            <p>©2014 EcoWater Systems LLC | 1-800-86WATER | <a class="special" href="http://www.ecowater.com">ecowater.com</a> | <a class="special" href="http://www.ecowater-europe.com">ecowater-europe.com</a></p>
        </div>

    </div>

    <script type="text/javascript">
        function setCulture(culture) {
            window.location = '/Site/SetCulture' + '?name=' + culture;
        }
    </script>
   

</body>
</html>
2018.11.30 09:32:19 5: H2O_Anlage: ExtractSid called, context reading, num
2018.11.30 09:32:19 5: H2O_Anlage: CheckAuth is checking buffer with ReAuthRegex (class="login-item"|Bad Request)
2018.11.30 09:32:19 4: H2O_Anlage: CheckAuth decided new authentication required
2018.11.30 09:32:19 4: H2O_Anlage: Auth called with Steps: 01 02 03
2018.11.30 09:32:19 4: H2O_Anlage: AddToQueue adds auth03, initial queue len: 0, prio
2018.11.30 09:32:19 5: H2O_Anlage: AddToQueue prepends type auth03 to URL https://wifi.ecowater.com/Dashboard/UpdateFrequentData, data dsn=AC000W000028486, header Referer: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
Cookie: $sid, retry 0
2018.11.30 09:32:19 4: H2O_Anlage: AddToQueue adds auth02, initial queue len: 1, prio
2018.11.30 09:32:19 5: H2O_Anlage: AddToQueue prepends type auth02 to URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486, data Email=Benutzername&Password=Passwort&Remember=false, header Cookie: $sid, retry 0
2018.11.30 09:32:19 4: H2O_Anlage: AddToQueue adds auth01, initial queue len: 2, prio
2018.11.30 09:32:19 5: H2O_Anlage: AddToQueue prepends type auth01 to URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486, no data, no headers, retry 0
2018.11.30 09:32:19 5: H2O_Anlage: HandleSendQueue called, qlen = 3
2018.11.30 09:32:19 4: H2O_Anlage: HandleSendQueue sends request type auth01 to URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486, No Data, No Header
timeout 2
2018.11.30 09:32:19 5: HttpUtils url=https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486
2018.11.30 09:32:19 4: H2O_Anlage: AddToQueue adds update, initial queue len: 2
2018.11.30 09:32:19 5: H2O_Anlage: AddToQueue adds type update to URL https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486, no data, header Cookie: $sid
Cache-Control: no-cache, retry 1
2018.11.30 09:32:19 5: H2O_Anlage: HandleSendQueue called, qlen = 3
2018.11.30 09:32:19 5: H2O_Anlage: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2018.11.30 09:32:19 4: H2O_Anlage: CheckAuth requeued request update after auth, retryCount 0 ...
2018.11.30 09:32:20 5: HttpUtils request header:
GET /Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:20 4: https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486: HTTP response code 200
2018.11.30 09:32:20 5: HttpUtils https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486: Got data, length: 7971
2018.11.30 09:32:20 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
Set-Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0; path=/; HttpOnly
X-AspNetMvc-Version: 5.2
X-Frame-Options: SAMEORIGIN
X-AspNet-Version: 4.0.30319
Set-Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0; path=/; HttpOnly
Set-Cookie: DC_SESSION_DATA=; path=/
Set-Cookie: __RequestVerificationToken=aByF53vj-4wT-2PzNc_MvUO9lw7dBC_xYgG3eechde5mBWcgfja4NcA_72v9mvHwgX5OyX8acJzY3Kpp-5cWbdRZVeng-S0LDHw56_wMD8k1; path=/; HttpOnly
X-Powered-By: ASP.NET
Date: Fri, 30 Nov 2018 08:31:56 GMT
Connection: close
Content-Length: 7971
2018.11.30 09:32:20 4: H2O_Anlage: Read callback: request type was auth01 retry 0,
Body: <!DOCTYPE html>

<html>
<head>
    <title>Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='shortcut icon' href='img/favicon.ico' type='image/x-icon'/>

<!--CSS STYLES-->
   
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
    <link href="/Content/css/jquery-ui-1.91.custom.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/chosen.min.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/datepicker3.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/main.css?11.8.2016" rel="stylesheet" type="text/css">
   

<!--JAVASCRIPT-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="/Scripts/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    <script src="/Scripts/chosen.jquery.min.js"></script>
    <script src="/Scripts/ion.rangeSlider.min.js"></script>
    <script src="/Scripts/Chart.min.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Scripts/bootstrap-datepicker.js"></script>
    <script src="/Scripts/main.js"></script>

</head>
<body>

<!--TOP FIXED NAVIGATION-->
    <div id="header" class="navbar navbar-default navbar-fixed-top public-page" role="navigation">
        <div class="nav-container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".sidebar-offcanvas" data-canvas="body">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-logo" href="http://www.ecowater.com">
                    <img src="/Content/img/mobile_logo.png" />
                </a>
            </div>
            <div id="language" class="language-lg">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
        </div>
        <div id="global" class="global-lg">
            <ul class="nav navbar-nav navbar-right navbar-custom">
                <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
            </ul>
        </div>
    </div>
<!--END TOP FIXED NAVIGATION-->

    <div id="wrapper" class="row row-offcanvas row-offcanvas-left">
       
    <!--OFF CANVAS MENU-->
        <div id="navigation-sm" class="sidebar-offcanvas">
            <div id="language" class="language-sm">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>

            <h4 id="global-title">My Account</h4>
            <div id="global">
                <ul>
                    <li id="global-ecowater"><a href="http://www.ecowater.com">EcoWater.com</a></li>
                  </ul>
            </div>
        </div>
    <!--END OFF CANVAS MENU-->

       

<div id="intro-page" class="container">
    <div class=" col-xs-12 col-lg-10 col-lg-offset-1">
        <div class="intro-column1">
            <img src="/Content/img/EcoWater_Logo.png"/>
            <h1 class="intro">Welcome!</h1>
            <p>Congratulations on purchasing your new HydroLink Plus<sup>®</sup> Water Treatment System. Click the Create Account button to get started with setup and registration.</p>
            <a href="/Customer/Create" class="btn-submit">New Account</a>
        </div>
        <div class="intro-column2">
<form action="/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486" method="post"><input name="__RequestVerificationToken" type="hidden" value="wzdtYqYg_V7CSS3qZsh8qLVyBsvmWaVNTxpUCGGY5kDaZsDVXaJSnHgLnt1D9xPJs9YDLDBj46L3H-MDXlQPNHIoroQ36HaDIGGWRDUibt01" />                <h2>Please Sign In</h2>

                <div class="login-item">
                    <label for="username">
                        <img src="/Content/img/icon_user.png"/>
                    </label>
                    <input data-val="true" data-val-required="The Email field is required." id="username" name="Email" placeholder="username" type="text" value="" />
                    <label for="username">
                        <img src="/Content/img/icon_password.png"/>
                    </label>
                    <input data-val="true" data-val-required="The Password field is required." id="password" name="Password" placeholder="password" type="password" />
                </div>
                <div class="col-xs-6 no-margin">
                    <input type="submit" class="btn-login" value="Login" />
                </div>
                <div class="col-xs-6">
                    <div class="row">
                        <input class="col-xs-1" data-val="true" data-val-required="The Remember Me? field is required." id="remember" name="Remember" type="checkbox" value="true" /><input name="Remember" type="hidden" value="false" />
                        <p id="remember" class="col-xs-11">Remember me</p>
                    </div>                  
                    <a class="special forgotten" href="/Site/Forgot">Forgotten Password?</a>
                </div>
</form>        </div>
    </div>
</div>

    <!--////////////////// BACKGROUND ////////////////-->

        <div id="background" class="background-index">
            <img id="background-left" src="/Content/img/ecowater_background_left.png" />
            <img id="background-right" src="/Content/img/ecowater_background_right.png" />
        </div>

    <!--////////////////// FOOTER ////////////////-->

        <div class="subfooter">
            <p>©2014 EcoWater Systems LLC | 1-800-86WATER | <a class="special" href="http://www.ecowater.com">ecowater.com</a> | <a class="special" href="http://www.ecowater-europe.com">ecowater-europe.com</a></p>
        </div>

    </div>

    <script type="text/javascript">
        function setCulture(culture) {
            window.location = '/Site/SetCulture' + '?name=' + culture;
        }
    </script>
   

</body>
</html>
2018.11.30 09:32:20 5: H2O_Anlage: ExtractSid called, context sid, num 01
2018.11.30 09:32:20 4: H2O_Anlage: ExtractSid set sid to ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
2018.11.30 09:32:20 5: H2O_Anlage: HandleSendQueue called, qlen = 3
2018.11.30 09:32:20 4: H2O_Anlage: HandleSendQueue sends request type auth02 to URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486,
data: Email=Benutzername&Password=Passwort&Remember=false,
header: Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
timeout 2
2018.11.30 09:32:20 5: HttpUtils url=https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486
2018.11.30 09:32:21 5: HttpUtils request header:
POST /Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
Content-Length: 65
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:21 4: https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486: HTTP response code 302
2018.11.30 09:32:21 4: HttpUtils https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486: Redirect to https://wifi.ecowater.com:443/Site/Error
2018.11.30 09:32:21 5: HttpUtils url=https://wifi.ecowater.com:443/Site/Error
2018.11.30 09:32:21 5: HttpUtils request header:
POST /Site/Error HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
Content-Length: 65
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:21 4: https://wifi.ecowater.com:443/Site/Error: HTTP response code 200
2018.11.30 09:32:21 5: HttpUtils https://wifi.ecowater.com:443/Site/Error: Got data, length: 6432
2018.11.30 09:32:21 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 30 Nov 2018 08:31:57 GMT
Connection: close
Content-Length: 6432
2018.11.30 09:32:21 4: H2O_Anlage: Read callback: request type was auth02 retry 0,
Body:
<!DOCTYPE html>

<html>
<head>
    <title>Error</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='shortcut icon' href="/Content/img/favicon.ico" type='image/x-icon'/>

<!--CSS STYLES-->
   
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
    <link href="/Content/css/jquery-ui-1.91.custom.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/chosen.min.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/datepicker3.css" rel="stylesheet" type="text/css">
    <link href="/Content/css/main.min.css?10.18.2018.2" rel="stylesheet" type="text/css">
   

<!--JAVASCRIPT-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
    <script src="/Scripts/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    <script src="/Scripts/chosen.jquery.min.js"></script>
    <script src="/Scripts/ion.rangeSlider.min.js"></script>
    <script src="/Scripts/Chart.min.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Scripts/bootstrap-datepicker.js"></script>
    <script src="/Scripts/main.js"></script>

   

</head>
<body>



<!--TOP FIXED NAVIGATION-->
    <div id="header" class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="nav-container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".sidebar-offcanvas" data-canvas="body">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-logo" href="/Customer/List">
                    <img src="/Content/img/mobile_logo.png" />
                </a>
                <a class="navbar-home" href="/Dashboard/Index">
                    <img src="/Content/img/mobile_home.png" />
                </a>
            </div>
            <div id="language" class="language-lg">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
        </div>
    </div>
<!--END TOP FIXED NAVIGATION-->

    <div id="wrapper" class="row row-offcanvas row-offcanvas-left">
       
    <!--OFF CANVAS MENU-->
        <div id="navigation-sm" class="sidebar-offcanvas">
            <div id="language" class="language-sm">
                <select onchange="setCulture($(this).val());">
        <option value="en" selected>English</option>
        <option value="fr-CA" >français (Canada)</option>
        <option value="bg" >български</option>
        <option value="cs" >čeština</option>
        <option value="de" >Deutsch</option>
        <option value="es" >español</option>
        <option value="fr" >français</option>
        <option value="hr" >hrvatski</option>
        <option value="hu" >magyar</option>
        <option value="it" >italiano</option>
        <option value="lt" >lietuvių</option>
        <option value="nl" >Nederlands</option>
        <option value="pl" >polski</option>
        <option value="ro" >română</option>
        <option value="ru" >русский</option>
        <option value="sk" >slovenčina</option>
        <option value="sr" >srpski</option>
</select>
            </div>
                </div>
    <!--END OFF CANVAS MENU-->

        <div id="page" class="container">

            <img id="page-logo" src="/Content/img/EcoWater_Logo.png" /><br><br>
            <h2 id="page-title">
                     
               
            </h2>

           

           


            <div class="content-wrapper">


    <div id="navigation-lg">
        <div id="search" class="search-lg">
            <ul class="steps steps1">
                <li><a href="/Site/Index"><strong>‹ Back</strong></a></li>
            </ul>
        </div>
    </div>

               



<div id="intro-page" class="container">
    <div class=" col-xs-12 col-lg-10 col-lg-offset-1">
        <h1 class="center">An unknown error has occurred</h1>
    </div>
</div>



            </div>

        </div>

    <!--////////////////// BACKGROUND ////////////////-->

        <div id="background">
            <img id="background-left" src="/Content/img/ecowater_background_left.png" />
            <img id="background-right" src="/Content/img/ecowater_background_right.png" />
        </div>

    <!--////////////////// FOOTER ////////////////-->

        <div class="subfooter">
            <p>©2014 EcoWater Systems LLC | 1-800-86WATER | <a class="special" href="http://www.ecowater.com">ecowater.com</a> | <a class="special" href="http://www.ecowater-europe.com">ecowater-europe.com</a></p>
        </div>

    </div>

    <script type="text/javascript">
        $(".device-sm #device-select").click(function () {
            $(".device-sm #device-list").slideToggle('fast');
        });
        $(".device-lg #device-select").click(function () {
            $(".device-lg #device-list").slideToggle('fast');
        });
        $("#section select, .chosen").chosen({
            disable_search_threshold: 10,
            inherit_select_classes: true,
            search_contains: true
        });
        function setCulture(culture) {
            window.location = '/Site/SetCulture' + '?name=' + culture;
        }
    </script>

   

</body>
</html>
2018.11.30 09:32:21 5: H2O_Anlage: ExtractSid called, context sid, num 02
2018.11.30 09:32:21 5: H2O_Anlage: ExtractSid could not match buffer to IdRegex Cookie: ([^\n]+)
2018.11.30 09:32:21 5: H2O_Anlage: HandleSendQueue called, qlen = 2
2018.11.30 09:32:21 4: H2O_Anlage: HandleSendQueue sends request type auth03 to URL https://wifi.ecowater.com/Dashboard/UpdateFrequentData,
data: dsn=AC000W000028486,
header: Referer: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
timeout 2
2018.11.30 09:32:21 5: HttpUtils url=https://wifi.ecowater.com/Dashboard/UpdateFrequentData
2018.11.30 09:32:22 5: HttpUtils request header:
POST /Dashboard/UpdateFrequentData HTTP/1.0
Host: wifi.ecowater.com
Accept-Encoding: gzip,deflate
Referer: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
Content-Length: 19
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:22 4: https://wifi.ecowater.com/Dashboard/UpdateFrequentData: HTTP response code 200
2018.11.30 09:32:22 5: HttpUtils https://wifi.ecowater.com/Dashboard/UpdateFrequentData: Got data, length: 196
2018.11.30 09:32:22 5: HttpUtils response header:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 30 Nov 2018 08:31:57 GMT
Connection: close
Content-Length: 196
2018.11.30 09:32:22 4: H2O_Anlage: Read callback: request type was auth03 retry 0,
Body: {"success":false,"status":"NotLoggedIn","message":"NotLoggedIn","redirectUrl":"/Site/Login?status=NotLoggedIn\u0026returnUrl=%2fDashboard%2fIndex%2fwaldemar.preis%2540online.de%2fAC000W000028486"}
2018.11.30 09:32:22 5: H2O_Anlage: ExtractSid called, context sid, num 03
2018.11.30 09:32:22 5: H2O_Anlage: HandleSendQueue called, qlen = 1
2018.11.30 09:32:22 4: H2O_Anlage: HandleSendQueue sends request type update to URL https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486, No Data,
header: Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
Cache-Control: no-cache
timeout 2
2018.11.30 09:32:22 5: HttpUtils url=https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486
2018.11.30 09:32:23 5: HttpUtils request header:
GET /Dashboard/Index/benutzername/AC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:23 4: https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486: HTTP response code 302
2018.11.30 09:32:23 4: HttpUtils https://wifi.ecowater.com/Dashboard/Index/benutzername/AC000W000028486: Redirect to https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486
2018.11.30 09:32:23 5: HttpUtils url=https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486
2018.11.30 09:32:23 5: HttpUtils request header:
GET /Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486 HTTP/1.0
Host: wifi.ecowater.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Cookie: ASP.NET_SessionId=kys10wvrhlaqoplzn0knnne0
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2018.11.30 09:32:23 4: https://wifi.ecowater.com:443/Site/Login?status=NotLoggedIn&returnUrl=%2fDashboard%2fIndex%2fbenutzername%2fAC000W000028486: HTTP response co
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 01 Dezember 2018, 00:26:00
Hmm das Problem ist anscheinend:
Zitat
2018.11.30 09:32:21 4: https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486: HTTP response code 302
2018.11.30 09:32:21 4: HttpUtils https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/benutzername/AC000W000028486: Redirect to https://wifi.ecowater.com:443/Site/Error
(...)
        <h1 class="center">An unknown error has occurred</h1>
Da muss man wieder mit Burp den Loginprozess analysieren.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 01 Dezember 2018, 02:19:33
Ok, mir ist gerade aufgefallen das ich die Zugangsdaten nicht mehr geändert habe. Das sind dann immer noch die gleichen die ich dir mal gegeben habe.


Gesendet von iPhone mit Tapatalk
Titel: Antw:HTTPMOD Login
Beitrag von: Black7king am 01 Dezember 2018, 15:53:04
Hallo @holzwurm83

wir haben die letzten tage auch eine ECOWATER SYSTEM eVOLUTION 400 bekommen.
Nun würde ich natürlich gerne jetzt smart machen und die Daten auslesen ins system bekommen.
würdest du mir dabei helfen und deine "Raw definition" anonym bereitzustellen?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 01 Dezember 2018, 19:41:51
@Black7king: nur 2 Posts nach oben scrollen...
Titel: Antw:HTTPMOD Login
Beitrag von: Black7king am 07 Dezember 2018, 14:23:14
@Black7king: nur 2 Posts nach oben scrollen...

Danke!  ;)
Hoffe das ich jetzt des richtige Kopiert habe, geht bei mir aber auch nicht :-D
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 09 Dezember 2018, 22:14:40
@holzwurm83: hmmm… die haben ein "__RequestVerificationToken" eingebaut. Dies muss gefangen werden, und beim Login in der URL wieder gegeben werden (formencode). Wird nicht einfach.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 09 Dezember 2018, 22:19:10
Ok, hört sich nicht gut an. Die haben wohl die Sicherheit erhöht. Es ist nicht eilig, wenn es länger dauert bzw. ist das überhaupt möglich?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 09 Dezember 2018, 23:12:06
Ich hab es:
defmod H2O_Anlage HTTPMOD https://wifi.ecowater.com/Dashboard/Index/xxxEmailxxx/AC000W000028486 300
attr H2O_Anlage enableControlSet 1
attr H2O_Anlage enableCookies 1
attr H2O_Anlage reAuthAlways 1
attr H2O_Anlage reAuthRegex (class="login-item"|Bad Request)
attr H2O_Anlage reading01Name VerbrauchHeute
attr H2O_Anlage reading01Regex water_today".*?>([\d]+)
attr H2O_Anlage reading02Name Saltdate
attr H2O_Anlage reading02Regex device-info-saltDate.*?>([\d\/\.]+)
attr H2O_Anlage requestHeader2 Cache-Control: no-cache
attr H2O_Anlage sid01IdRegex type="hidden" value="(.*?)" />
attr H2O_Anlage sid01URL https://wifi.ecowater.com/Site/Login?status=NotLoggedIn&returnUrl=/Dashboard/Index/xxxEmailxxx/AC000W000028486
attr H2O_Anlage sid02Data __RequestVerificationToken=$sid&Email=xxxEmailxxx&Password=xxxPasswortxxx&Remember=false
attr H2O_Anlage sid02IgnoreRedirects 1
attr H2O_Anlage sid02URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/xxxEmailxxx/AC000W000028486
attr H2O_Anlage verbose 5
Am besten löschst Du das alte Device, und kreierst es neu, da ich komplett anders $sid nutzen musste. Einige Attribute sind verschwunden, andere werden jetzt benutzt.
reAuthAlways ist vielleicht nicht nötig.
Das mit UpdateFrequentData habe ich erstmal fallen lassen. Anscheinend macht die Webseite es nicht mehr... Vielleicht muss man es doch wieder einbauen.
mal sehen...
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 10 Dezember 2018, 00:17:47
Na, der macht doch den UpdateFrequentData. Dann dazu:
attr H2O_Anlage sid03Data  dsn=AC000W000028486
attr H2O_Anlage sid03Header1 Referer: https://wifi.ecowater.com/Dashboard/Index/xxxEmailxxx/AC000W000028486
attr H2O_Anlage sid03Header2 X-Requested-With: XMLHttpRequest
attr H2O_Anlage sid03Header3 User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
attr H2O_Anlage sid03URL   https://wifi.ecowater.com/Dashboard/UpdateFrequentData
und reAuthAlways  am besten doch benutzen.
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 10 Dezember 2018, 20:23:04
Super, vielen Dank schon mal! Werde es Morgen gleich testen und berichten!  ;D
Titel: Antw:HTTPMOD Login
Beitrag von: Black7king am 16 Dezember 2018, 21:19:46
Super, vielen Dank schon mal! Werde es Morgen gleich testen und berichten!  ;D

hast du es schon testen können funktioniert es so?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 16 Dezember 2018, 21:24:57
Er hat mich inzwischen in PN kontaktiert, da es nicht funktioniert hat. Nach Analyse habe ich gesehen, dass sein Httpmod ein von den 4 Cookies "vergessen" hat. Das ist m.M.n. weil er eine verältete Version vom HTTPMOD Modul benutzt, und ich habe ein Update empfohlen, da die beiden letzten Versionen von Httpmod einige Verbesserungen im Cookies-Management gebracht haben.

PS: bei mir, mit seinen Logindaten funktioniert es
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 18 Dezember 2018, 19:02:56
So, dank der tollen Unterstützung von amenomade funktioniert das jetzt auch wieder. Bevor das Device angelegt wird sollte man zur Sicherheit prüfen, ob HTTPMOD auf dem aktuellen Stand ist. Das hat bei mir einige Probleme verursacht. 

Benutzername und Passwort sollte vorher eingesetzt werden.


defmod H2O_Anlage HTTPMOD https://wifi.ecowater.com/Dashboard/Index/Benutzername/AC000W000028486 600
attr H2O_Anlage userattr reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex reading04Name reading04Regex reading05Name reading05Regex reading06Name reading06Regex reading07Name reading07Regex requestHeader2 sid01IdRegex sid01URL sid02Data sid02IgnoreRedirects:0,1 sid02URL sid03Data sid03Header1 sid03Header2 sid03Header3 sid03URL
attr H2O_Anlage enableControlSet 1
attr H2O_Anlage enableCookies 1
attr H2O_Anlage reAuthAlways 1
attr H2O_Anlage reAuthRegex (class="login-item"|Bad Request)
attr H2O_Anlage reading01Name VerbrauchHeute
attr H2O_Anlage reading01Regex water_today".*?>([\d]+)
attr H2O_Anlage reading02Name Saltdate
attr H2O_Anlage reading02Regex device-info-saltDate.*?>([\d\/\.]+)
attr H2O_Anlage reading03Name Tagesdurchschnitt
attr H2O_Anlage reading03Regex <h1 id="water_avg".*?>([\d]+)
attr H2O_Anlage reading04Name Verfügbar
attr H2O_Anlage reading04Regex <h1 id="water_avail".*?>([\d]+)
attr H2O_Anlage reading05Name Salzstand
attr H2O_Anlage reading05Regex <span class="irs-single" style="left:.*?>([\d]+)
attr H2O_Anlage reading06Name Regeneration
attr H2O_Anlage reading06Regex device-info-lastRecharge">(.*?)
attr H2O_Anlage reading07Name Salzstand
attr H2O_Anlage reading07Regex SaltLevelCurrent.*?value=\"([\d]+)
attr H2O_Anlage requestHeader2 Cache-Control: no-cache
attr H2O_Anlage room Keller
attr H2O_Anlage sid01IdRegex type="hidden" value="(.*?)" />
attr H2O_Anlage sid01URL https://wifi.ecowater.com/Dashboard/Index/Benutzername/AC000W000028486
attr H2O_Anlage sid02Data __RequestVerificationToken=$sid&Email=Benutzername&Password=passwort&Remember=false
attr H2O_Anlage sid02IgnoreRedirects 1
attr H2O_Anlage sid02URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/Benutzername/AC000W000028486
attr H2O_Anlage sid03Data dsn=AC000W000028486
attr H2O_Anlage sid03Header1 Referer: https://wifi.ecowater.com/Dashboard/Index/Benutzername/AC000W000028486
attr H2O_Anlage sid03Header2 X-Requested-With: XMLHttpRequest
attr H2O_Anlage sid03Header3 User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
attr H2O_Anlage sid03URL https://wifi.ecowater.com/Dashboard/UpdateFrequentData
Titel: Antw:HTTPMOD Login
Beitrag von: Black7king am 19 Dezember 2018, 20:50:02
So, dank der tollen Unterstützung von amenomade funktioniert das jetzt auch wieder. Bevor das Device angelegt wird sollte man zur Sicherheit prüfen, ob HTTPMOD auf dem aktuellen Stand ist. Das hat bei mir einige Probleme verursacht. 

Benutzername und Passwort sollte vorher eingesetzt werden.


defmod H2O_Anlage HTTPMOD https://wifi.ecowater.com/Dashboard/Index/Benutzername/AC000W000028486 600
attr H2O_Anlage userattr reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex reading04Name reading04Regex reading05Name reading05Regex reading06Name reading06Regex reading07Name reading07Regex requestHeader2 sid01IdRegex sid01URL sid02Data sid02IgnoreRedirects:0,1 sid02URL sid03Data sid03Header1 sid03Header2 sid03Header3 sid03URL
attr H2O_Anlage enableControlSet 1
attr H2O_Anlage enableCookies 1
attr H2O_Anlage reAuthAlways 1
attr H2O_Anlage reAuthRegex (class="login-item"|Bad Request)
attr H2O_Anlage reading01Name VerbrauchHeute
attr H2O_Anlage reading01Regex water_today".*?>([\d]+)
attr H2O_Anlage reading02Name Saltdate
attr H2O_Anlage reading02Regex device-info-saltDate.*?>([\d\/\.]+)
attr H2O_Anlage reading03Name Tagesdurchschnitt
attr H2O_Anlage reading03Regex <h1 id="water_avg".*?>([\d]+)
attr H2O_Anlage reading04Name Verfügbar
attr H2O_Anlage reading04Regex <h1 id="water_avail".*?>([\d]+)
attr H2O_Anlage reading05Name Salzstand
attr H2O_Anlage reading05Regex <span class="irs-single" style="left:.*?>([\d]+)
attr H2O_Anlage reading06Name Regeneration
attr H2O_Anlage reading06Regex device-info-lastRecharge">(.*?)
attr H2O_Anlage reading07Name Salzstand
attr H2O_Anlage reading07Regex SaltLevelCurrent.*?value=\"([\d]+)
attr H2O_Anlage requestHeader2 Cache-Control: no-cache
attr H2O_Anlage room Keller
attr H2O_Anlage sid01IdRegex type="hidden" value="(.*?)" />
attr H2O_Anlage sid01URL https://wifi.ecowater.com/Dashboard/Index/Benutzername/AC000W000028486
attr H2O_Anlage sid02Data __RequestVerificationToken=$sid&Email=Benutzername&Password=passwort&Remember=false
attr H2O_Anlage sid02IgnoreRedirects 1
attr H2O_Anlage sid02URL https://wifi.ecowater.com/Site/Login?returnUrl=/Dashboard/Index/Benutzername/AC000W000028486
attr H2O_Anlage sid03Data dsn=AC000W000028486
attr H2O_Anlage sid03Header1 Referer: https://wifi.ecowater.com/Dashboard/Index/Benutzername/AC000W000028486
attr H2O_Anlage sid03Header2 X-Requested-With: XMLHttpRequest
attr H2O_Anlage sid03Header3 User-Agent: Mozilla/5.0 Gecko/20100101 Firefox/56.0
attr H2O_Anlage sid03URL https://wifi.ecowater.com/Dashboard/UpdateFrequentData

Wo muss ich Überall Benutzername und Passwort ersetzen habe 5 mal Benutzername und einmal Passwort gefunden ist das richtig?
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 19 Dezember 2018, 21:04:49
Ja, das ist richtig


Gesendet von iPhone mit Tapatalk
Titel: Antw:HTTPMOD Login
Beitrag von: Black7king am 19 Dezember 2018, 21:13:48
Ja, das ist richtig


Gesendet von iPhone mit Tapatalk

Jetzt noch eine Frage Benutzername ist doch die eMail Adresse oder?
Titel: Antw:HTTPMOD Login
Beitrag von: holzwurm83 am 19 Dezember 2018, 21:21:48
Richtig


Gesendet von iPhone mit Tapatalk
Titel: Antw:HTTPMOD Login
Beitrag von: SW7 am 14 Januar 2019, 01:52:41
Hallo, ich bastle jetzt schon eine ganze weile am Login zur Tigo Seite rum und komme nicht weiter.
Zur erfolgreichen Anmeldung muss ich einen Teil aus dem Cookie, oder besser einen Token, zusammen mit den Anmeldedaten übergeben.
Das konnte ich zwischenzeitig verifizieren.
Und da stehe ich auf dem Schlauch.
Wie speichere ich den Cookie zwischen, um Ihn dann wieder zu verwenden?
Muss ich dann auch noch Splitten, oder kann ich gezielt zugreifen?

Ich habe folgenden Header im List meines Devices:
headerContent-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=8vkmjklimripi0ef7tcuqk4jr0; YII_CSRF_TOKEN=9538fe12b5b5732a615e9e8fba44fd5b5a15ffe2; lang=English

bzw. folgende HTTPCookieHashs:

HTTPCookieHash:
     PHPSESSID;/:
       Name       PHPSESSID
       Options    path=/
       Path       /
       Value      l6up69oa11qnf5po5e2vbrc9o1
     YII_CSRF_TOKEN;/:
       Name       YII_CSRF_TOKEN
       Options    path=/
       Path       /
       Value      9538fe12b5b5732a615e9e8fba44fd5b5a15ffe2

mein sid1Data soll so aussehen:
attr Solaranlage sid1Data YII_CSRF_TOKEN=9538fe12b5b5732a615e9e8fba44fd5b5a15ffe2&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=nur eben mit dynamisch generiertem (jeweils gültigem) Token.

Kann mir jemand auf die Sprünge helfen?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 14 Januar 2019, 20:32:52
Wie speichere ich den Cookie zwischen, um Ihn dann wieder zu verwenden?
Grundsätzlich einfach mit attr Solaranlage enableCookies 1Den Cookie brauchst Du dann in den Headers oder sid1Data nicht.

Um weiter zu helfen brauche ich ein vollständiges "list Solaranlage" und einen Logauszug mit verbose 5 (ggf. User/Passwörter anonymisieren).
Titel: Antw:HTTPMOD Login
Beitrag von: SW7 am 14 Januar 2019, 21:02:23
Hi,

hier der List:
Internals:
   .getList   
   .setList   interval reread:noArg stop:noArg start:noArg upgradeAttributes:noArg storeKeyValue
   .updateRequestHash 1
   BUSY       0
   CFGFN     
   DEF        https://installations.tigoenergy.com/base/main/status/view/sysid/38067 300
   Interval   300
   JSONEnabled 1
   LASTSEND   1547494398.83294
   LastAuthTry 2019-01-14 20:08:05
   MainURL    https://installations.tigoenergy.com/base/main/status/view/sysid/38067
   ModuleVersion 3.5.4 - 9.11.2018
   NAME       Solaranlage
   NR         17332
   STATE      ???
   TRIGGERTIME 1547494602.61066
   TRIGGERTIME_FMT 2019-01-14 20:36:42
   TYPE       HTTPMOD
   addr       https://installations.tigoenergy.com:443
   auth       0
   buf       
   code       200
   compress   1
   conn       
   data       
   displayurl https://installations.tigoenergy.com/base/main/status/view/sysid/38067
   header     Cookie: PHPSESSID=c2t5def17sedd7at4tu4lukv74; YII_CSRF_TOKEN=49b157fb1e1e96f6a4652eec7dca2538f2f1ec65; _identity=%5B40796%2C%22ug9TXtssSXYZ0g5k7Kd8L8xkZALyn68NoxR1CgQfIKw5.FA0ss4pExk5%5C%2FeYoSEkwzdDa6sgwQZ7CejDfz16h7f.4I848MV1%5C%2FuisagLvrhsg3UxUJH7eQjbL6gUQu98Bl%22%2C%225184000%22%5D; lang=German; username=**USERNAME-ALIAS -> ist nicht die Emailadresse aus der Anmeldung**
   host       installations.tigoenergy.com
   httpheader HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 19:33:19 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=German; expires=Thu, 09-Jan-2020 19:33:19 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 3391
Connection: close
Content-Type: text/html; charset=UTF-8
   httpversion 1.1
   hu_blocking 0
   hu_filecount 6
   hu_port    443
   hu_portSfx
   ignoreredirects 1
   loglevel   4
   path       /base/main/status/view/sysid/38067
   protocol   https
   redirects  0
   timeout    2
   url        https://installations.tigoenergy.com/base/main/status/view/sysid/38067
   value      0
   .attraggr:
   .attrminint:
   .readingParseList:
     01
     02
     03
     04
     05
     06
     07
   HTTPCookieHash:
     PHPSESSID;/:
       Name       PHPSESSID
       Options    path=/
       Path       /
       Value      c2t5def17sedd7at4tu4lukv74
     YII_CSRF_TOKEN;/:
       Name       YII_CSRF_TOKEN
       Options    path=/
       Path       /
       Value      49b157fb1e1e96f6a4652eec7dca2538f2f1ec65
     _identity;/:
       Name       _identity
       Options    path=/
       Path       /
       Value      %5B40796%2C%22ug9TXtssSXYZ0g5k7Kd8L8xkZALyn68NoxR1CgQfIKw5.FA0ss4pExk5%5C%2FeYoSEkwzdDa6sgwQZ7CejDfz16h7f.4I848MV1%5C%2FuisagLvrhsg3UxUJH7eQjbL6gUQu98Bl%22%2C%225184000%22%5D
     lang;/:
       Name       lang
       Options    expires=Thu, 09-Jan-2020 19:33:19 GMT; Max-Age=31104000; path=/
       Path       /
       Value      German
     username;/:
       Name       username
       Options    path=/
       Path       /
       Value      **USERNAME-ALIAS -> ist nicht die Emailadresse aus der Anmeldung**
   QUEUE:
REQUEST:
     data       
     header     
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://installations.tigoenergy.com/base/main/status/view/sysid/38067
     value      0
   sslargs:
Attributes:
   dontRequeueAfterAuth 1
   enableControlSet 1
   enableCookies 1
   extractAllJSON 1
   handleRedirects 1
   httpVersion 1.1
   reAuthRegex password
   reading01Name YII_CSRF_TOKEN
   reading01Regex id=\"login_form\".action=\"/base/login/login?skin=\".method=\"post\">\s*<input type=\"hidden\".value=\"(.*)\".name="YII_CSRF_TOKEN
   reading02Name B1
   reading02RegOpt s
   reading02Regex <td>B1<\/td>\s*<td.nowrap>(.*).<\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)\s*<\/td>
   reading03Name B2
   reading03RegOpt s
   reading03Regex <td>B2<\/td>\s*<td.nowrap>(.*).<\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)\s*<\/td>
   reading04Name B3
   reading04RegOpt s
   reading04Regex <td>B3<\/td>\s*<td.nowrap>(.*).<\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)\s*<\/td>
   reading05Name B4
   reading05RegOpt s
   reading05Regex <td>B4<\/td>\s*<td.nowrap>(.*).<\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)\s*<\/td>
   reading06Name B5
   reading06RegOpt s
   reading06Regex <td>B5<\/td>\s*<td.nowrap>(.*).<\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)\s*<\/td>
   reading07Name B6
   reading07RegOpt s
   reading07Regex <td>B6<\/td>\s*<td.nowrap>(.*).<\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>\s*(.*)<\/td>
   room       Solaranlage
   sid1Data   YII_CSRF_TOKEN=49b157fb1e1e96f6a4652eec7dca2538f2f1ec65&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=
   sid1Header1 Content-Type: application/x-www-form-urlencoded
   sid1Header2 Accept: text/html
   sid1Header3 Accept: application/xhtml+xml
   sid1Header4 Accept: application/xml
   sid1URL    https://installations.tigoenergy.com/base/login/login
   userattr   reading01Name reading01Regex reading02Name reading02RegOpt reading02Regex reading03Name reading03RegOpt reading03Regex reading04Name reading04RegOpt reading04Regex reading05Name reading05RegOpt reading05Regex reading06Name reading06RegOpt reading06Regex reading07Name reading07RegOpt reading07Regex reading1Name reading1RegOpt reading1Regex reading2Name reading2RegOpt reading2Regex reading3Name reading3RegOpt reading3Regex requestHeader1 sid1Data sid1Header1 sid1Header2 sid1Header3 sid1Header4 sid1Header5 sid1URL
   verbose    5

Bei jedem Aufruf der Seite wird neben dem Cookie auch ein Token generiert. Dieser Token muss bei sid1Data mitgegeben werden. So wie ich das mal von Hand eingetragen haben. Da der Token aber regelmäßig wechselt, sollte idealerweise der Token generisch in sid1Data eingefügt werden.
Im Formular Feld ist es ein verstecktes Input Feld.

Nach dem händischen/statischen setzen in sid1Data hat der Login einwandfrei funktioniert.

Ich habe mal versucht mit reading01Name den Token auszulesen. Aber da stimmt wohl mit dem Regex noch was nicht.
2019.01.14 20:46:45 4: Solaranlage: Read response to update did not match YII_CSRF_TOKEN
reading01Regex id=\"login_form\".action=\"/base/login/login?skin=\".method=\"post\">\s*<input type=\"hidden\".value=\"(.*)\".name="YII_CSRF_TOKEN

Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 14 Januar 2019, 21:26:32
Mit sid01RegexIdRegex kannst Du nw. den Token fangen, und dann mit $sid weiter nutzen.

IdRegex könnte etwas wie :
(YII_CSRF_TOKEN=.*?);sein
Titel: Antw:HTTPMOD Login
Beitrag von: SW7 am 14 Januar 2019, 22:33:46
Hi,

hier mal ein Log vom fehlerhaften Verbindungsaufbau.
Habe deinen Vorschlag mal versucht einzubauen, doch hat so leider nicht geklappt:

2019.01.14 22:24:35 5: Tigo_Opti: set called with reread
2019.01.14 22:24:35 4: Tigo_Opti: GetUpdate called (reread)
2019.01.14 22:24:35 4: Tigo_Opti: AddToQueue adds update, initial queue len: 0
2019.01.14 22:24:35 5: Tigo_Opti: AddToQueue adds type update to URL https://installations.tigoenergy.com/base/main/status/view/sysid/38067, no data, no headers, retry 0
2019.01.14 22:24:35 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.14 22:24:35 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value nbqjubu1vjaccok8qk8j9e2u61 (key PHPSESSID;/, destination path is /base/main/status/view/sysid/38067)
2019.01.14 22:24:35 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 08c2ac74dae5ccd1d8f10f1233da85be313701d7 (key YII_CSRF_TOKEN;/, destination path is /base/main/status/view/sysid/38067)
2019.01.14 22:24:35 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/main/status/view/sysid/38067)
2019.01.14 22:24:35 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
2019.01.14 22:24:35 4: Tigo_Opti: HandleSendQueue sends request type update to URL https://installations.tigoenergy.com/base/main/status/view/sysid/38067, No Data,
header: Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
timeout 2
2019.01.14 22:24:35 5: HttpUtils url=https://installations.tigoenergy.com/base/main/status/view/sysid/38067
2019.01.14 22:24:35 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.14 22:24:35 5: HttpUtils request header:
GET /base/main/status/view/sysid/38067 HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.01.14 22:24:36 4: https://installations.tigoenergy.com/base/main/status/view/sysid/38067: HTTP response code 302
2019.01.14 22:24:36 5: HttpUtils https://installations.tigoenergy.com/base/main/status/view/sysid/38067: Got data, length: 0
2019.01.14 22:24:36 5: HttpUtils response header:
HTTP/1.1 302 Found
Date: Mon, 14 Jan 2019 21:24:35 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: https://installations.tigoenergy.com/base/login/login
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.14 22:24:36 4: Tigo_Opti: Read callback: request type was update retry 0, body empty
2019.01.14 22:24:36 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.14 22:24:36 5: Tigo_Opti: ExtractSid called, context reading, num
2019.01.14 22:24:36 4: Tigo_Opti: checking for redirects, code=302, ignore=0
2019.01.14 22:24:36 4: Tigo_Opti: https://installations.tigoenergy.com/base/main/status/view/sysid/38067: Redirect (1) to https://installations.tigoenergy.com/base/login/login
2019.01.14 22:24:36 4: Tigo_Opti: AddToQueue adds update, initial queue len: 0, prio
2019.01.14 22:24:36 5: Tigo_Opti: AddToQueue prepends type update to URL https://installations.tigoenergy.com/base/login/login, no data, no headers, retry 0
2019.01.14 22:24:36 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.14 22:24:36 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value nbqjubu1vjaccok8qk8j9e2u61 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.14 22:24:36 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 08c2ac74dae5ccd1d8f10f1233da85be313701d7 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.14 22:24:36 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.14 22:24:36 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
2019.01.14 22:24:36 4: Tigo_Opti: HandleSendQueue sends request type update to URL https://installations.tigoenergy.com/base/login/login, No Data,
header: Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
timeout 2
2019.01.14 22:24:36 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.14 22:24:36 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.14 22:24:37 5: HttpUtils request header:
GET /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.01.14 22:24:37 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 200
2019.01.14 22:24:37 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 5881
2019.01.14 22:24:37 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 21:24:37 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Thu, 09-Jan-2020 21:24:37 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2275
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.14 22:24:37 4: Tigo_Opti: Read callback: request type was update retry 0,
Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=IE8" />
    <link rel="stylesheet" type="text/css" href="/base/css/login_template.css?v1" />
<script type="text/javascript" src="/base/assets/36278b34/jquery.min.js"></script>
<script type="text/javascript">
/*<![CDATA[*/

    function selectLink(id) {
        //Changes selected link
        var link = document.getElementById(id);
        link.removeAttribute('href');
        link.className += ' selected';
        var menuId = id + '_menu';
        if (link.parentNode.className == 'submenu hidemenu') {
            link.parentNode.className = 'submenu'; //makes submenu visible
            var parentName = link.parentNode.id.substring(0, link.parentNode.id.length - 5);
            document.getElementById(parentName).className += ' selected';
        }
        else {
            if (document.getElementById(menuId)) {
                document.getElementById(menuId).className = 'submenu';
            }
        }
    }

/*]]>*/
</script>
<title>User Login - Tigo Energy</title>
                <link rel="icon" href="/base/images/favicon.ico" type="image/ico" />
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//stats.tigoenergy.com/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', 2]);
            var d   = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type  = 'text/javascript';
            g.async = true;
            g.defer = true;
            g.src   = u + 'piwik.js';
            s.parentNode.insertBefore(g, s);
        })();
    </script>
</head>
<body onload='if(document.form1) document.form1.username.focus();'>
<div id="container">
    <div id="header">
                <span id="logo">
                    <a href="http://www.tigoenergy.com"><img src="/base/images/small_tigo_transparent.png" alt="logo" border="0" /></a>
                </span>
        <div style="float:right;padding-right:10px;padding-top:10px;">
            <select id="locale_select" style="margin-top:5px;" onchange="js:window.location = &#039;/base/login/login?skin=&#039; + &#039;&amp;lang=&#039; + $(this).val();" name="locale_select">
<option value="0" selected="selected">English (North America)</option>
<option value="6">中文</option>
<option value="7">Čech</option>
<option value="4">Français</option>
<option value="1">Deutsch</option>
<option value="3">Italiano</option>
<option value="2">日本語</option>
<option value="8">한국인</option>
<option value="5">Español</option>
<option value="9">ελληνικά</option>
</select>        </div>
    </div>
    <div id="navcontainer">
        <div style="clear:both"></div>
        <div id="maincontent"><style>
    .prominent-href {
        font-size: 14px;
        display: block;
        text-decoration: underline !important;
        margin-bottom: 5px !important;
    }
</style>
<div id="banner_cont">
    <div style="width:322px;">&nbsp;</div>
            <div>
            <a href="http://www.tigoenergy.com/site.php?13429"><img style="border:none;margin-left:4px;" src="/login/view_existing_tigo_installations.jpg" width="322" height="123" border="0" /></a>
        </div>
        <div style="margin-left:5px;">
            <a style="background-image:none;" href="http://www.tigoenergy.com/why-tigo/case-studies/"><img style="border: none;" src="/login/web_banner_case_studies.png" width="322" height="120" /></a>
        </div>
    </div>

<div id="form_cont" style="margin-left:10px;">
    <form name="form1" style="border-left:1px solid #d1d1d1;" id="login_form" action="/base/login/login?skin=" method="post">
<input type="hidden" value="08c2ac74dae5ccd1d8f10f1233da85be313701d7" name="YII_CSRF_TOKEN" />    <a class="prominent-href" href="/base/account/register?skin=">New Installer? Sign Up</a><br>
    <p class="form_label"><label for="username">Login ID</label></p>
    <input id="username" name="Users[login]" type="text" maxlength="64" />    <br>
    <br>
    <br>
    <p class="form_label">
        <label for="password" style="white-space:nowrap">Password</label></p>
    <input id="password" autocomplete="off" name="Users[password]" type="password" />    <br>
    <br>
        <a class="prominent-href" href="/base/account/password?skin=">Forgot Password</a>
    <a class="prominent-href" href="/base/account/forgotloginid?skin=">Forgot Login ID</a>
    <br>
    <div style="color:red;"></div>
    <br>
    <input name="Submit" id="orange_btn" type="submit" value="Login" />    <input type="hidden" name="type" id="type" />    </form></div>
</div>
    </div>
    <div id="footer">
        <table width=100% border="0" cellspacing="5" cellpadding="0">
            <tr style="font-size:1.1em;">
                <td style="text-align: left; padding: 10px 0 0 20px;">
                    Optimized by Tigo. Copyright &copy; 2007-2019 Tigo Energy, Inc. All Rights Reserved                </td>
                <td style="text-align: center; padding: 10px 0 0 20px; ">
                                    </td>
                <td style="text-align: right; padding: 10px 20px 0 0;">
                    <a href="http://www.tigoenergy.com/privacy-policy/">
                        Privacy Policy                    </a>
                </td>
            </tr>
        </table>
    </div>
    <div id="footer_border">&nbsp;</div>
</div>
<noscript><p><img src="//stats.tigoenergy.com/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
</body>
</html>

2019.01.14 22:24:37 3: Tigo_Opti: error while parsing JSON data: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html PUBLI...") at (eval 31404) line 1.

2019.01.14 22:24:37 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.14 22:24:37 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert deleted Rest expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
2019.01.14 22:24:37 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert English Rest expires=Thu, 09-Jan-2020 21:24:37 GMT; Max-Age=31104000; path=/
2019.01.14 22:24:37 5: Tigo_Opti: ExtractSid called, context reading, num
2019.01.14 22:24:37 4: Tigo_Opti: checking for redirects, code=200, ignore=0
2019.01.14 22:24:37 4: Tigo_Opti: no redirects to handle
2019.01.14 22:24:37 5: Tigo_Opti: CheckAuth is checking buffer with ReAuthRegex password
2019.01.14 22:24:37 4: Tigo_Opti: CheckAuth decided new authentication required
2019.01.14 22:24:37 4: Tigo_Opti: Auth called with Steps: 1
2019.01.14 22:24:37 4: Tigo_Opti: AddToQueue adds auth1, initial queue len: 0, prio
2019.01.14 22:24:37 5: Tigo_Opti: AddToQueue prepends type auth1 to URL https://installations.tigoenergy.com/base/login/login, data YII_CSRF_TOKEN=$sid&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=, header Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml, retry 0
2019.01.14 22:24:37 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.14 22:24:37 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value nbqjubu1vjaccok8qk8j9e2u61 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.14 22:24:37 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 08c2ac74dae5ccd1d8f10f1233da85be313701d7 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.14 22:24:37 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.14 22:24:37 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
2019.01.14 22:24:37 4: Tigo_Opti: HandleSendQueue sends request type auth1 to URL https://installations.tigoenergy.com/base/login/login,
data: YII_CSRF_TOKEN=$sid&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=,
header: Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
timeout 2
2019.01.14 22:24:37 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.14 22:24:37 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.14 22:24:38 5: HttpUtils request header:
POST /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
Content-Length: 106

2019.01.14 22:24:38 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 302
2019.01.14 22:24:38 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 0
2019.01.14 22:24:38 5: HttpUtils response header:
HTTP/1.1 302 Found
Date: Mon, 14 Jan 2019 21:24:38 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: https://installations.tigoenergy.com/base/login/login
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.14 22:24:38 4: Tigo_Opti: Read callback: request type was auth1 retry 0, body empty
2019.01.14 22:24:38 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.14 22:24:38 5: Tigo_Opti: ExtractSid called, context sid, num 1
2019.01.14 22:24:38 5: Tigo_Opti: ExtractSid could not match buffer to IdRegex (YII_CSRF_TOKEN=.*?);
2019.01.14 22:24:38 4: Tigo_Opti: checking for redirects, code=302, ignore=0
2019.01.14 22:24:38 4: Tigo_Opti: https://installations.tigoenergy.com/base/login/login: Redirect (1) to https://installations.tigoenergy.com/base/login/login
2019.01.14 22:24:38 4: Tigo_Opti: AddToQueue adds auth1, initial queue len: 0, prio
2019.01.14 22:24:38 5: Tigo_Opti: AddToQueue prepends type auth1 to URL https://installations.tigoenergy.com/base/login/login, no data, header Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml, retry 0
2019.01.14 22:24:38 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.14 22:24:38 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value nbqjubu1vjaccok8qk8j9e2u61 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.14 22:24:38 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 08c2ac74dae5ccd1d8f10f1233da85be313701d7 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.14 22:24:38 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.14 22:24:38 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
2019.01.14 22:24:38 4: Tigo_Opti: HandleSendQueue sends request type auth1 to URL https://installations.tigoenergy.com/base/login/login, No Data,
header: Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
timeout 2
2019.01.14 22:24:38 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.14 22:24:38 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.14 22:24:39 5: HttpUtils request header:
GET /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
Content-Length: 0

2019.01.14 22:24:39 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 200
2019.01.14 22:24:39 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 5881
2019.01.14 22:24:39 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 21:24:39 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Thu, 09-Jan-2020 21:24:39 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2275
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.14 22:24:39 4: Tigo_Opti: Read callback: request type was auth1 retry 0,
Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=IE8" />
    <link rel="stylesheet" type="text/css" href="/base/css/login_template.css?v1" />
<script type="text/javascript" src="/base/assets/36278b34/jquery.min.js"></script>
<script type="text/javascript">
/*<![CDATA[*/

    function selectLink(id) {
        //Changes selected link
        var link = document.getElementById(id);
        link.removeAttribute('href');
        link.className += ' selected';
        var menuId = id + '_menu';
        if (link.parentNode.className == 'submenu hidemenu') {
            link.parentNode.className = 'submenu'; //makes submenu visible
            var parentName = link.parentNode.id.substring(0, link.parentNode.id.length - 5);
            document.getElementById(parentName).className += ' selected';
        }
        else {
            if (document.getElementById(menuId)) {
                document.getElementById(menuId).className = 'submenu';
            }
        }
    }

/*]]>*/
</script>
<title>User Login - Tigo Energy</title>
                <link rel="icon" href="/base/images/favicon.ico" type="image/ico" />
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//stats.tigoenergy.com/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', 2]);
            var d   = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type  = 'text/javascript';
            g.async = true;
            g.defer = true;
            g.src   = u + 'piwik.js';
            s.parentNode.insertBefore(g, s);
        })();
    </script>
</head>
<body onload='if(document.form1) document.form1.username.focus();'>
<div id="container">
    <div id="header">
                <span id="logo">
                    <a href="http://www.tigoenergy.com"><img src="/base/images/small_tigo_transparent.png" alt="logo" border="0" /></a>
                </span>
        <div style="float:right;padding-right:10px;padding-top:10px;">
            <select id="locale_select" style="margin-top:5px;" onchange="js:window.location = &#039;/base/login/login?skin=&#039; + &#039;&amp;lang=&#039; + $(this).val();" name="locale_select">
<option value="0" selected="selected">English (North America)</option>
<option value="6">中文</option>
<option value="7">Čech</option>
<option value="4">Français</option>
<option value="1">Deutsch</option>
<option value="3">Italiano</option>
<option value="2">日本語</option>
<option value="8">한국인</option>
<option value="5">Español</option>
<option value="9">ελληνικά</option>
</select>        </div>
    </div>
    <div id="navcontainer">
        <div style="clear:both"></div>
        <div id="maincontent"><style>
    .prominent-href {
        font-size: 14px;
        display: block;
        text-decoration: underline !important;
        margin-bottom: 5px !important;
    }
</style>
<div id="banner_cont">
    <div style="width:322px;">&nbsp;</div>
            <div>
            <a href="http://www.tigoenergy.com/site.php?13429"><img style="border:none;margin-left:4px;" src="/login/view_existing_tigo_installations.jpg" width="322" height="123" border="0" /></a>
        </div>
        <div style="margin-left:5px;">
            <a style="background-image:none;" href="http://www.tigoenergy.com/why-tigo/case-studies/"><img style="border: none;" src="/login/web_banner_case_studies.png" width="322" height="120" /></a>
        </div>
    </div>

<div id="form_cont" style="margin-left:10px;">
    <form name="form1" style="border-left:1px solid #d1d1d1;" id="login_form" action="/base/login/login?skin=" method="post">
<input type="hidden" value="08c2ac74dae5ccd1d8f10f1233da85be313701d7" name="YII_CSRF_TOKEN" />    <a class="prominent-href" href="/base/account/register?skin=">New Installer? Sign Up</a><br>
    <p class="form_label"><label for="username">Login ID</label></p>
    <input id="username" name="Users[login]" type="text" maxlength="64" />    <br>
    <br>
    <br>
    <p class="form_label">
        <label for="password" style="white-space:nowrap">Password</label></p>
    <input id="password" autocomplete="off" name="Users[password]" type="password" />    <br>
    <br>
        <a class="prominent-href" href="/base/account/password?skin=">Forgot Password</a>
    <a class="prominent-href" href="/base/account/forgotloginid?skin=">Forgot Login ID</a>
    <br>
    <div style="color:red;"></div>
    <br>
    <input name="Submit" id="orange_btn" type="submit" value="Login" />    <input type="hidden" name="type" id="type" />    </form></div>
</div>
    </div>
    <div id="footer">
        <table width=100% border="0" cellspacing="5" cellpadding="0">
            <tr style="font-size:1.1em;">
                <td style="text-align: left; padding: 10px 0 0 20px;">
                    Optimized by Tigo. Copyright &copy; 2007-2019 Tigo Energy, Inc. All Rights Reserved                </td>
                <td style="text-align: center; padding: 10px 0 0 20px; ">
                                    </td>
                <td style="text-align: right; padding: 10px 20px 0 0;">
                    <a href="http://www.tigoenergy.com/privacy-policy/">
                        Privacy Policy                    </a>
                </td>
            </tr>
        </table>
    </div>
    <div id="footer_border">&nbsp;</div>
</div>
<noscript><p><img src="//stats.tigoenergy.com/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
</body>
</html>

2019.01.14 22:24:39 3: Tigo_Opti: error while parsing JSON data: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html PUBLI...") at (eval 31407) line 1.

2019.01.14 22:24:39 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.14 22:24:39 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert deleted Rest expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
2019.01.14 22:24:39 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert English Rest expires=Thu, 09-Jan-2020 21:24:39 GMT; Max-Age=31104000; path=/
2019.01.14 22:24:39 5: Tigo_Opti: ExtractSid called, context sid, num 1
2019.01.14 22:24:39 5: Tigo_Opti: ExtractSid could not match buffer to IdRegex (YII_CSRF_TOKEN=.*?);
2019.01.14 22:24:39 4: Tigo_Opti: checking for redirects, code=200, ignore=0
2019.01.14 22:24:39 4: Tigo_Opti: no redirects to handle

hier das attr zum Device:
attr Tigo_Opti sidIdRegex (YII_CSRF_TOKEN=.*?);
Bitte nicht wundern, habe zum test die Devices "geklont". sind aber alle identisch, bis auf die verschiedenen Readings.
:-)
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 15 Januar 2019, 10:27:18
Bitte auch ein "list" des HTTPMOD Device
Ich vermute, Du musst ein zweistufiges Authentifizierungsverfahren implementieren.

Zuerst die login Seite aufrufen und den sid fangen.
Dann diese sid im 2. Stufe benutzen.

Anscheinend findet er aber den Token nicht.
Titel: Antw:HTTPMOD Login
Beitrag von: SW7 am 15 Januar 2019, 19:05:32
Hi,

hier der List vom Device:

Internals:
   .getList   
   .setList   interval reread:noArg stop:noArg start:noArg upgradeAttributes:noArg storeKeyValue
   .updateReadingList 1
   .updateRequestHash 1
   BUSY       0
   CHANGED   
   DEF        https://installations.tigoenergy.com/base/main/status/view/sysid/38067 300
   Interval   300
   JSONEnabled 1
   LASTSEND   1547506457.59967
   LastAuthTry 2019-01-14 23:54:16
   MainURL    https://installations.tigoenergy.com/base/main/status/view/sysid/38067
   ModuleVersion 3.5.4 - 9.11.2018
   NAME       Tigo_Opti
   NR         316
   STATE      ???
   TRIGGERTIME 1547575463.78943
   TRIGGERTIME_FMT 2019-01-15 19:04:23
   TYPE       HTTPMOD
   addr       https://installations.tigoenergy.com:443
   auth       0
   buf       
   code       200
   compress   1
   conn       
   data       
   displayurl https://installations.tigoenergy.com/base/login/login
   header     Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=nbqjubu1vjaccok8qk8j9e2u61; YII_CSRF_TOKEN=08c2ac74dae5ccd1d8f10f1233da85be313701d7; lang=English
   host       installations.tigoenergy.com
   httpheader HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 22:54:18 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Thu, 09-Jan-2020 22:54:18 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2275
Connection: close
Content-Type: text/html; charset=UTF-8
   httpversion 1.1
   hu_blocking 0
   hu_filecount 180
   hu_port    443
   hu_portSfx
   ignoreredirects 1
   loglevel   4
   path       /base/login/login
   protocol   https
   redirects  0
   timeout    2
   url        https://installations.tigoenergy.com/base/login/login
   value      0
   HTTPCookieHash:
     PHPSESSID;/:
       Name       PHPSESSID
       Options    path=/
       Path       /
       Value      nbqjubu1vjaccok8qk8j9e2u61
     YII_CSRF_TOKEN;/:
       Name       YII_CSRF_TOKEN
       Options    path=/
       Path       /
       Value      08c2ac74dae5ccd1d8f10f1233da85be313701d7
     lang;/:
       Name       lang
       Options    expires=Thu, 09-Jan-2020 22:54:18 GMT; Max-Age=31104000; path=/
       Path       /
       Value      English
   QUEUE:
   READINGS:
   REQUEST:
     data       
     header     Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
     ignoreredirects 0
     retryCount 0
     type       auth1
     url        https://installations.tigoenergy.com/base/login/login
     value      0
   sslargs:
Attributes:
   disable    1
   dontRequeueAfterAuth 1
   enableControlSet 1
   enableCookies 1
   extractAllJSON 1
   handleRedirects 1
   httpVersion 1.1
   reAuthRegex password
   reading01Name YII_CSRF_TOKEN
   reading01Regex <input.type="hidden".value="(.*)".name="YII_CSRF_TOKEN"
   reading02Name A18
   reading02Regex <td>A18<\/td>\s*<td.nowrap>(.*) <\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<
   room       Solaranlage
   sid1Data   YII_CSRF_TOKEN=$sid&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=
   sid1Header1 Content-Type: application/x-www-form-urlencoded
   sid1Header2 Accept: text/html
   sid1Header3 Accept: application/xhtml+xml
   sid1Header4 Accept: application/xml
   sid1URL    https://installations.tigoenergy.com/base/login/login
   sidIdRegex \s*YII_CSRF_TOKEN=(.*)?.lang
   userattr   reading01Name reading01Regex reading01XPath reading02Name reading02RegOpt reading02Regex reading1Name reading1RegOpt reading1Regex reading2Name reading2RegOpt reading2Regex requestHeader1 sid1Data sid1Header1 sid1Header2 sid1Header3 sid1Header4 sid1Header5 sid1URL sidIdRegex
   verbose    5

In der Tat, findet er den Token nicht.
Habe schon ein wenig mit getIdRegex experimentiert, und auch mit dem Versuch den Token aus der Anmeldeseite, also dem hidden Inputfeld auszulesen. Aber wohl was falsch gemacht.
Aktuell mache ich scheinbar nur eine Anmeldung und nicht mehrere Schritte.
 
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 15 Januar 2019, 21:51:56
sidURL    https://installations.tigoenergy.com/base/login/login
sid1IdRegex (YII_CSRF_TOKEN=.*?);
sid2Data  $sid&Users[login]=user@domain.de&Users[password]=password&Submit=Login&type=

Dann wieder ein "list" und die Log nach einem reread
Titel: Antw:HTTPMOD Login
Beitrag von: SW7 am 16 Januar 2019, 00:11:16
Hi,

vielen Dank erstmal für Deine Unterstützung.  :)

hier das Log:
2019.01.16 00:05:49 5: Tigo_Opti: set called with reread
2019.01.16 00:05:49 4: Tigo_Opti: GetUpdate called (reread)
2019.01.16 00:05:49 4: Tigo_Opti: AddToQueue adds update, initial queue len: 0
2019.01.16 00:05:49 5: Tigo_Opti: AddToQueue adds type update to URL https://installations.tigoenergy.com/base/main/status/view/sysid/38067, no data, no headers, retry 0
2019.01.16 00:05:49 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.16 00:05:49 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value l97s4nbkb75bd1m4edsqvrdf82 (key PHPSESSID;/, destination path is /base/main/status/view/sysid/38067)
2019.01.16 00:05:49 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 7ba17f279d87c71816b0b1ca486fbfd6e42e2682 (key YII_CSRF_TOKEN;/, destination path is /base/main/status/view/sysid/38067)
2019.01.16 00:05:49 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/main/status/view/sysid/38067)
2019.01.16 00:05:49 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
2019.01.16 00:05:49 4: Tigo_Opti: HandleSendQueue sends request type update to URL https://installations.tigoenergy.com/base/main/status/view/sysid/38067, No Data,
header: Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
timeout 2
2019.01.16 00:05:49 5: HttpUtils url=https://installations.tigoenergy.com/base/main/status/view/sysid/38067
2019.01.16 00:05:49 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.16 00:05:50 5: HttpUtils request header:
GET /base/main/status/view/sysid/38067 HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.01.16 00:05:50 4: https://installations.tigoenergy.com/base/main/status/view/sysid/38067: HTTP response code 302
2019.01.16 00:05:50 5: HttpUtils https://installations.tigoenergy.com/base/main/status/view/sysid/38067: Got data, length: 0
2019.01.16 00:05:50 5: HttpUtils response header:
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2019 23:05:50 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: https://installations.tigoenergy.com/base/login/login
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.16 00:05:50 4: Tigo_Opti: Read callback: request type was update retry 0, body empty
2019.01.16 00:05:50 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.16 00:05:50 5: Tigo_Opti: ExtractSid called, context reading, num
2019.01.16 00:05:50 4: Tigo_Opti: checking for redirects, code=302, ignore=0
2019.01.16 00:05:50 4: Tigo_Opti: https://installations.tigoenergy.com/base/main/status/view/sysid/38067: Redirect (1) to https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:50 4: Tigo_Opti: AddToQueue adds update, initial queue len: 0, prio
2019.01.16 00:05:50 5: Tigo_Opti: AddToQueue prepends type update to URL https://installations.tigoenergy.com/base/login/login, no data, no headers, retry 0
2019.01.16 00:05:50 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.16 00:05:50 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value l97s4nbkb75bd1m4edsqvrdf82 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.16 00:05:50 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 7ba17f279d87c71816b0b1ca486fbfd6e42e2682 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.16 00:05:50 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.16 00:05:50 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
2019.01.16 00:05:50 4: Tigo_Opti: HandleSendQueue sends request type update to URL https://installations.tigoenergy.com/base/login/login, No Data,
header: Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
timeout 2
2019.01.16 00:05:50 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:50 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.16 00:05:51 5: HttpUtils request header:
GET /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.01.16 00:05:51 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 200
2019.01.16 00:05:51 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 5881
2019.01.16 00:05:51 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Tue, 15 Jan 2019 23:05:51 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Fri, 10-Jan-2020 23:05:51 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2278
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.16 00:05:51 4: Tigo_Opti: Read callback: request type was update retry 0,
Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=IE8" />
    <link rel="stylesheet" type="text/css" href="/base/css/login_template.css?v1" />
<script type="text/javascript" src="/base/assets/36278b34/jquery.min.js"></script>
<script type="text/javascript">
/*<![CDATA[*/

    function selectLink(id) {
        //Changes selected link
        var link = document.getElementById(id);
        link.removeAttribute('href');
        link.className += ' selected';
        var menuId = id + '_menu';
        if (link.parentNode.className == 'submenu hidemenu') {
            link.parentNode.className = 'submenu'; //makes submenu visible
            var parentName = link.parentNode.id.substring(0, link.parentNode.id.length - 5);
            document.getElementById(parentName).className += ' selected';
        }
        else {
            if (document.getElementById(menuId)) {
                document.getElementById(menuId).className = 'submenu';
            }
        }
    }

/*]]>*/
</script>
<title>User Login - Tigo Energy</title>
                <link rel="icon" href="/base/images/favicon.ico" type="image/ico" />
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//stats.tigoenergy.com/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', 2]);
            var d   = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type  = 'text/javascript';
            g.async = true;
            g.defer = true;
            g.src   = u + 'piwik.js';
            s.parentNode.insertBefore(g, s);
        })();
    </script>
</head>
<body onload='if(document.form1) document.form1.username.focus();'>
<div id="container">
    <div id="header">
                <span id="logo">
                    <a href="http://www.tigoenergy.com"><img src="/base/images/small_tigo_transparent.png" alt="logo" border="0" /></a>
                </span>
        <div style="float:right;padding-right:10px;padding-top:10px;">
            <select id="locale_select" style="margin-top:5px;" onchange="js:window.location = &#039;/base/login/login?skin=&#039; + &#039;&amp;lang=&#039; + $(this).val();" name="locale_select">
<option value="0" selected="selected">English (North America)</option>
<option value="6">中文</option>
<option value="7">Čech</option>
<option value="4">Français</option>
<option value="1">Deutsch</option>
<option value="3">Italiano</option>
<option value="2">日本語</option>
<option value="8">한국인</option>
<option value="5">Español</option>
<option value="9">ελληνικά</option>
</select>        </div>
    </div>
    <div id="navcontainer">
        <div style="clear:both"></div>
        <div id="maincontent"><style>
    .prominent-href {
        font-size: 14px;
        display: block;
        text-decoration: underline !important;
        margin-bottom: 5px !important;
    }
</style>
<div id="banner_cont">
    <div style="width:322px;">&nbsp;</div>
            <div>
            <a href="http://www.tigoenergy.com/site.php?13429"><img style="border:none;margin-left:4px;" src="/login/view_existing_tigo_installations.jpg" width="322" height="123" border="0" /></a>
        </div>
        <div style="margin-left:5px;">
            <a style="background-image:none;" href="http://www.tigoenergy.com/why-tigo/case-studies/"><img style="border: none;" src="/login/web_banner_case_studies.png" width="322" height="120" /></a>
        </div>
    </div>

<div id="form_cont" style="margin-left:10px;">
    <form name="form1" style="border-left:1px solid #d1d1d1;" id="login_form" action="/base/login/login?skin=" method="post">
<input type="hidden" value="7ba17f279d87c71816b0b1ca486fbfd6e42e2682" name="YII_CSRF_TOKEN" />    <a class="prominent-href" href="/base/account/register?skin=">New Installer? Sign Up</a><br>
    <p class="form_label"><label for="username">Login ID</label></p>
    <input id="username" name="Users[login]" type="text" maxlength="64" />    <br>
    <br>
    <br>
    <p class="form_label">
        <label for="password" style="white-space:nowrap">Password</label></p>
    <input id="password" autocomplete="off" name="Users[password]" type="password" />    <br>
    <br>
        <a class="prominent-href" href="/base/account/password?skin=">Forgot Password</a>
    <a class="prominent-href" href="/base/account/forgotloginid?skin=">Forgot Login ID</a>
    <br>
    <div style="color:red;"></div>
    <br>
    <input name="Submit" id="orange_btn" type="submit" value="Login" />    <input type="hidden" name="type" id="type" />    </form></div>
</div>
    </div>
    <div id="footer">
        <table width=100% border="0" cellspacing="5" cellpadding="0">
            <tr style="font-size:1.1em;">
                <td style="text-align: left; padding: 10px 0 0 20px;">
                    Optimized by Tigo. Copyright &copy; 2007-2019 Tigo Energy, Inc. All Rights Reserved                </td>
                <td style="text-align: center; padding: 10px 0 0 20px; ">
                                    </td>
                <td style="text-align: right; padding: 10px 20px 0 0;">
                    <a href="http://www.tigoenergy.com/privacy-policy/">
                        Privacy Policy                    </a>
                </td>
            </tr>
        </table>
    </div>
    <div id="footer_border">&nbsp;</div>
</div>
<noscript><p><img src="//stats.tigoenergy.com/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
</body>
</html>

2019.01.16 00:05:51 3: Tigo_Opti: error while parsing JSON data: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html PUBLI...") at (eval 52900) line 1.

2019.01.16 00:05:51 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.16 00:05:51 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert deleted Rest expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
2019.01.16 00:05:51 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert English Rest expires=Fri, 10-Jan-2020 23:05:51 GMT; Max-Age=31104000; path=/
2019.01.16 00:05:51 5: Tigo_Opti: ExtractSid called, context reading, num
2019.01.16 00:05:51 4: Tigo_Opti: checking for redirects, code=200, ignore=0
2019.01.16 00:05:51 4: Tigo_Opti: no redirects to handle
2019.01.16 00:05:51 5: Tigo_Opti: CheckAuth is checking buffer with ReAuthRegex password
2019.01.16 00:05:51 4: Tigo_Opti: CheckAuth decided new authentication required
2019.01.16 00:05:51 4: Tigo_Opti: Auth called with Steps: 1 2
2019.01.16 00:05:51 4: Tigo_Opti: AddToQueue adds auth2, initial queue len: 0, prio
2019.01.16 00:05:51 5: Tigo_Opti: AddToQueue prepends type auth2 to URL https://installations.tigoenergy.com/base/login/login, data $sid&Users[login]=user%40domain.de&Users[password]=password&Submit=Login&type=, no headers, retry 0
2019.01.16 00:05:51 4: Tigo_Opti: AddToQueue adds auth1, initial queue len: 1, prio
2019.01.16 00:05:51 5: Tigo_Opti: AddToQueue prepends type auth1 to URL https://installations.tigoenergy.com/base/login/login, data YII_CSRF_TOKEN=$sid&Users%5Blogin%5D=user%40password.de&Users%5Bpassword%5D=password&Submit=Login&type=, header Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml, retry 0
2019.01.16 00:05:51 5: Tigo_Opti: HandleSendQueue called, qlen = 2
2019.01.16 00:05:51 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value l97s4nbkb75bd1m4edsqvrdf82 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.16 00:05:51 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 7ba17f279d87c71816b0b1ca486fbfd6e42e2682 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.16 00:05:51 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.16 00:05:51 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
2019.01.16 00:05:51 4: Tigo_Opti: HandleSendQueue sends request type auth1 to URL https://installations.tigoenergy.com/base/login/login,
data: YII_CSRF_TOKEN=$sid&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=,
header: Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
timeout 2
2019.01.16 00:05:51 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:51 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.16 00:05:51 5: HttpUtils request header:
POST /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
Content-Length: 106

2019.01.16 00:05:52 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 302
2019.01.16 00:05:52 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 0
2019.01.16 00:05:52 5: HttpUtils response header:
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2019 23:05:52 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: https://installations.tigoenergy.com/base/login/login
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.16 00:05:52 4: Tigo_Opti: Read callback: request type was auth1 retry 0, body empty
2019.01.16 00:05:52 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.16 00:05:52 5: Tigo_Opti: ExtractSid called, context sid, num 1
2019.01.16 00:05:52 5: Tigo_Opti: ExtractSid could not match buffer to IdRegex (YII_CSRF_TOKEN=.*?);
2019.01.16 00:05:52 4: Tigo_Opti: checking for redirects, code=302, ignore=0
2019.01.16 00:05:52 4: Tigo_Opti: https://installations.tigoenergy.com/base/login/login: Redirect (1) to https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:52 4: Tigo_Opti: AddToQueue adds auth1, initial queue len: 1, prio
2019.01.16 00:05:52 5: Tigo_Opti: AddToQueue prepends type auth1 to URL https://installations.tigoenergy.com/base/login/login, no data, header Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml, retry 0
2019.01.16 00:05:52 5: Tigo_Opti: HandleSendQueue called, qlen = 2
2019.01.16 00:05:52 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value l97s4nbkb75bd1m4edsqvrdf82 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.16 00:05:52 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 7ba17f279d87c71816b0b1ca486fbfd6e42e2682 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.16 00:05:52 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.16 00:05:52 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
2019.01.16 00:05:52 4: Tigo_Opti: HandleSendQueue sends request type auth1 to URL https://installations.tigoenergy.com/base/login/login, No Data,
header: Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
timeout 2
2019.01.16 00:05:52 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:52 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.16 00:05:52 5: HttpUtils request header:
GET /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Content-Type: application/x-www-form-urlencoded
Accept: text/html
Accept: application/xhtml+xml
Accept: application/xml
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
Content-Length: 0

2019.01.16 00:05:52 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 200
2019.01.16 00:05:52 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 5881
2019.01.16 00:05:52 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Tue, 15 Jan 2019 23:05:52 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Fri, 10-Jan-2020 23:05:52 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2278
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.16 00:05:52 4: Tigo_Opti: Read callback: request type was auth1 retry 0,
Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=IE8" />
    <link rel="stylesheet" type="text/css" href="/base/css/login_template.css?v1" />
<script type="text/javascript" src="/base/assets/36278b34/jquery.min.js"></script>
<script type="text/javascript">
/*<![CDATA[*/

    function selectLink(id) {
        //Changes selected link
        var link = document.getElementById(id);
        link.removeAttribute('href');
        link.className += ' selected';
        var menuId = id + '_menu';
        if (link.parentNode.className == 'submenu hidemenu') {
            link.parentNode.className = 'submenu'; //makes submenu visible
            var parentName = link.parentNode.id.substring(0, link.parentNode.id.length - 5);
            document.getElementById(parentName).className += ' selected';
        }
        else {
            if (document.getElementById(menuId)) {
                document.getElementById(menuId).className = 'submenu';
            }
        }
    }

/*]]>*/
</script>
<title>User Login - Tigo Energy</title>
                <link rel="icon" href="/base/images/favicon.ico" type="image/ico" />
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//stats.tigoenergy.com/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', 2]);
            var d   = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type  = 'text/javascript';
            g.async = true;
            g.defer = true;
            g.src   = u + 'piwik.js';
            s.parentNode.insertBefore(g, s);
        })();
    </script>
</head>
<body onload='if(document.form1) document.form1.username.focus();'>
<div id="container">
    <div id="header">
                <span id="logo">
                    <a href="http://www.tigoenergy.com"><img src="/base/images/small_tigo_transparent.png" alt="logo" border="0" /></a>
                </span>
        <div style="float:right;padding-right:10px;padding-top:10px;">
            <select id="locale_select" style="margin-top:5px;" onchange="js:window.location = &#039;/base/login/login?skin=&#039; + &#039;&amp;lang=&#039; + $(this).val();" name="locale_select">
<option value="0" selected="selected">English (North America)</option>
<option value="6">中文</option>
<option value="7">Čech</option>
<option value="4">Français</option>
<option value="1">Deutsch</option>
<option value="3">Italiano</option>
<option value="2">日本語</option>
<option value="8">한국인</option>
<option value="5">Español</option>
<option value="9">ελληνικά</option>
</select>        </div>
    </div>
    <div id="navcontainer">
        <div style="clear:both"></div>
        <div id="maincontent"><style>
    .prominent-href {
        font-size: 14px;
        display: block;
        text-decoration: underline !important;
        margin-bottom: 5px !important;
    }
</style>
<div id="banner_cont">
    <div style="width:322px;">&nbsp;</div>
            <div>
            <a href="http://www.tigoenergy.com/site.php?13429"><img style="border:none;margin-left:4px;" src="/login/view_existing_tigo_installations.jpg" width="322" height="123" border="0" /></a>
        </div>
        <div style="margin-left:5px;">
            <a style="background-image:none;" href="http://www.tigoenergy.com/why-tigo/case-studies/"><img style="border: none;" src="/login/web_banner_case_studies.png" width="322" height="120" /></a>
        </div>
    </div>

<div id="form_cont" style="margin-left:10px;">
    <form name="form1" style="border-left:1px solid #d1d1d1;" id="login_form" action="/base/login/login?skin=" method="post">
<input type="hidden" value="7ba17f279d87c71816b0b1ca486fbfd6e42e2682" name="YII_CSRF_TOKEN" />    <a class="prominent-href" href="/base/account/register?skin=">New Installer? Sign Up</a><br>
    <p class="form_label"><label for="username">Login ID</label></p>
    <input id="username" name="Users[login]" type="text" maxlength="64" />    <br>
    <br>
    <br>
    <p class="form_label">
        <label for="password" style="white-space:nowrap">Password</label></p>
    <input id="password" autocomplete="off" name="Users[password]" type="password" />    <br>
    <br>
        <a class="prominent-href" href="/base/account/password?skin=">Forgot Password</a>
    <a class="prominent-href" href="/base/account/forgotloginid?skin=">Forgot Login ID</a>
    <br>
    <div style="color:red;"></div>
    <br>
    <input name="Submit" id="orange_btn" type="submit" value="Login" />    <input type="hidden" name="type" id="type" />    </form></div>
</div>
    </div>
    <div id="footer">
        <table width=100% border="0" cellspacing="5" cellpadding="0">
            <tr style="font-size:1.1em;">
                <td style="text-align: left; padding: 10px 0 0 20px;">
                    Optimized by Tigo. Copyright &copy; 2007-2019 Tigo Energy, Inc. All Rights Reserved                </td>
                <td style="text-align: center; padding: 10px 0 0 20px; ">
                                    </td>
                <td style="text-align: right; padding: 10px 20px 0 0;">
                    <a href="http://www.tigoenergy.com/privacy-policy/">
                        Privacy Policy                    </a>
                </td>
            </tr>
        </table>
    </div>
    <div id="footer_border">&nbsp;</div>
</div>
<noscript><p><img src="//stats.tigoenergy.com/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
</body>
</html>

2019.01.16 00:05:52 3: Tigo_Opti: error while parsing JSON data: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html PUBLI...") at (eval 52904) line 1.

2019.01.16 00:05:52 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.16 00:05:52 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert deleted Rest expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
2019.01.16 00:05:52 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert English Rest expires=Fri, 10-Jan-2020 23:05:52 GMT; Max-Age=31104000; path=/
2019.01.16 00:05:52 5: Tigo_Opti: ExtractSid called, context sid, num 1
2019.01.16 00:05:52 5: Tigo_Opti: ExtractSid could not match buffer to IdRegex (YII_CSRF_TOKEN=.*?);
2019.01.16 00:05:52 4: Tigo_Opti: checking for redirects, code=200, ignore=0
2019.01.16 00:05:52 4: Tigo_Opti: no redirects to handle
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value l97s4nbkb75bd1m4edsqvrdf82 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 7ba17f279d87c71816b0b1ca486fbfd6e42e2682 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
2019.01.16 00:05:53 4: Tigo_Opti: HandleSendQueue sends request type auth2 to URL https://installations.tigoenergy.com/base/login/login,
data: $sid&Users[login]=user%40domain.de&Users[password]=password&Submit=Login&type=,
header: Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
timeout 2
2019.01.16 00:05:53 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:53 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.16 00:05:53 5: HttpUtils request header:
POST /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
Content-Length: 83
Content-Type: application/x-www-form-urlencoded

2019.01.16 00:05:53 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 302
2019.01.16 00:05:53 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 0
2019.01.16 00:05:53 5: HttpUtils response header:
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2019 23:05:53 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: https://installations.tigoenergy.com/base/login/login
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.16 00:05:53 4: Tigo_Opti: Read callback: request type was auth2 retry 0, body empty
2019.01.16 00:05:53 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.16 00:05:53 5: Tigo_Opti: ExtractSid called, context sid, num 2
2019.01.16 00:05:53 5: Tigo_Opti: ExtractSid could not match buffer to IdRegex \s*YII_CSRF_TOKEN=(.*)?.lang
2019.01.16 00:05:53 4: Tigo_Opti: checking for redirects, code=302, ignore=0
2019.01.16 00:05:53 4: Tigo_Opti: https://installations.tigoenergy.com/base/login/login: Redirect (1) to https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:53 4: Tigo_Opti: AddToQueue adds auth2, initial queue len: 0, prio
2019.01.16 00:05:53 5: Tigo_Opti: AddToQueue prepends type auth2 to URL https://installations.tigoenergy.com/base/login/login, no data, no headers, retry 0
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue called, qlen = 1
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is using Cookie PHPSESSID with path / and Value l97s4nbkb75bd1m4edsqvrdf82 (key PHPSESSID;/, destination path is /base/login/login)
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is using Cookie YII_CSRF_TOKEN with path / and Value 7ba17f279d87c71816b0b1ca486fbfd6e42e2682 (key YII_CSRF_TOKEN;/, destination path is /base/login/login)
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is using Cookie lang with path / and Value English (key lang;/, destination path is /base/login/login)
2019.01.16 00:05:53 5: Tigo_Opti: HandleSendQueue is adding Cookie header: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
2019.01.16 00:05:53 4: Tigo_Opti: HandleSendQueue sends request type auth2 to URL https://installations.tigoenergy.com/base/login/login, No Data,
header: Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
timeout 2
2019.01.16 00:05:53 5: HttpUtils url=https://installations.tigoenergy.com/base/login/login
2019.01.16 00:05:53 4: IP: installations.tigoenergy.com -> 64.62.250.202
2019.01.16 00:05:54 5: HttpUtils request header:
GET /base/login/login HTTP/1.1
Host: installations.tigoenergy.com
User-Agent: fhem
Accept-Encoding: gzip,deflate
Connection: Close
Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2019.01.16 00:05:54 4: https://installations.tigoenergy.com/base/login/login: HTTP response code 200
2019.01.16 00:05:54 5: HttpUtils https://installations.tigoenergy.com/base/login/login: Got data, length: 5881
2019.01.16 00:05:54 5: HttpUtils response header:
HTTP/1.1 200 OK
Date: Tue, 15 Jan 2019 23:05:54 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Fri, 10-Jan-2020 23:05:54 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2278
Connection: close
Content-Type: text/html; charset=UTF-8
2019.01.16 00:05:54 4: Tigo_Opti: Read callback: request type was auth2 retry 0,
Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=IE8" />
    <link rel="stylesheet" type="text/css" href="/base/css/login_template.css?v1" />
<script type="text/javascript" src="/base/assets/36278b34/jquery.min.js"></script>
<script type="text/javascript">
/*<![CDATA[*/

    function selectLink(id) {
        //Changes selected link
        var link = document.getElementById(id);
        link.removeAttribute('href');
        link.className += ' selected';
        var menuId = id + '_menu';
        if (link.parentNode.className == 'submenu hidemenu') {
            link.parentNode.className = 'submenu'; //makes submenu visible
            var parentName = link.parentNode.id.substring(0, link.parentNode.id.length - 5);
            document.getElementById(parentName).className += ' selected';
        }
        else {
            if (document.getElementById(menuId)) {
                document.getElementById(menuId).className = 'submenu';
            }
        }
    }

/*]]>*/
</script>
<title>User Login - Tigo Energy</title>
                <link rel="icon" href="/base/images/favicon.ico" type="image/ico" />
    <script type="text/javascript">
        var _paq = _paq || [];
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "//stats.tigoenergy.com/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', 2]);
            var d   = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type  = 'text/javascript';
            g.async = true;
            g.defer = true;
            g.src   = u + 'piwik.js';
            s.parentNode.insertBefore(g, s);
        })();
    </script>
</head>
<body onload='if(document.form1) document.form1.username.focus();'>
<div id="container">
    <div id="header">
                <span id="logo">
                    <a href="http://www.tigoenergy.com"><img src="/base/images/small_tigo_transparent.png" alt="logo" border="0" /></a>
                </span>
        <div style="float:right;padding-right:10px;padding-top:10px;">
            <select id="locale_select" style="margin-top:5px;" onchange="js:window.location = &#039;/base/login/login?skin=&#039; + &#039;&amp;lang=&#039; + $(this).val();" name="locale_select">
<option value="0" selected="selected">English (North America)</option>
<option value="6">中文</option>
<option value="7">Čech</option>
<option value="4">Français</option>
<option value="1">Deutsch</option>
<option value="3">Italiano</option>
<option value="2">日本語</option>
<option value="8">한국인</option>
<option value="5">Español</option>
<option value="9">ελληνικά</option>
</select>        </div>
    </div>
    <div id="navcontainer">
        <div style="clear:both"></div>
        <div id="maincontent"><style>
    .prominent-href {
        font-size: 14px;
        display: block;
        text-decoration: underline !important;
        margin-bottom: 5px !important;
    }
</style>
<div id="banner_cont">
    <div style="width:322px;">&nbsp;</div>
            <div>
            <a href="http://www.tigoenergy.com/site.php?13429"><img style="border:none;margin-left:4px;" src="/login/view_existing_tigo_installations.jpg" width="322" height="123" border="0" /></a>
        </div>
        <div style="margin-left:5px;">
            <a style="background-image:none;" href="http://www.tigoenergy.com/why-tigo/case-studies/"><img style="border: none;" src="/login/web_banner_case_studies.png" width="322" height="120" /></a>
        </div>
    </div>

<div id="form_cont" style="margin-left:10px;">
    <form name="form1" style="border-left:1px solid #d1d1d1;" id="login_form" action="/base/login/login?skin=" method="post">
<input type="hidden" value="7ba17f279d87c71816b0b1ca486fbfd6e42e2682" name="YII_CSRF_TOKEN" />    <a class="prominent-href" href="/base/account/register?skin=">New Installer? Sign Up</a><br>
    <p class="form_label"><label for="username">Login ID</label></p>
    <input id="username" name="Users[login]" type="text" maxlength="64" />    <br>
    <br>
    <br>
    <p class="form_label">
        <label for="password" style="white-space:nowrap">Password</label></p>
    <input id="password" autocomplete="off" name="Users[password]" type="password" />    <br>
    <br>
        <a class="prominent-href" href="/base/account/password?skin=">Forgot Password</a>
    <a class="prominent-href" href="/base/account/forgotloginid?skin=">Forgot Login ID</a>
    <br>
    <div style="color:red;"></div>
    <br>
    <input name="Submit" id="orange_btn" type="submit" value="Login" />    <input type="hidden" name="type" id="type" />    </form></div>
</div>
    </div>
    <div id="footer">
        <table width=100% border="0" cellspacing="5" cellpadding="0">
            <tr style="font-size:1.1em;">
                <td style="text-align: left; padding: 10px 0 0 20px;">
                    Optimized by Tigo. Copyright &copy; 2007-2019 Tigo Energy, Inc. All Rights Reserved                </td>
                <td style="text-align: center; padding: 10px 0 0 20px; ">
                                    </td>
                <td style="text-align: right; padding: 10px 20px 0 0;">
                    <a href="http://www.tigoenergy.com/privacy-policy/">
                        Privacy Policy                    </a>
                </td>
            </tr>
        </table>
    </div>
    <div id="footer_border">&nbsp;</div>
</div>
<noscript><p><img src="//stats.tigoenergy.com/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
</body>
</html>

2019.01.16 00:05:54 3: Tigo_Opti: error while parsing JSON data: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html PUBLI...") at (eval 52907) line 1.

2019.01.16 00:05:54 5: Tigo_Opti: GetCookies is looking for Cookies
2019.01.16 00:05:54 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert deleted Rest expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
2019.01.16 00:05:54 4: Tigo_Opti: GetCookies parsed Cookie: lang Wert English Rest expires=Fri, 10-Jan-2020 23:05:54 GMT; Max-Age=31104000; path=/
2019.01.16 00:05:54 5: Tigo_Opti: ExtractSid called, context sid, num 2
2019.01.16 00:05:54 5: Tigo_Opti: ExtractSid could not match buffer to IdRegex \s*YII_CSRF_TOKEN=(.*)?.lang
2019.01.16 00:05:54 4: Tigo_Opti: checking for redirects, code=200, ignore=0
2019.01.16 00:05:54 4: Tigo_Opti: no redirects to handle

und dazu das List:
Internals:
   .getList   
   .setList   interval reread:noArg stop:noArg start:noArg upgradeAttributes:noArg storeKeyValue
   .updateReadingList 1
   .updateRequestHash 1
   BUSY       0
   CHANGED   
   DEF        https://installations.tigoenergy.com/base/main/status/view/sysid/38067 300
   Interval   300
   JSONEnabled 1
   LASTSEND   1547593553.89233
   LastAuthTry 2019-01-16 00:05:51
   MainURL    https://installations.tigoenergy.com/base/main/status/view/sysid/38067
   ModuleVersion 3.5.4 - 9.11.2018
   NAME       Tigo_Opti
   NR         316
   STATE      ???
   TRIGGERTIME 1547593815.1123
   TRIGGERTIME_FMT 2019-01-16 00:10:15
   TYPE       HTTPMOD
   addr       https://installations.tigoenergy.com:443
   auth       0
   buf       
   code       200
   compress   1
   conn       
   data       
   displayurl https://installations.tigoenergy.com/base/login/login
   header     Cookie: PHPSESSID=l97s4nbkb75bd1m4edsqvrdf82; YII_CSRF_TOKEN=7ba17f279d87c71816b0b1ca486fbfd6e42e2682; lang=English
   host       installations.tigoenergy.com
   httpheader HTTP/1.1 200 OK
Date: Tue, 15 Jan 2019 23:05:54 GMT
Server: Apache/2.4.18
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: lang=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
Set-Cookie: lang=English; expires=Fri, 10-Jan-2020 23:05:54 GMT; Max-Age=31104000; path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2278
Connection: close
Content-Type: text/html; charset=UTF-8
   httpversion 1.1
   hu_blocking 0
   hu_filecount 30
   hu_port    443
   hu_portSfx
   ignoreredirects 1
   loglevel   4
   path       /base/login/login
   protocol   https
   redirects  0
   timeout    2
   url        https://installations.tigoenergy.com/base/login/login
   value      0
   HTTPCookieHash:
     PHPSESSID;/:
       Name       PHPSESSID
       Options    path=/
       Path       /
       Value      l97s4nbkb75bd1m4edsqvrdf82
     YII_CSRF_TOKEN;/:
       Name       YII_CSRF_TOKEN
       Options    path=/
       Path       /
       Value      7ba17f279d87c71816b0b1ca486fbfd6e42e2682
     lang;/:
       Name       lang
       Options    expires=Fri, 10-Jan-2020 23:05:54 GMT; Max-Age=31104000; path=/
       Path       /
       Value      English
   QUEUE:
   READINGS:
   REQUEST:
     data       
     header     
     ignoreredirects 0
     retryCount 0
     type       auth2
     url        https://installations.tigoenergy.com/base/login/login
     value      0
   sslargs:
Attributes:
   dontRequeueAfterAuth 1
   enableControlSet 1
   enableCookies 1
   extractAllJSON 1
   handleRedirects 1
   httpVersion 1.1
   reAuthRegex password
   reading01Name YII_CSRF_TOKEN
   reading01Regex <input.type="hidden".value="(.*)".name="YII_CSRF_TOKEN"
   reading02Name B1
   reading02Regex <td>B1<\/td>\s*<td.nowrap>(.*) <\/td>\s*<td.nowrap>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<\/td>\s*<td>(.*)<
   room       Solaranlage
   sid1Data   YII_CSRF_TOKEN=$sid&Users%5Blogin%5D=user%40domain.de&Users%5Bpassword%5D=password&Submit=Login&type=
   sid1Header1 Content-Type: application/x-www-form-urlencoded
   sid1Header2 Accept: text/html
   sid1Header3 Accept: application/xhtml+xml
   sid1Header4 Accept: application/xml
   sid1IdRegex (YII_CSRF_TOKEN=.*?);
   sid1URL    https://installations.tigoenergy.com/base/login/login
   sid2Data   $sid&Users[login]=user@domain.de&Users[password]=password&Submit=Login&type=
   sidIdRegex \s*YII_CSRF_TOKEN=(.*)?.lang
   sidURL     https://installations.tigoenergy.com/base/login/login
   userattr   reading01Name reading01Regex reading01XPath reading02Name reading02RegOpt reading02Regex reading1Name reading1RegOpt reading1Regex reading2Name reading2RegOpt reading2Regex requestHeader1 sid1Data sid1Header1 sid1Header2 sid1Header3 sid1Header4 sid1Header5 sid1IdRegex sid1URL sid2Data sidIdRegex sidURL
   verbose    5

ich habe nur deine Vorschläge eingearbeitet, bzw. damit meine überschrieben. Aber nichts entfernt. Richtig?
Titel: Antw:HTTPMOD Login
Beitrag von: amenomade am 16 Januar 2019, 01:04:17
Ne, Du hast zu viele Sachen, teilweise redundant oder die sich überschreiben. Und in step 1 setzt Du schon $sid (mit sid1Data), obwohl es noch nicht bekannt ist.

Es geht so: man ruft die login Seite im Step 1 und extrahiert $sid mit IdRegex. Dann im Step 2 schickt man das ganze und $sid wird ersetzt.
Und die Regex war übrigens falsch.

Somit (und nur damit) komme ich bis zu "Invalid user or password" (habe kein Konto):
defmod Tigo_Opti HTTPMOD https://installations.tigoenergy.com/base/main/status/view/sysid/38067 300
attr Tigo_Opti enableControlSet 1
attr Tigo_Opti enableCookies 1
attr Tigo_Opti handleRedirects 1
attr Tigo_Opti reAuthRegex password
attr Tigo_Opti sid1IdRegex hidden" value="(.*?)" name="YII_CSRF
attr Tigo_Opti sid2Data YII_CSRF_TOKEN=$sid&Users[login]=user@domain.de&Users[password]=password&Submit=Login&type=
attr Tigo_Opti sidURL https://installations.tigoenergy.com/base/login/login
attr Tigo_Opti verbose 5
Titel: Antw:HTTPMOD Login
Beitrag von: SW7 am 16 Januar 2019, 13:46:57
Perfekt!

Das war es! Es tut auf Anhieb.
Ich bin begeistert.

Vielen lieben Dank für die Unterstützung.
Echt lieb von Dir.