***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

Hallo
habe einen neuen Pelletofen. Den kann ich auch übers WEB steuern und abfragen.
Im Safari Browser sieht das ganze unter Entwicklereinstellung so aus:
"name": "Vorzimmer",
    "stoveID": "xxxxxxxxx",
    "lastSeenMinutes": 1,
    "lastConfirmedRevision": 1504385700,
    "controls": {
        "revision": 1504385700,
        "onOff": true,
        "operatingMode": 2,
        "heatingPower": 65,
        "targetTemperature": 24,
        "heatingTimesActive": false,
        "heatingTimesActiveForComfort": true,
        "setBackTemperature": 18,
        "convectionFan1Active": false,
        "convectionFan1Level": 0,
        "convectionFan1Area": 0,
        "convectionFan2Active": false,
        "convectionFan2Level": 0,
        "convectionFan2Area": 0,
        "frostProtectionActive": false,
        "frostProtectionTemperature": 5
    },
    "sensors": {
        "statusError": 0,
        "statusWarning": 0,
        "statusService": 0,
        "statusMainState": 1,
        "statusSubState": 3,
        "statusFrostStarted": false,
        "inputFlameTemperature": 21,
        "inputRoomTemperature": 21,
        "inputExternalRequest": true,
        "outputDischargeMotor": 0,
        "outputInsertionMotor": 0,
        "outputIDFan": 0,
        "outputAirFlaps": 0,
        "outputIgnition": false,
        "parameterStoveTypeNumber": 13,
        "parameterVersionMainBoard": 223,
        "parameterVersionTFT": 223,
        "parameterRuntimePellets": 11,
        "parameterRuntimeLogs": 0,
        "parameterFeedRateTotal": 17,
        "parameterFeedRateService": 683,
        "parameterOnOffCycles": 2
    },
    "stoveType": "DOMO MultiAir",
    "stoveFeatures": {
        "multiAir1": true,
        "multiAir2": true,
        "insertionMotor": false,
        "airFlaps": false,
        "logRuntime": false
    }
}


Ich möchte da gerne für den Anfang den Wert inputRoomTemperature abfragen

Hier das List
Internals:
   BUSY       0
   CHANGED
   DEF        https://www.rika-firenet.com/web/stove/xxxxx 60
   Interval   60
   LASTSEND   1504537734.61853
   MainURL    https://www.rika-firenet.com/web/stove/xxxxx
   ModuleVersion 3.3.11 - 8.5.2017
   NAME       OfenTest
   NR         273
   STATE      ???
   TRIGGERTIME 1504537794.6173
   TRIGGERTIME_FMT 2017-09-04 17:09:54
   TYPE       HTTPMOD
   addr       https://www.rika-firenet.com:443
   buf
   code       200
   conn
   data
   displayurl https://www.rika-firenet.com:443/web/
   header
   host       www.rika-firenet.com
   httpheader 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%3AZyFhfay7QgIwPWKuWs_QYM4u1y55i_a4.VV1eQDnKaJLUsklXiLVxheelRG4KW52QyHZ%2Froh4DsY; Path=/; Expires=Mon, 18 Sep 2017 15:08:55 GMT; HttpOnly

Vary: Accept-Encoding

Date: Mon, 04 Sep 2017 15:08:55 GMT

Via: 1.1 vegur
   httpversion 1.0
   hu_blocking 0
   hu_filecount 2
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /web/
   protocol   https
   redirects  1
   timeout    2
   url        https://www.rika-firenet.com:443/web/
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://www.rika-firenet.com/web/stove/xxxxx
     value      0
   sslargs:
Attributes:
   reading01Name Thermostat
   reading01Regex inputRoomTemperature
   userattr   1 reading01Name reading01Regex



Leider bekomme ich im Log diese Meldung
2017.09.04 17:16:55 3: OfenTest: Read response to update didn't match any Reading

Kann mir bitte jemand erklären wie ich das richtig eintragen muss

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/

CoolTux

Lese Dich mal in der HTTPMOD Commandref und wenn nötig im Wiki ein. Für Dich ist das Attribut JSON interessant.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

amenomade

Dein Output hast Du vermutlich nicht vollständig übertragen, es fehlt mindestens ein { am Anfang. Wenn nichts anderes fehlt, sollte folgendes funktionieren:
reading01JSON sensors_inputRoomTemperature
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

Hallo
also habe so wie von amenomade beschrieben probiert und aber auch so wie im Wiki mit
attr OfenTest get01JSON sensors_inputRoomTemperature

und bekomme im Log diese Meldungen - mit denen ich leider wirklich nix anfangen kann:

2017.09.04 17:50:06 3: OfenTest: 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 8234) line 1.

2017.09.04 17:50:06 3: OfenTest: no parsed JSON structure available
2017.09.04 17:50:06 3: OfenTest: Read response to update didn't match any Reading


habe auch das attr extractAllJSON verwendet....

Sorry aber da blicke ich im Moment nicht ganz durch
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

Zeig mal ein "list OfenTest" mit attr extractAllJSON gesetzt. Und zeig auch bitte die gesamte Ausgabe aus einem Browser (Quellcode der Seite)
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

Danke für deine Hilfe
hier das List
Internals:
   BUSY       0
   CHANGED
   DEF        https://www.rika-firenet.com/web/stove/xxxxx 60
   Interval   60
   JSONEnabled 1
   LASTSEND   1504544286.82367
   MainURL    https://www.rika-firenet.com/web/stove/xxxxx
   ModuleVersion 3.3.11 - 8.5.2017
   NAME       OfenTest
   NR         273
   STATE      ???
   TRIGGERTIME 1504544346.82249
   TRIGGERTIME_FMT 2017-09-04 18:59:06
   TYPE       HTTPMOD
   addr       https://www.rika-firenet.com:443
   buf
   code       200
   conn
   data
   displayurl https://www.rika-firenet.com:443/web/
   header
   host       www.rika-firenet.com
   httpheader 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%3AZwLlXzG4YUZxctcji2swadIxpiyEB79K.eBpvSC4P27SPlMA3%2Bhey48EXTC0IqeJ1oSTCxgGYC2I; Path=/; Expires=Mon, 18 Sep 2017 16:58:07 GMT; HttpOnly

Vary: Accept-Encoding

Date: Mon, 04 Sep 2017 16:58:07 GMT

Via: 1.1 vegur
   httpversion 1.0
   hu_blocking 0
   hu_filecount 144
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /web/
   protocol   https
   redirects  1
   timeout    2
   url        https://www.rika-firenet.com:443/web/
   value      0
   QUEUE:
   READINGS:
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://www.rika-firenet.com/web/stove/xxxxx
     value      0
   sslargs:
Attributes:
   extractAllJSON 1
   get01JSON  sensors_inputRoomTemperature
   reading01Name Thermostat
   userattr   1 get01JSON reading01JSON reading01Name reading01Regex



und hier der Quellcode. von XHRs Status
{
    "name": "Vorzimmer",
    "stoveID": "xxxxx",
    "lastSeenMinutes": 0,
    "lastConfirmedRevision": 1504385700,
    "controls": {
        "revision": 1504385700,
        "onOff": true,
        "operatingMode": 2,
        "heatingPower": 65,
        "targetTemperature": 24,
        "heatingTimesActive": false,
        "heatingTimesActiveForComfort": true,
        "setBackTemperature": 18,
        "convectionFan1Active": false,
        "convectionFan1Level": 0,
        "convectionFan1Area": 0,
        "convectionFan2Active": false,
        "convectionFan2Level": 0,
        "convectionFan2Area": 0,
        "frostProtectionActive": false,
        "frostProtectionTemperature": 5
    },
    "sensors": {
        "statusError": 0,
        "statusWarning": 0,
        "statusService": 0,
        "statusMainState": 1,
        "statusSubState": 3,
        "statusFrostStarted": false,
        "inputFlameTemperature": 21,
        "inputRoomTemperature": 21,
        "inputExternalRequest": true,
        "outputDischargeMotor": 0,
        "outputInsertionMotor": 0,
        "outputIDFan": 0,
        "outputAirFlaps": 0,
        "outputIgnition": false,
        "parameterStoveTypeNumber": 13,
        "parameterVersionMainBoard": 223,
        "parameterVersionTFT": 223,
        "parameterRuntimePellets": 11,
        "parameterRuntimeLogs": 0,
        "parameterFeedRateTotal": 17,
        "parameterFeedRateService": 683,
        "parameterOnOffCycles": 2
    },
    "stoveType": "DOMO MultiAir",
    "stoveFeatures": {
        "multiAir1": true,
        "multiAir2": true,
        "insertionMotor": false,
        "airFlaps": false,
        "logRuntime": false
    }
}


Gruß
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

Somit sollte attr OfenTest reading01JSON sensors_inputRoomTemperaturefunktionieren. Das hast Du noch nicht eingestellt.

Wenn nicht, dann bitte dein HTTMOD auf verbose 5 setzen, und die Log 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

Nein das war schon drinnen - hab ich aber dann als ich den get ausprobiert habe rausgenommen
Hier das Log Verbose5
2017.09.04 19:41:14 3: Registering HTTPSRV TABLETUI for URL /ftui   and assigned link ftui/ ...
2017.09.04 19:41:14 3: OfenTest: Defined with URL https://www.rika-firenet.com/web/stove/xxxxxx and interval 60
2017.09.04 19:41:14 1: Including ./log/fhem.save
2017.09.04 19:41:16 4: OfenTest: GetUpdate called (update)
2017.09.04 19:41:16 4: OfenTest: update timer modified: will call GetUpdate in 60.0 seconds at 2017-09-04 19:42:16
2017.09.04 19:41:16 4: OfenTest: AddToQueue adds update, initial queue len: 0
2017.09.04 19:41:16 5: OfenTest: AddToQueue adds type update to URL https://www.rika-firenet.com/web/stove/xxxxxx, no data, no headers, retry 0
2017.09.04 19:41:16 5: OfenTest: HandleSendQueue called, qlen = 1
2017.09.04 19:41:16 4: OfenTest: HandleSendQueue sends request type update to URL https://www.rika-firenet.com/web/stove/xxxxxx, No Data, No Header,
timeout 2
2017.09.04 19:41:16 4: HttpUtils url=https://www.rika-firenet.com/web/stove/xxxxxx
2017.09.04 19:41:16 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.04 19:41:16 4: https://www.rika-firenet.com/web/stove/xxxxx: HTTP response code 302
2017.09.04 19:41:16 4: HttpUtils https://www.rika-firenet.com/web/stove/xxxxx: Redirect to https://www.rika-firenet.com:443/web/
2017.09.04 19:41:16 4: HttpUtils url=https://www.rika-firenet.com:443/web/
2017.09.04 19:41:16 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.04 19:41:16 4: https://www.rika-firenet.com:443/web/: HTTP response code 200
2017.09.04 19:41:16 4: HttpUtils https://www.rika-firenet.com:443/web/: Got data, length: 3631
2017.09.04 19:41:16 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%3AfW8jftBk8hmSKcyrf0QWpiBvERSS11Wv.qft08Ia0B3tHOHj8Ud0hWrpG6gpmg7oJWOurhffOu5M; Path=/; Expires=Mon, 18 Sep 2017 17:41:16 GMT; HttpOnly
Vary: Accept-Encoding
Date: Mon, 04 Sep 2017 17:41:16 GMT
Via: 1.1 vegur
2017.09.04 19:41:16 4: OfenTest: 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%3AfW8jftBk8hmSKcyrf0QWpiBvERSS11Wv.qft08Ia0B3tHOHj8Ud0hWrpG6gpmg7oJWOurhffOu5M; Path=/; Expires=Mon, 18 Sep 2017 17:41:16 GMT; HttpOnly
Vary: Accept-Encoding
Date: Mon, 04 Sep 2017 17:41:16 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.04 19:41:16 3: OfenTest: 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 8970) line 1.

2017.09.04 19:41:16 5: OfenTest: ExtractSid called, context reading, num
2017.09.04 19:41:16 4: OfenTest: CheckAuth decided no authentication required
2017.09.04 19:41:16 3: OfenTest: no parsed JSON structure available
2017.09.04 19:41:16 5: OfenTest: UpdateReadingList created list of reading.* nums to parse during getUpdate as 01
2017.09.04 19:41:16 5: OfenTest: Read starts parsing response to update with defined readings: 01
2017.09.04 19:41:16 5: OfenTest: ExtractReading Thermostat with json sensors_inputRoomTemperature ...
2017.09.04 19:41:16 5: OfenTest: ExtractReading Thermostat did not match
2017.09.04 19:41:16 3: OfenTest: Read response to update didn't match any Reading
2017.09.04 19:41:16 5: OfenTest: HandleSendQueue called, qlen = 0



Danke
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

inputRoomTemperature taucht aber nirgendwo in deiner Log verbose 5. Das heisst, er hat die gewünschte Seite einfach (noch) nicht geholt. Dann kannst Du mit Regex oder JSON machen, was Du willst. Er wird nix finden.

ZitatBody: <!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(){
Anscheinend braucht er ein Login!
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
habe jetzt mit vorgesetztem Login in der Url probiert - nein
Wobei ich  einmal https://xy@zzz:strenggheim@www.rika...... und einmal https://xy%40zzz:strenggeheim@www.rika......  versucht habe
Gebe ich im SafariBrowser das ein https://xy%40zzz:strenggeheim@www.rika......
dann muss ich mehrmals die Entehrteste drücken und dann kommt die Meldung einer Phishing Seite weil das PW mitgeschickt wird.

Im Log steht dies:
2017.09.05 08:00:21 5: OfenTest: ExtractSid called, context reading, num
2017.09.05 08:00:21 4: OfenTest: CheckAuth decided no authentication required
2017.09.05 08:00:21 3: OfenTest: no parsed JSON structure available
2017.09.05 08:00:21 5: OfenTest: Read starts parsing response to update with defined readings: 01
2017.09.05 08:00:21 5: OfenTest: ExtractReading Thermostat with json sensors_inputRoomTemperature ...
2017.09.05 08:00:21 5: OfenTest: ExtractReading Thermostat did not match
2017.09.05 08:00:21 3: OfenTest: Read response to update didn't match any Reading
2017.09.05 08:00:21 5: OfenTest: HandleSendQueue called, qlen = 0
2017.09.05 08:01:20 4: OfenTest: GetUpdate called (update)
2017.09.05 08:01:20 4: OfenTest: update timer modified: will call GetUpdate in 60.0 seconds at 2017-09-05 08:02:20
2017.09.05 08:01:20 4: OfenTest: AddToQueue adds update, initial queue len: 0
2017.09.05 08:01:20 5: OfenTest: AddToQueue adds type update to URL https://xy%40zzzz:strenggeheim@www.rika-firenet.com/web/stove/ofenID, no data, no headers, retry 0
2017.09.05 08:01:20 5: OfenTest: HandleSendQueue called, qlen = 1
2017.09.05 08:01:20 4: OfenTest: HandleSendQueue sends request type update to URL https://xy%40zzzz:strenggeheim@www.rika-firenet.com/web/stove/ofenID, No Data, No Header,
timeout 2
2017.09.05 08:01:20 4: HttpUtils url=https://xy%40zzzz:strenggeheim@www.rika-firenet.com/web/stove/ofenID
2017.09.05 08:01:21 5: HttpUtils request header:
GET /web/stove/ofenID HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Authorization: Basic aGVsbXV0JTQwZmxpZWguYXQ6ZGFuaWVsMTAw
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.09.05 08:01:21 4: https://xy%40zzzz:strenggeheim@www.rika-firenet.com/web/stove/ofenID: HTTP response code 302
2017.09.05 08:01:21 4: HttpUtils https://xy%40zzzz:strenggeheim@www.rika-firenet.com/web/stove/ofenID: Redirect to https://www.rika-firenet.com:443/web/
2017.09.05 08:01:21 4: HttpUtils url=https://www.rika-firenet.com:443/web/
2017.09.05 08:01:21 5: HttpUtils request header:
GET /web/ HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Authorization: Basic blablabal
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.09.05 08:01:21 4: https://www.rika-firenet.com:443/web/: HTTP response code 200
2017.09.05 08:01:21 4: HttpUtils https://www.rika-firenet.com:443/web/: Got data, length: 3631
2017.09.05 08:01:21 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%3AHaVxkRl6rtui-i0FutvQn-SKhlUA-dpm.Gi9zFfVhZFCz6UE7pmi6C5Aee7HDuwIdJEEUC2JhpN8; Path=/; Expires=Tue, 19 Sep 2017 06:01:21 GMT; HttpOnly
Vary: Accept-Encoding
Date: Tue, 05 Sep 2017 06:01:21 GMT
Via: 1.1 vegur
2017.09.05 08:01:21 4: OfenTest: 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%3AHaVxkRl6rtui-i0FutvQn-SKhlUA-dpm.Gi9zFfVhZFCz6UE7pmi6C5Aee7HDuwIdJEEUC2JhpN8; Path=/; Expires=Tue, 19 Sep 2017 06:01:21 GMT; HttpOnly
Vary: Accept-Encoding
Date: Tue, 05 Sep 2017 06:01:21 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.05 08:01:21 3: OfenTest: 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 12986) line 1.

2017.09.05 08:01:21 5: OfenTest: ExtractSid called, context reading, num
2017.09.05 08:01:21 4: OfenTest: CheckAuth decided no authentication required
2017.09.05 08:01:21 3: OfenTest: no parsed JSON structure available
2017.09.05 08:01:21 5: OfenTest: Read starts parsing response to update with defined readings: 01
2017.09.05 08:01:21 5: OfenTest: ExtractReading Thermostat with json sensors_inputRoomTemperature ...
2017.09.05 08:01:21 5: OfenTest: ExtractReading Thermostat did not match
2017.09.05 08:01:21 3: OfenTest: Read response to update didn't match any Reading
2017.09.05 08:01:21 5: OfenTest: HandleSendQueue called, qlen = 0
2017.09.05 08:02:22 3: OfenTest: Defined with URL https://xy%40zzzz:strenggeheim@www.rika-firenet.com/web/stove/ofenID and interval 60
2017.09.05 08:02:22 1: Including ./log/fhem.save



Danke und schönen Tag
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

Du musst bitte https://fhem.de/commandref.html#HTTPMOD lesen, und den Abschnitt "Handling sessions and logging in" nutzen. Dafür sind die Attribute da. Nach dem 1. Aufruf kriegst Du http 302 und wirst auf die Login Seite umgeleitet. Auf Basis dieser Seite kannst Du eine passende reAuthRegex bauen. Dann die sid Attribute nutzen, um user und passwort zu setzen.
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

Hallo amenomade
ich habe gelesen und ich sag dir ehrlich ich verstehe es nicht, würdest du bitte so nett sein und mir
bitte erklären WAS in welches Attribut gehört
Zuerst habe ich den dml TreeBuilder installiert - das wurde gefordert.
Dann habe ich das reAuthRegex mit https://www.rika-firenet.com/web/login erstellt

Wäre ganz toll von dir wenn du mir das hier erklären könntest -
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

Du musst erstmal den http Traffic analysieren. Dafür ist z.B. Burp auf deinem PC zu installieren, um das ganze Anmeldungsverfahren zu loggen.
https://support.portswigger.net/customer/portal/articles/1783055-configuring-your-browser-to-work-with-burp

Somit wirst Du sehen:
- wo du landest, wenn nicht authentifiziert
- wie die POST Request aussieht, wenn Du deine Zugangsdaten einträgst

Ich gucke heute Abend noch, was ich in deine Logs schon sehen kann, und melde mich.

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/

amenomade

#14
Leider ist es nicht für mich einfach, das ganze zu reproduzieren, da ich selbst kein Ofen bei rika habe.
Ich habe mit folgendem versucht:defmod ofen HTTPMOD https://www.rika-firenet.com/web/stove/xxxxxxx 60
attr ofen userattr sid01Data sid01URL sid02Data
attr ofen enableCookies 1
attr ofen extractAllJSON 1
attr ofen reAuthRegex id="login"
attr ofen sid01Data email=mail%40yopmail.com&password=limopivigi
attr ofen sid01URL https://www.rika-firenet.com/web/login
attr ofen verbose 5


Das wäre einer Anfang, aber ich kann nicht weiter. Probier mal biite, und poste Log Auszug und "list" vom httpmod Device wieder
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus