***gelöst***HTTPMOD wie richtige Abfrage eintragen - RIKA Pelletofen - Firenet

Begonnen von Helmi55, 04 September 2017, 17:18:00

Vorheriges Thema - Nächstes Thema

Helmi55

Wow Danke für deine Geduld und Hilfe - also das mit Burp wird einige Tage dauern bis ich da den Überblick habe.... 8)

Habe meine alten OfenTest gelöscht und nach deinem Muster neu angelegt - bei den attr habe ich, glaube ich, schon einiges verstanden
Hier das Log
2017.09.06 08:13:33 3: ofen: Defined with URL https://www.rika-firenet.com/web/stove/xxxxxx and interval 60
2017.09.06 08:13:33 1: Including ./log/fhem.save
2017.09.06 08:13:35 4: ofen: GetUpdate called (update)
2017.09.06 08:13:35 4: ofen: update timer modified: will call GetUpdate in 60.0 seconds at 2017-09-06 08:14:35
2017.09.06 08:13:35 4: ofen: AddToQueue adds update, initial queue len: 0
2017.09.06 08:13:35 5: ofen: AddToQueue adds type update to URL https://www.rika-firenet.com/web/stove/xxxxxx, no data, no headers, retry 0
2017.09.06 08:13:35 5: ofen: HandleSendQueue called, qlen = 1
2017.09.06 08:13:35 4: ofen: HandleSendQueue sends request type update to URL https://www.rika-firenet.com/web/stove/xxxxxx, No Data, No Header,
timeout 2
2017.09.06 08:13:35 4: HttpUtils url=https://www.rika-firenet.com/web/stove/xxxxxx
2017.09.06 08:13:35 5: HttpUtils request header:
GET /web/stove/xxxxxx HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:35 4: https://www.rika-firenet.com/web/stove/xxxxxx: HTTP response code 302
2017.09.06 08:13:35 4: HttpUtils https://www.rika-firenet.com/web/stove/xxxxxx: Redirect to https://www.rika-firenet.com:443/web/
2017.09.06 08:13:35 4: HttpUtils url=https://www.rika-firenet.com:443/web/
2017.09.06 08:13:35 5: HttpUtils request header:
GET /web/ HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:35 4: https://www.rika-firenet.com:443/web/: HTTP response code 200
2017.09.06 08:13:35 4: HttpUtils https://www.rika-firenet.com:443/web/: Got data, length: 3631
2017.09.06 08:13:35 5: HttpUtils response header:
HTTP/1.1 200 OK
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 3631
Etag: W/"e2f-jbpBvLM4m9pOpA0HD6+6Dw"
Set-Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8; Path=/; Expires=Wed, 20 Sep 2017 06:13:35 GMT; HttpOnly
Vary: Accept-Encoding
Date: Wed, 06 Sep 2017 06:13:35 GMT
Via: 1.1 vegur
2017.09.06 08:13:35 4: ofen: Read callback: request type was update retry 0,
Header: HTTP/1.1 200 OK
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 3631
Etag: W/"e2f-jbpBvLM4m9pOpA0HD6+6Dw"
Set-Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8; Path=/; Expires=Wed, 20 Sep 2017 06:13:35 GMT; HttpOnly
Vary: Accept-Encoding
Date: Wed, 06 Sep 2017 06:13:35 GMT
Via: 1.1 vegur,
Body: <!DOCTYPE html><html lang="en" dir="ltr"><head><title>RIKA firenet</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- ********** Dynatrace RUM tags ******--><script type="text/javascript" src="https://js-cdn.dynatrace.com/jstag/15a8a271790/hpl92690/f1dedd4f87d6b03a_bs.js" crossorigin="anonymous"></script><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,200"><link rel="stylesheet" href="/assets/rika-firenet.css"><script src="/assets/rika-firenet-en.js"></script><!-- ****** faviconit.com Favicons ******--><link rel="shortcut icon" href="/images/favicon/favicon.ico"><link rel="icon" sizes="16x16 32x32 64x64" href="/images/favicon/favicon.ico"><link rel="icon" type="image/png" sizes="196x196" href="/images/favicon/favicon-192.png"><link rel="icon" type="image/png" sizes="160x160" href="/images/favicon/favicon-160.png"><link rel="icon" type="image/png" sizes="96x96" href="/images/favicon/favicon-96.png"><link rel="icon" type="image/png" sizes="64x64" href="/images/favicon/favicon-64.png"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32.png"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16.png"><link rel="apple-touch-icon" href="/images/favicon/favicon-57.png"><link rel="apple-touch-icon" sizes="114x114" href="/images/favicon/favicon-114.png"><link rel="apple-touch-icon" sizes="72x72" href="/images/favicon/favicon-72.png"><link rel="apple-touch-icon" sizes="144x144" href="/images/favicon/favicon-144.png"><link rel="apple-touch-icon" sizes="60x60" href="/images/favicon/favicon-60.png"><link rel="apple-touch-icon" sizes="120x120" href="/images/favicon/favicon-120.png"><link rel="apple-touch-icon" sizes="76x76" href="/images/favicon/favicon-76.png"><link rel="apple-touch-icon" sizes="152x152" href="/images/favicon/favicon-152.png"><link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/favicon-180.png"><meta name="msapplication-TileColor" content="#FFFFFF"><meta name="msapplication-TileImage" content="/images/favicon/favicon-144.png"><meta name="msapplication-config" content="/images/favicon/browserconfig.xml"><!-- ****** faviconit.com Favicons ******--></head><body id="rika-body"><div data-role="page"><div style="position:relative"><div id="deploymentStage"></div><img src="/images/RIKA_firenet_Logo.svg" style="width:60%; padding:1em 20% 2em 20%"></div><div role="main" class="ui-content"><b>Existing Users</b><a id="login" href="/web/login" data-role="button" data-icon="fa-sign-in" data-iconpos="right" data-theme="a">Log in</a><p class="mc-top-margin-1-5"></p><b>Need an Account?</b><a id="signup" href="/web/signup" data-role="button" data-icon="fa-pencil-square-o" data-iconpos="right" data-theme="a">Create account</a><p class="mc-top-margin-1-5"> </p><p>In order to use this service you need a RIKA pellet stove that is equipped with the RIKA firenet module</p><p>Please contact <a href='http://www.rika.at' target=_blank> a local dealer </a> for more details.</p></div><div id="about-footer"></div></div><div id="gadiv"><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-71662097-1', 'auto');
ga('send', 'pageview');</script></div></body></html>
2017.09.06 08:13:35 3: ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html><html...") at (eval 21176) line 1.

2017.09.06 08:13:35 5: ofen: looking for Cookies in HTTP/1.1 200 OK
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 3631
Etag: W/"e2f-jbpBvLM4m9pOpA0HD6+6Dw"
Set-Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8; Path=/; Expires=Wed, 20 Sep 2017 06:13:35 GMT; HttpOnly
Vary: Accept-Encoding
Date: Wed, 06 Sep 2017 06:13:35 GMT
Via: 1.1 vegur
2017.09.06 08:13:35 5: ofen: Set-Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8; Path=/; Expires=Wed, 20 Sep 2017 06:13:35 GMT; HttpOnly
2017.09.06 08:13:35 4: ofen: Cookie: connect.sid Wert s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8 Rest Path=/; Expires=Wed, 20 Sep 2017 06:13:35 GMT; HttpOnly
2017.09.06 08:13:35 5: ofen: ExtractSid called, context reading, num
2017.09.06 08:13:35 5: ofen: CheckAuth is checking buffer with ReAuthRegex id="login"
2017.09.06 08:13:35 4: ofen: CheckAuth decided new authentication required
2017.09.06 08:13:35 4: ofen: Auth called with Steps: 01
2017.09.06 08:13:35 4: ofen: AddToQueue adds auth01, initial queue len: 0, prio
2017.09.06 08:13:35 5: ofen: AddToQueue prepends type auth01 to URL https://www.rika-firenet.com/web/login, data email=ich%40inet.at&password=strenggeheim, no headers, retry 0
2017.09.06 08:13:35 5: ofen: HandleSendQueue called, qlen = 1
2017.09.06 08:13:35 5: ofen: HandleSendQueue is adding Cookies: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
2017.09.06 08:13:35 4: ofen: HandleSendQueue sends request type auth01 to URL https://www.rika-firenet.com/web/login,
data: email=ich%40inet.at&password=strenggeheim,
header: Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8,
timeout 2
2017.09.06 08:13:35 4: HttpUtils url=https://www.rika-firenet.com/web/login
2017.09.06 08:13:35 4: ofen: AddToQueue adds update, initial queue len: 0
2017.09.06 08:13:35 5: ofen: AddToQueue adds type update to URL https://www.rika-firenet.com/web/stove/xxxxxx, no data, no headers, retry 1
2017.09.06 08:13:35 5: ofen: HandleSendQueue called, qlen = 1
2017.09.06 08:13:35 5: ofen: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2017.09.06 08:13:35 4: ofen: CheckAuth requeued request update after auth, retryCount 0 ...
2017.09.06 08:13:35 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
Content-Length: 42
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:35 4: https://www.rika-firenet.com/web/login: HTTP response code 302
2017.09.06 08:13:35 4: HttpUtils https://www.rika-firenet.com/web/login: Redirect to https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:35 4: HttpUtils url=https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
Content-Length: 42
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:36 4: https://www.rika-firenet.com:443/web/login: HTTP response code 302
2017.09.06 08:13:36 4: HttpUtils https://www.rika-firenet.com:443/web/login: Redirect to https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 4: HttpUtils url=https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
Content-Length: 42
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:36 4: https://www.rika-firenet.com:443/web/login: HTTP response code 302
2017.09.06 08:13:36 4: HttpUtils https://www.rika-firenet.com:443/web/login: Redirect to https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 4: HttpUtils url=https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
Content-Length: 42
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:36 5: ofen: HandleSendQueue called, qlen = 1
2017.09.06 08:13:36 5: ofen: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2017.09.06 08:13:36 4: https://www.rika-firenet.com:443/web/login: HTTP response code 302
2017.09.06 08:13:36 4: HttpUtils https://www.rika-firenet.com:443/web/login: Redirect to https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 4: HttpUtils url=https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:36 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
Content-Length: 42
Content-Type: application/x-www-form-urlencoded

2017.09.06 08:13:37 4: https://www.rika-firenet.com:443/web/login: HTTP response code 302
2017.09.06 08:13:37 4: HttpUtils https://www.rika-firenet.com:443/web/login: Redirect to https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:37 4: HttpUtils url=https://www.rika-firenet.com:443/web/login
2017.09.06 08:13:37 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
Content-Length: 42
Content-Type: application/x-www-form-urlencoded




und hier das List
Internals:
   BUSY       1
   CHANGED
   DEF        https://www.rika-firenet.com/web/stove/xxxxxx 60
   FD         38
   HTTPCookies connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
   Interval   60
   JSONEnabled 1
   LASTSEND   1504679015.74402
   LastAuthTry 2017-09-06 08:23:35
   MainURL    https://www.rika-firenet.com/web/stove/xxxxxx
   ModuleVersion 3.3.11 - 8.5.2017
   NAME       ofen
   NR         273
   STATE      ???
   TRIGGERTIME 1504679075.20149
   TRIGGERTIME_FMT 2017-09-06 08:24:35
   TYPE       HTTPMOD
   addr       https://www.rika-firenet.com:443
   buf
   code       302
   data       email=ich%40inet&password=strenggeheim
   displayurl https://www.rika-firenet.com:443/web/login
   header     Cookie: connect.sid=s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
   host       www.rika-firenet.com
   httpversion 1.0
   hu_blocking 0
   hu_filecount 103
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /web/login
   protocol   https
   redirects  1
   timeout    2
   url        https://www.rika-firenet.com:443/web/login
   value      0
   HTTPCookieHash:
     connect.sid:
       Options    Path=/; Expires=Wed, 20 Sep 2017 06:13:35 GMT; HttpOnly

       Value      s%3Ad-6eOXb30X6trJQ3Q0ymYHmVxeqk8Czs.otmZnF3pMwFWb5U4ED5JNgpkE%2FqMf6Z4CEH8Se4nnp8
   QUEUE:
     HASH(0x42091f8)
   READINGS:
   REQUEST:
     data       email=ich%40inet&password=strenggeheim
     header
     ignoreredirects 0
     retryCount 0
     type       auth01
     url        https://www.rika-firenet.com/web/login
     value      0
   sslargs:
Attributes:
   enableCookies 1
   extractAllJSON 1
   reAuthRegex id="login"
   sid01Data  email=ich%40inet&password=strenggeheim
   sid01URL   https://www.rika-firenet.com/web/login
   userattr   sid01Data sid01URL sid02Data
   verbose    5



Danke Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

amenomade

#16
Anscheinend bist Du nicht erfolgreich eingelogged. Nach der Authentifizierung solltest Du auf der Seite landen, entweder https://www.rika-firenet.com/web/summary wie bei mir, oder direkt auf deinem Ofen, mit HTTP 200 Return Code.

:
2017.09.07 01:58:52 4: https://www.rika-firenet.com:443/web/summary: HTTP response code 200
2017.09.07 01:58:52 4: HttpUtils https://www.rika-firenet.com:443/web/summary: Got data, length: 4838
2017.09.07 01:58:52 5: HttpUtils response header:
HTTP/1.1 200 OK

Server: Cowboy

Connection: close

X-Powered-By: Express

Content-Type: text/html; charset=utf-8

Content-Length: 4838

Etag: W/"12e6-1oYdCv/JIC9coPdszVjxmQ"

Vary: Accept-Encoding

Date: Wed, 06 Sep 2017 23:58:53 GMT

Via: 1.1 vegur
2017.09.07 01:58:52 4: ofen: Read callback: request type was update retry 0,

Header: HTTP/1.1 200 OK

Server: Cowboy

Connection: close

X-Powered-By: Express

Content-Type: text/html; charset=utf-8

Content-Length: 4838

Etag: W/"12e6-1oYdCv/JIC9coPdszVjxmQ"

Vary: Accept-Encoding

Date: Wed, 06 Sep 2017 23:58:53 GMT

Via: 1.1 vegur,

Body: <!DOCTYPE html><html lang="en" dir="ltr"><head><title>RIKA firenet</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- ********** Dynatrace RUM tags ******--><script type="text/javascript" src="https://js-cdn.dynatrace.com/jstag/15a8a271790/hpl92690/f1dedd4f87d6b03a_bs.js" crossorigin="anonymous"></script><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,200"><link rel="stylesheet" href="/assets/rika-firenet.css"><script src="/assets/rika-firenet-en.js"></script><!-- ****** faviconit.com Favicons ******--><link rel="shortcut icon" href="/images/favicon/favicon.ico"><link rel="icon" sizes="16x16 32x32 64x64" href="/images/favicon/favicon.ico"><link rel="icon" type="image/png" sizes="196x196" href="/images/favicon/favicon-192.png"><link rel="icon" type="image/png" sizes="160x160" href="/images/favicon/favicon-160.png"><link rel="icon" type="image/png" sizes="96x96" href="/images/favicon/favicon-96.png"><link rel="icon" type="image/png" sizes="64x64" href="/images/favicon/favicon-64.png"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32.png"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16.png"><link rel="apple-touch-icon" href="/images/favicon/favicon-57.png"><link rel="apple-touch-icon" sizes="114x114" href="/images/favicon/favicon-114.png"><link rel="apple-touch-icon" sizes="72x72" href="/images/favicon/favicon-72.png"><link rel="apple-touch-icon" sizes="144x144" href="/images/favicon/favicon-144.png"><link rel="apple-touch-icon" sizes="60x60" href="/images/favicon/favicon-60.png"><link rel="apple-touch-icon" sizes="120x120" href="/images/favicon/favicon-120.png"><link rel="apple-touch-icon" sizes="76x76" href="/images/favicon/favicon-76.png"><link rel="apple-touch-icon" sizes="152x152" href="/images/favicon/favicon-152.png"><link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/favicon-180.png"><meta name="msapplication-TileColor" content="#FFFFFF"><meta name="msapplication-TileImage" content="/images/favicon/favicon-144.png"><meta name="msapplication-config" content="/images/favicon/browserconfig.xml"><!-- ****** faviconit.com Favicons ******--></head><body id="rika-body"><div data-role="page"><div id="sidePanel" data-role="panel" data-display="overlay" data-position="right" data-position-fixed="true" data-theme="a"><a id="sidePanelCloseButton" href="#sidePanel"></a><div data-role="controlgroup"><h3>Settings</h3><ul id="sidePanelButtons" data-role="listview" data-inset="true" data-theme="a"><li> <a href="/web/summary" data-theme="a" data-role="button" data-icon="fa-th-list" data-iconpos="left" class="sidePanelButton">Summary</a></li><li> <a href="/web/add" data-theme="a" data-role="button" data-icon="fa-plus" data-iconpos="left" class="sidePanelButton">Add stove</a></li><li> <a href="/web/profile" data-theme="a" data-role="button" data-icon="fa-user" data-iconpos="left" class="sidePanelButton">Manage account</a></li><li> <a href="/web/password" data-theme="a" data-role="button" data-icon="fa-lock" data-iconpos="left" class="sidePanelButton">Change password</a></li><li> <a href="/web/logout" data-theme="a" data-role="button" data-icon="fa-sign-out" data-iconpos="left" class="sidePanelButton">Log out</a></li></ul></div></div><div id="rika-header" data-role="header" data-position="fixed" data-tap-toggle="false"><div class="rika-header-wrapper"><!--+deploymentStage--><a href="/web/" style="float:left"><img src="/images/RIKA-flame.svg" style="height:2.8em; padding: 0.1em;"></a><a id="sidePanelButton" href="#sidePanel"></a><div class="rika-title"><span style="line-height: 1em">Welcome </span><span style="line-height: 1em" class="hide-medium">to RIKA firenet, </span><span style="line-height: 1em"><br>amenomade@yopmail.com</span></div></div></div><div role="main" class="ui-content"><p id="warningbox" onclick="$('#warningbox').fadeOut(500)">Failed to load stove details.</p><div data-role="controlgroup"><h3>Welcome</h3><p>To get started, connect your RIKA pellet stove to your WiFi network and follow the instructions shown on the touch display.</p><a id="addStove" href="/web/add" data-theme="a" data-role="button" data-icon="fa-plus" data-iconpos="right">Add Stove</a></div></div></div><div id="gadiv"><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-71662097-1', 'auto');
ga('send', 'pageview');</script></div></body></html>
2017.09.07 01:58:52 3: ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html><html...") at (eval 118) line 1.

2017.09.07 01:58:52 5: ofen: looking for Cookies in HTTP/1.1 200 OK

Server: Cowboy

Connection: close

X-Powered-By: Express

Content-Type: text/html; charset=utf-8

Content-Length: 4838

Etag: W/"12e6-1oYdCv/JIC9coPdszVjxmQ"

Vary: Accept-Encoding

Date: Wed, 06 Sep 2017 23:58:53 GMT

Via: 1.1 vegur
2017.09.07 01:58:52 5: ofen: ExtractSid called, context reading, num
2017.09.07 01:58:52 5: ofen: CheckAuth is checking buffer with ReAuthRegex id="login"
2017.09.07 01:58:52 4: ofen: CheckAuth decided no authentication required
2017.09.07 01:58:52 3: ofen: no parsed JSON structure available
2017.09.07 01:58:52 5: ofen: UpdateReadingList created list of reading.* nums to parse during getUpdate as
2017.09.07 01:58:52 5: ofen: Read starts parsing response to update with defined readings:
2017.09.07 01:58:52 3: ofen: Read response to update didn't match any Reading
2017.09.07 01:58:52 5: ofen: HandleSendQueue called, qlen = 0


Bei mir ergibt natürlich die URL  https://www.rika-firenet.com/web/stove/xxxxxx "Failed to load stove details." (fast ganz rechts) da ich keinen Ofen bei Rika habe... Aber eingeloggt bin ich schon.

Bei dir kommt mal wieder auf das Redirect (302) auf der Login Seite. Oder du hast nicht die ganze log gepostet. Du bist aber nicht mehr weit.
Zitatsid01Data  email=ich%40inet&password=strenggeheim
Es fehlt was nach "inet" im email oder hast Du nur zu viel anonymisiert fürs posten?
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Helmi55

Servus
nein da scheint nichts zu fehlen.
Wenn ich darf ändere ich das PW bei Rika und sende dir die Daten per PM??
Würdest mir sehr helfen -
Herzlichen Dank

Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

amenomade

Ja natürlich darfst Du. Ich komme aber wahrscheinlich erst heute spät Abends drauf.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Helmi55

System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

fiedel

... und ich würde mich sehr freuen, wenn die Lösung zum Schluss vorgestellt und ein wenig erläutert werden könnte. Ich habe nämlich etwas Ähnliches vor und mich schon am Kopf gekratzt, wie das mit dem Login gehen soll.

Vielen Dank
sagt schon mal
Frank!
FeatureLevel: 6.1 auf Wyse N03D ; Deb. 11 ; Perl: v5.14.2 ; IO: HM-MOD-RPI-PCB + VCCU|CUL 868 V 1.66|LinkUSBi |TEK603
HM: SEC-SCO|SCI-3-FM|LC-SW4-PCB|ES-PMSW1-PL|RC-4-2|SEN-MDIR-O|SEC-WDS-2
CUL: HMS100TF|FS20 S4A-2 ; OWDevice: DS18S20|DS2401|DS2406|DS2423

amenomade

#21
defmod ofen HTTPMOD https://www.rika-firenet.com/api/client/nnnnnnnn/status 60
attr ofen enableCookies 1
attr ofen reAuthRegex id="login"|Unauthorized
attr ofen reading01JSON sensors_inputRoomTemperature
attr ofen reading01Name RaumTemp
attr ofen sid01Data email=name@domain.suffix&password=geheim
attr ofen sid01URL https://www.rika-firenet.com/web/login


- email= genau wie in deiner PN. Password= genau wie deiner PN.

- enableCookies, weil die Webseite ein sid Cookie pflegt. Das sieht man in jeder Seite in den Headers.
- reAuthRegex ist eine Regex, die die beide mögliche Antworte identifiziert, wenn ein Login angefordert wird: entweder wird man auf der Login Seite umgeleitet, oder die API antwortet mit HTTP 401 Unauthorized.
- Wenn Httpmod sieht, dass diese Regex matcht, startet er ein Login Prozess. Dafür nutzt er die sidxxxxxxx Attribute. Hier ist es ganz einfach: auf sid01URL, schicke ich sid01Data. Das kann man z.B. in Burpsuite sehen.

Das Verfahren ist letztendlich so:
- rufe https://www.rika-firenet.com/api/client/nnnnnnnn/status
- bekomme "Unauthorized" => login Verfahren
- post email=name@domain.suffix&password=geheim auf https://www.rika-firenet.com/web/login
- nach erfolgreichem Login macht er - warum auch immer - ein redirect 302 auf /web/summary mit HTTP 404 not found Antwort. Egal.
- rufe wieder https://www.rika-firenet.com/api/client/nnnnnnnn/status
- HTTP 200 OK => Daten sind da

2017.09.08 00:37:09 4: ofen: HandleSendQueue sends request type update to URL https://www.rika-firenet.com/api/client/nnnnnnnn/status
2017.09.08 00:37:09 4: HttpUtils url=https://www.rika-firenet.com/api/client/nnnnnnnn/status
2017.09.08 00:37:09 4: https://www.rika-firenet.com/api/client/nnnnnnnn/status: HTTP response code 401
2017.09.08 00:37:09 4: HttpUtils https://www.rika-firenet.com/api/client/nnnnnnnn/status: Got data, length: 23
2017.09.08 00:37:09 4: ofen: Read callback: request type was update retry 0,
Header: HTTP/1.1 401 Unauthorized
...
2017.09.08 00:37:09 4: ofen: Cookie: connect.sid Wert s%3A4aqtrATi4G5Bwn9UWXcVLhj_TRSKLuRM.v7jCC%2FBzzWdcB4yzyJN6Ci41dqb0iboB1U2q4fftfew Rest Path=/; HttpOnly
2017.09.08 00:37:09 4: ofen: CheckAuth decided new authentication required
2017.09.08 00:37:09 4: ofen: Auth called with Steps: 01
2017.09.08 00:37:09 4: ofen: AddToQueue adds auth01, initial queue len: 0, prio
2017.09.08 00:37:09 4: ofen: HandleSendQueue sends request type auth01 to URL https://www.rika-firenet.com/web/login,
data: email=name@domain.suffix&password=geheim,
2017.09.08 00:37:09 4: https://www.rika-firenet.com/web/login: HTTP response code 302
2017.09.08 00:37:09 4: HttpUtils https://www.rika-firenet.com/web/login: Redirect to https://www.rika-firenet.com:443/web/summary
2017.09.08 00:37:09 4: HttpUtils url=https://www.rika-firenet.com:443/web/summary
2017.09.08 00:37:10 4: https://www.rika-firenet.com:443/web/summary: HTTP response code 404
2017.09.08 00:37:10 4: HttpUtils url=https://www.rika-firenet.com/api/client/nnnnnnnn/status
2017.09.08 00:37:10 4: https://www.rika-firenet.com/api/client/nnnnnnnn/status: HTTP response code 200
2017.09.08 00:37:10 4: HttpUtils https://www.rika-firenet.com/api/client/nnnnnnnn/status: Got data, length: 1187


Die Antwort ist letztendlich eine JSON String, wie in deinem ersten Post. Mit reading01Name / reading01JSON wird das gewünschte Reading extrahiert. Mit attr extractAllJSON kannst Du sehen, was noch als readingXXJSON möglich wäre.

EDIT: noch ein Hinweis, wenn Du das Passwort wieder änderst: HTTPMOD bleibt verbunden, so lange kein Timeout oder Unterbrechung der Kommunikation. Um ein neues Login zu zwingen, entweder das HTTPMOD auf "attr disable 1" setzen, bis Sitzungstimeout (ich weiss nicht wie lange), oder fhem neu starten.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

amenomade

PS: laut view-source:https://www.rika-firenet.com/assets/stove.js sollte es auch möglich sein, "set" Kommandos auf dem HTTPMOD zu definieren, um die verschiedenen "controls" von deinem ersten Post zu steuern.

Zitatfunction sendChangesToServer(){var a=getControlsJSON();$.post("/api/client/"+document.stoveID+"/controls",a,function(a){})

Siehe "Configuration to define a set command and send data to a device" in https://fhem.de/commandref.html#HTTPMOD
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Helmi55

Guten Morgen amenomade

herzlichen Dank. Erstens Problem gelöst und zweitens diese super Erklärung dazu.
Werde mir das ganz sicher noch mit Burp ansehen und hoffe dass ich es dann noch besser verstehe.
Eine letzte Frage noch: beim Device Ofen selbst stehen ??? der Wert Raumtemperatur steht im Reading richtig und wird im Moment
auch jede Minute geändert.

Nochmals herzlichen Dank - werde den Thread mit gelöst markieren
Schönen Tag und schönes Wochenende

Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

amenomade

Zitatine letzte Frage noch: beim Device Ofen selbst stehen ??? der Wert Raumtemperatur steht im Reading richtig und wird im Moment
auch jede Minute geändert.

Und wo ist die Frage?

Wenn Du im State etwas haben willst, musst Du mit attr stateFormat spielen. Z.B.
attr ofen stateFormat Aktuelle RaumTemperature: RaumTemp
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Helmi55

#25
Huch sorry da hat der Mac wieder mal was von alleine geschrieben (berichtigt)und ich habe es nicht bemerkt
Beim Device selbst stehen drei Fragezeichen


Aber das hast du mir ja auch soeben beantwortet

Nochmals herzlichen Dank
Hoffe fiedel hat nun auch mehr Überblick

Nice w/e Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

fiedel

Zitat von: Helmi55 am 08 September 2017, 16:02:33
Hoffe fiedel hat nun auch mehr Überblick

Nochmals vielen Dank! Ich denke mal der Input wird mich gut weiter bringen...  :)
FeatureLevel: 6.1 auf Wyse N03D ; Deb. 11 ; Perl: v5.14.2 ; IO: HM-MOD-RPI-PCB + VCCU|CUL 868 V 1.66|LinkUSBi |TEK603
HM: SEC-SCO|SCI-3-FM|LC-SW4-PCB|ES-PMSW1-PL|RC-4-2|SEN-MDIR-O|SEC-WDS-2
CUL: HMS100TF|FS20 S4A-2 ; OWDevice: DS18S20|DS2401|DS2406|DS2423

Helmi55

Der Danke gilt NUR amenomade

Nice Weekend
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

Helmi55

Hallo guten Abend
ich benötige bitte nochmals deine Unterstützung mit dem "SendenBefehl"
Ich habe folgendes eingetragen:
set01Data  {"set" : {"controls_frostProtectionTemperature" :"$val" }}
   set01Hint  3,5,7,10
   set01Max   10
   set01Min   3
   set01Name  FrostschutzTemp
   set01URL   https://www.rika-firenet.com/web/login

Das habe ich im Log
2017.09.10 19:19:35 3: Ofen: Defined with URL https://www.rika-firenet.com/api/client/54156160/status and interval 600
2017.09.10 19:19:35 1: Including ./log/fhem.save
2017.09.10 19:19:38 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Authorisation requir...") at (eval 9713) line 1.

2017.09.10 19:19:38 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html><html...") at (eval 9716) line 1.
2017.09.10 19:20:42 3: Ofen: Read callback: Error: https://www.rika-firenet.com:443/web/login: Too many redirects


Gehört hier nicht noch das Login (User/PW) mitgeschickt? Aber wie?
Eingetragen ist es ja in sid01Data?

Kann Stunden mir bitte nochmals helfen - Danke und nice eve
Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

amenomade

ZitatGehört hier nicht noch das Login (User/PW) mitgeschickt? Aber wie?
Nein, grundsätzlich hast Du schon das Login Verfahren wenn es benötigt wird.

Deswegen musst Du auch nicht die "login" URL aufrufen, sondern die "set" URL wie im Post oben:
Zitat/api/client/"+document.stoveID+"/controls
Also https://www.rika-firenet.com/api/client/nnnnnnnn/controls

Am besten schaust Du den Trafic mit Burp und guckst was tatsächlich versendet (POST) wird, wenn Du auf irgendwelchen Knopf in der Webseite drückst.
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus