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

Servus
also BURP wird mich noch eine Weile beschäftigen nach dieser Anleitung (https://support.portswigger.net/customer/portal/articles/1783066-configuring-firefox-to-work-with-burp) bekomme ich keine Verbindung mehr mit dem Fuchs? - Gut ist ein anderes Thema
Kannst d mir bitte noch weiterhelfen - wenn es aus der Ferne möglich ist
Wenn ich z.B den Befehl set Ofen Frostschutztemp 3 absetzte bekomme ich folgende Fehlermeldung
2017.09.11 12:40:09 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Missing value for el...") at (eval 12205) line 1.


Vielen 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

Der Fehler kommt wahrscheinlich vom Parsing der Antwort. Irgendwo soltest Du das ganze in der Log haben:
ZitatMissing value for el...

Du musst m.A. mindestens ein JSON bauen, das mit der Syntax vom ersten Post dieses Threads passt (hab ich leider nicht mehr ganz im Kopf)
{"name": "Vorzimmer", "stoveID": "xxxxxxxxx", "controls": {"frostProtectionTemperature": "$val"}}

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

#32
Hallo
Also ich habe jetzt für die Abfrage ein
reading03JSON controls_frostProtectionTemperature
gebaut.
Zum Senden dachte ich  set01Data {"set" : {"controls_frostProtectionTemperature" :"$val" }}
So wie in der CommandREf attr PM set01Data {"set" :{"34.3118.value" :"$val" }}

Jetzt habe ich wie in einem anderen post gelesen, die set01Data weggelassen und dafür
die set01URL angepasst https://www.rika-firenet.com/api//client/xxxxxx/controls?controls_frostProtectionTemperature=$val


Leider auch ohne Erfolg
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

Eher
set01Name FrostSchutzTemp
set01URL https://www.rika-firenet.com/api//client/xxxxxx/controls
set01Data {"name": "Vorzimmer", "stoveID": "xxxxxxxxx", "controls": {"frostProtectionTemperature": "$val"}}


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

hab das jetzt so geändert und diese Meldungen im Log bekommen

2017.09.11 15:55:44 5: Ofen: looking for Cookies in HTTP/1.1 200 OK
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 1187
Etag: W/"4a3-4u7H37wUSq9C/0v0MojPIA"
Vary: Accept-Encoding
Date: Mon, 11 Sep 2017 13:55:44 GMT
Via: 1.1 vegur
2017.09.11 15:55:44 5: Ofen: ExtractSid called, context reading, num
2017.09.11 15:55:44 5: Ofen: CheckAuth is checking buffer with ReAuthRegex id="login"|Unauthorized
2017.09.11 15:55:44 4: Ofen: CheckAuth decided no authentication required
2017.09.11 15:55:44 5: Ofen: Read set JSON lastSeenMinutes as reading lastSeenMinutes to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_convectionFan2Level as reading controls_convectionFan2Level to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_outputInsertionMotor as reading sensors_outputInsertionMotor to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_outputAirFlaps as reading sensors_outputAirFlaps to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_heatingTimesActiveForComfort as reading controls_heatingTimesActiveForComfort to value true
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterStoveTypeNumber as reading sensors_parameterStoveTypeNumber to value 13
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_operatingMode as reading controls_operatingMode to value 2
2017.09.11 15:55:44 5: Ofen: Read set JSON lastConfirmedRevision as reading lastConfirmedRevision to value 1505137889
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_statusWarning as reading sensors_statusWarning to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveType as reading stoveType to value DOMO MultiAir
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_convectionFan1Area as reading controls_convectionFan1Area to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_setBackTemperature as reading controls_setBackTemperature to value 18
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveFeatures_airFlaps as reading stoveFeatures_airFlaps to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveFeatures_logRuntime as reading stoveFeatures_logRuntime to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_inputFlameTemperature as reading sensors_inputFlameTemperature to value 22
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_convectionFan2Active as reading controls_convectionFan2Active to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_statusSubState as reading sensors_statusSubState to value 3
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_convectionFan1Level as reading controls_convectionFan1Level to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_inputExternalRequest as reading sensors_inputExternalRequest to value true
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveFeatures_multiAir1 as reading stoveFeatures_multiAir1 to value true
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_inputRoomTemperature as reading sensors_inputRoomTemperature to value 22
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveFeatures_multiAir2 as reading stoveFeatures_multiAir2 to value true
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterVersionTFT as reading sensors_parameterVersionTFT to value 223
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveID as reading stoveID to value xxxxxx
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterOnOffCycles as reading sensors_parameterOnOffCycles to value 2
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_outputDischargeMotor as reading sensors_outputDischargeMotor to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_heatingPower as reading controls_heatingPower to value 65
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_statusError as reading sensors_statusError to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_outputIDFan as reading sensors_outputIDFan to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_outputIgnition as reading sensors_outputIgnition to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_frostProtectionActive as reading controls_frostProtectionActive to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_onOff as reading controls_onOff to value true
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_convectionFan2Area as reading controls_convectionFan2Area to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_statusFrostStarted as reading sensors_statusFrostStarted to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterVersionMainBoard as reading sensors_parameterVersionMainBoard to value 223
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterFeedRateTotal as reading sensors_parameterFeedRateTotal to value 34
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_revision as reading controls_revision to value 1505137889
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_frostProtectionTemperature as reading controls_frostProtectionTemperature to value 4
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_convectionFan1Active as reading controls_convectionFan1Active to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_statusMainState as reading sensors_statusMainState to value 1
2017.09.11 15:55:44 5: Ofen: Read set JSON name as reading name to value Vorzimmer
2017.09.11 15:55:44 5: Ofen: Read set JSON stoveFeatures_insertionMotor as reading stoveFeatures_insertionMotor to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterRuntimePellets as reading sensors_parameterRuntimePellets to value 22
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterRuntimeLogs as reading sensors_parameterRuntimeLogs to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_statusService as reading sensors_statusService to value 0
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_heatingTimesActive as reading controls_heatingTimesActive to value false
2017.09.11 15:55:44 5: Ofen: Read set JSON controls_targetTemperature as reading controls_targetTemperature to value 24
2017.09.11 15:55:44 5: Ofen: Read set JSON sensors_parameterFeedRateService as reading sensors_parameterFeedRateService to value 666
2017.09.11 15:55:44 5: Ofen: Read starts parsing response to update with defined readings: 01,02,03
2017.09.11 15:55:44 5: Ofen: ExtractReading RaumTemp with json sensors_inputRoomTemperature ...
2017.09.11 15:55:44 4: Ofen: ExtractReading for reading01-1 sets RaumTemp to 22
2017.09.11 15:55:44 5: Ofen: ExtractReading Absenkung with json controls_setBackTemperature ...
2017.09.11 15:55:44 4: Ofen: ExtractReading for reading02-1 sets Absenkung to 18
2017.09.11 15:55:44 5: Ofen: ExtractReading Frostschutz with json controls_frostProtectionTemperature ...
2017.09.11 15:55:44 4: Ofen: ExtractReading for reading03-1 sets Frostschutz to 4
2017.09.11 15:55:44 4: Ofen: Read response to update matched Reading(s) lastSeenMinutes controls_convectionFan2Level sensors_outputInsertionMotor sensors_outputAirFlaps controls_heatingTimesActiveForComfort sensors_parameterStoveTypeNumber controls_operatingMode lastConfirmedRevision sensors_statusWarning stoveType controls_convectionFan1Area controls_setBackTemperature stoveFeatures_airFlaps stoveFeatures_logRuntime sensors_inputFlameTemperature controls_convectionFan2Active sensors_statusSubState controls_convectionFan1Level sensors_inputExternalRequest stoveFeatures_multiAir1 sensors_inputRoomTemperature stoveFeatures_multiAir2 sensors_parameterVersionTFT stoveID sensors_parameterOnOffCycles sensors_outputDischargeMotor controls_heatingPower sensors_statusError sensors_outputIDFan sensors_outputIgnition controls_frostProtectionActive controls_onOff controls_convectionFan2Area sensors_statusFrostStarted sensors_parameterVersionMainBoard sensors_parameterFeedRateTotal controls_revision controls_frostProtectionTemperature controls_convectionFan1Active sensors_statusMainState name stoveFeatures_insertionMotor sensors_parameterRuntimePellets sensors_parameterRuntimeLogs sensors_statusService controls_heatingTimesActive controls_targetTemperature sensors_parameterFeedRateService RaumTemp Absenkung Frostschutz
2017.09.11 15:55:44 5: Ofen: HandleSendQueue called, qlen = 0
2017.09.11 15:55:45 5: Ofen: set called with FrostschutzTemp 10
2017.09.11 15:55:45 5: Ofen: set found option FrostschutzTemp in attribute set01Name
2017.09.11 15:55:45 5: Ofen: is checking value 10 against min 3
2017.09.11 15:55:45 5: Ofen: set is checking value 10 against max 10
2017.09.11 15:55:45 4: Ofen: set will now set FrostschutzTemp -> 10
2017.09.11 15:55:45 4: Ofen: AddToQueue adds set01, initial queue len: 0
2017.09.11 15:55:45 5: Ofen: AddToQueue adds type set01 to URL https://www.rika-firenet.com/api//client/xxxxxx/controls?controls, data {"name": "Vorzimmer", "stoveID": "xxxxxx", "controls": {"frostProtectionTemperature": "$val"}}, no headers, retry 0
2017.09.11 15:55:45 5: Ofen: HandleSendQueue called, qlen = 1
2017.09.11 15:55:45 5: Ofen: HandleSendQueue is adding Cookies: connect.sid=s%3AiD_b5dsMWnIYWa9WJHxb7UsEvdWBM-8X.vz1fEENht5lo3Gul2gTFTFI6dfK%2F1bm1yTwO0GcCzg8
2017.09.11 15:55:45 4: Ofen: HandleSendQueue sends request type set01 to URL https://www.rika-firenet.com/api//client/xxxxxx/controls?controls,
data: {"name": "Vorzimmer", "stoveID": "xxxxxx", "controls": {"frostProtectionTemperature": "10"}},
header: Cookie: connect.sid=s%3AiD_b5dsMWnIYWa9WJHxb7UsEvdWBM-8X.vz1fEENht5lo3Gul2gTFTFI6dfK%2F1bm1yTwO0GcCzg8,
timeout 2
2017.09.11 15:55:45 4: HttpUtils url=https://www.rika-firenet.com/api//client/xxxxxx/controls?controls
2017.09.11 15:55:45 5: HttpUtils request header:
POST /api//client/xxxxxx/controls?controls HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3AiD_b5dsMWnIYWa9WJHxb7UsEvdWBM-8X.vz1fEENht5lo3Gul2gTFTFI6dfK%2F1bm1yTwO0GcCzg8
Content-Length: 94
Content-Type: application/x-www-form-urlencoded

2017.09.11 15:55:45 4: https://www.rika-firenet.com/api//client/xxxxxx/controls?controls: HTTP response code 500
2017.09.11 15:55:45 4: HttpUtils https://www.rika-firenet.com/api//client/xxxxxx/controls?controls: Got data, length: 34
2017.09.11 15:55:45 5: HttpUtils response header:
HTTP/1.1 500 Internal Server Error
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 34
Etag: W/"22-EZfJUw/3xe4rFbN/z7Va5A"
Vary: Accept-Encoding
Date: Mon, 11 Sep 2017 13:55:45 GMT
Via: 1.1 vegur
2017.09.11 15:55:45 4: Ofen: Read callback: request type was set01 retry 0,
Header: HTTP/1.1 500 Internal Server Error
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 34
Etag: W/"22-EZfJUw/3xe4rFbN/z7Va5A"
Vary: Accept-Encoding
Date: Mon, 11 Sep 2017 13:55:45 GMT
Via: 1.1 vegur,
Body: Missing value for element revision
2017.09.11 15:55:45 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Missing value for el...") at (eval 13187) line 1.

2017.09.11 15:55:45 5: Ofen: looking for Cookies in HTTP/1.1 500 Internal Server Error
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 34
Etag: W/"22-EZfJUw/3xe4rFbN/z7Va5A"
Vary: Accept-Encoding
Date: Mon, 11 Sep 2017 13:55:45 GMT
Via: 1.1 vegur
2017.09.11 15:55:45 5: Ofen: ExtractSid called, context set, num 01
2017.09.11 15:55:45 5: Ofen: CheckAuth is checking buffer with ReAuthRegex id="login"|Unauthorized
2017.09.11 15:55:45 4: Ofen: CheckAuth decided no authentication required



Jetzt sehe ich auch deine obige Meldung.    Missing Value

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

Naja, das hab ich befürchtet. Man muss dann anscheinend die komplette JSON String aufbauen...
Ich gucke heute Abend.
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

Folgendes wäre noch testen:

In 99_myUtils.pm, ganz oben nach den anderen use, wenn noch nicht vorhanden:
use JSON;

Dann unten, vor dem "1;"
sub replaceJSON ($$) {
   my ($reading, $value) = @_;
   
   my $json = ReadingsVal("ofen", "controlsJSON","");
   my $decoded = decode_json($json);
   $decoded->{"$reading"} = $value;
   my $result = encode_json($decoded);
   return $result;
}


Auf dem HttpMod:
attr ofen reading10Name controlsJSON
attr ofen reading10Regex (?s)controls.*?({.*?})

Damit holen wir die gesamte Json String von den controls, die wir dann zur Funktion übergeben werden. Dann versuchen wir den "set":
attr ofen replacement11Mode expression
attr ofen replacement11Regex data
attr ofen replacement11Value replaceJSON("frostProtectionTemperature", $val)
attr ofen set11Data data
attr ofen set11Name frostProtectionTemperature

Dann testen mit "set ofen frostProtectionTemperature 3"
Ich weiss nicht, ob $val mit dem benutzerdefiniertes Replacementmodus kombinierbar ist. Mal sehen. Sonst probieren wir was anderes.
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
also das steht so sicher nicht in der CommandRef?
Du bist genial-

Die controlsJSON kommen nun
controlsJSON

{"revision":1505193752,"onOff":true,"operatingMode":0,"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":4}


Wenn ich das attr setze attr ofen replacement11Value replaceJSON("frostProtectionTemperature", $val)

Bekomme ich diese Fehlermeldung
Attr with invalid Expression (mode is expression) in attr Ofen replacement11Value replaceJSON("frostProtectionTemperature", $val): Global symbol "$val" requires explicit package name at (eval 17526) line 1.



LG
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

Ok, damit ist das bestätigt:
Zitat von: amenomade am 12 September 2017, 01:44:31
Ich weiss nicht, ob $val mit dem benutzerdefiniertes Replacementmodus kombinierbar ist. Mal sehen. Sonst probieren wir was anderes.

;)
Ich 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

amenomade

Also... ich kriege die richtige Post Data mit:

99_myUtils :
sub replaceJSON ($$) {
   my ($valToReplace, $value) = @_;
   $value = InternalVal("ofen", "value", 2);
   Log3 ("ofen", 3, "replaceJSON Internalvalue: $value");
 
   my $json = ReadingsVal("ofen", "controlsJSON","");
   my $decoded = decode_json($json);
   $decoded->{"$valToReplace"} = $value + 0;
   my $result = encode_json($decoded);
   Log3("ofen", 3, "replaceJSON Result: $result");
   return $result;
}
Die Funktion werde ich noch anpassen, wenn es funktioniert, damit Du die für andere Set Kommandos auch nutzen kannst, die nicht numerisch sind.

HTTPMOD:
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

attr ofen reading10Name controlsJSON
attr ofen reading10Regex (?s)controls.*?({.*?})

attr ofen set11Name frostProtectionTemperature
attr ofen set11URL https://www.rika-firenet.com/api//client/xxxxxx/controls
attr ofen replacement11Mode expression
attr ofen replacement11Regex data
attr ofen replacement11Value replaceJSON("frostProtectionTemperature", 2)
attr ofen set11Data data

attr ofen verbose 5


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 die 99 myUtil habe ich angepasst

und wenn ich nun das attr attr ofen replacement11Value replaceJSON("frostProtectionTemperature", 2)
setzen will bekomme ich diese Fehlermeldung
Attr with invalid Expression (mode is expression) in attr Ofen replacement11Value replaceJSON("frostProtectionTemperature", 2): malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./FHEM/99_myUtils.pm line 27.
Zeile27 ist diese
my $decoded = decode_json($json);
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 bitte die gesamte Log, und ein "list ofen" bitte
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
hier ein list Ofen
Internals:
   BUSY       0
   DEF        https://www.rika-firenet.com/api/client/xxxxxx/status 60
   HTTPCookies connect.sid=s%3AjFTnw134-Eg2EosZAvCfuNnhD4CM3qFN.6jX40BBlDVJ5AdUdrb%2B%2BCcOh77ZQS%2FuE%2BKD1JnRy7W4
   Interval   60
   JSONEnabled 1
   LASTSEND   1505242282.65341
   LastAuthTry 2017-09-12 14:26:21
   MainURL    https://www.rika-firenet.com/api/client/xxxxxx/status
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       Ofen
   NR         271
   ReplacementEnabled 1
   STATE      T: 24
   TRIGGERTIME 1505242342.65212
   TRIGGERTIME_FMT 2017-09-12 20:52:22
   TYPE       HTTPMOD
   addr       https://www.rika-firenet.com:443
   buf
   code       200
   conn
   data
   displayurl https://www.rika-firenet.com/api/client/xxxxxx/status
   header     Cookie: connect.sid=s%3AjFTnw134-Eg2EosZAvCfuNnhD4CM3qFN.6jX40BBlDVJ5AdUdrb%2B%2BCcOh77ZQS%2FuE%2BKD1JnRy7W4
   host       www.rika-firenet.com
   httpheader HTTP/1.1 200 OK

Server: Cowboy

Connection: close

X-Powered-By: Express

Content-Type: application/json; charset=utf-8

Content-Length: 1187

Etag: W/"4a3-H6GpuBvv37Woxt+p09dx1A"

Vary: Accept-Encoding

Date: Tue, 12 Sep 2017 18:51:22 GMT

Via: 1.1 vegur
   httpversion 1.0
   hu_blocking 0
   hu_filecount 389
   hu_port    443
   hu_portSfx
   ignoreredirects 0
   loglevel   4
   path       /api/client/xxxxxx/status
   protocol   https
   redirects  0
   timeout    2
   url        https://www.rika-firenet.com/api/client/xxxxxx/status
   value      0
   HTTPCookieHash:
     connect.sid:
       Options    Path=/; HttpOnly

       Value      s%3AjFTnw134-Eg2EosZAvCfuNnhD4CM3qFN.6jX40BBlDVJ5AdUdrb%2B%2BCcOh77ZQS%2FuE%2BKD1JnRy7W4
   QUEUE:
   READINGS:
     2017-09-12 20:51:22   Absenkung       18
     2017-09-12 20:51:22   Frostschutz     4
     2017-09-12 20:51:22   RaumTemp        24
     2017-09-12 20:51:22   controlsJSON    {"revision":1505198797,"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":4}
     2017-09-12 20:51:22   controls_convectionFan1Active false
     2017-09-12 20:51:22   controls_convectionFan1Area 0
     2017-09-12 20:51:22   controls_convectionFan1Level 0
     2017-09-12 20:51:22   controls_convectionFan2Active false
     2017-09-12 20:51:22   controls_convectionFan2Area 0
     2017-09-12 20:51:22   controls_convectionFan2Level 0
     2017-09-12 20:51:22   controls_frostProtectionActive false
     2017-09-12 20:51:22   controls_frostProtectionTemperature 4
     2017-09-12 20:51:22   controls_heatingPower 65
     2017-09-12 20:51:22   controls_heatingTimesActive false
     2017-09-12 20:51:22   controls_heatingTimesActiveForComfort true
     2017-09-12 20:51:22   controls_onOff  true
     2017-09-12 20:51:22   controls_operatingMode 2
     2017-09-12 20:51:22   controls_revision 1505198797
     2017-09-12 20:51:22   controls_setBackTemperature 18
     2017-09-12 20:51:22   controls_targetTemperature 24
     2017-09-12 20:51:22   lastConfirmedRevision 1505198797
     2017-09-12 20:51:22   lastSeenMinutes 0
     2017-09-12 20:51:22   name            Vorzimmer
     2017-09-12 20:51:22   sensors_inputExternalRequest true
     2017-09-12 20:51:22   sensors_inputFlameTemperature 44
     2017-09-12 20:51:22   sensors_inputRoomTemperature 24
     2017-09-12 20:51:22   sensors_outputAirFlaps 0
     2017-09-12 20:51:22   sensors_outputDischargeMotor 0
     2017-09-12 20:51:22   sensors_outputIDFan 0
     2017-09-12 20:51:22   sensors_outputIgnition false
     2017-09-12 20:51:22   sensors_outputInsertionMotor 0
     2017-09-12 20:51:22   sensors_parameterFeedRateService 660
     2017-09-12 20:51:22   sensors_parameterFeedRateTotal 40
     2017-09-12 20:51:22   sensors_parameterOnOffCycles 2
     2017-09-12 20:51:22   sensors_parameterRuntimeLogs 0
     2017-09-12 20:51:22   sensors_parameterRuntimePellets 26
     2017-09-12 20:51:22   sensors_parameterStoveTypeNumber 13
     2017-09-12 20:51:22   sensors_parameterVersionMainBoard 223
     2017-09-12 20:51:22   sensors_parameterVersionTFT 223
     2017-09-12 20:51:22   sensors_statusError 0
     2017-09-12 20:51:22   sensors_statusFrostStarted false
     2017-09-12 20:51:22   sensors_statusMainState 1
     2017-09-12 20:51:22   sensors_statusService 0
     2017-09-12 20:51:22   sensors_statusSubState 3
     2017-09-12 20:51:22   sensors_statusWarning 0
     2017-09-12 20:51:22   stoveFeatures_airFlaps false
     2017-09-12 20:51:22   stoveFeatures_insertionMotor false
     2017-09-12 20:51:22   stoveFeatures_logRuntime false
     2017-09-12 20:51:22   stoveFeatures_multiAir1 true
     2017-09-12 20:51:22   stoveFeatures_multiAir2 true
     2017-09-12 20:51:22   stoveID         xxxxxx
     2017-09-12 20:51:22   stoveType       DOMO MultiAir
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://www.rika-firenet.com/api/client/xxxxxx/status
     value      0
   defptr:
     readingBase:
       Absenkung  reading
       Frostschutz reading
       RaumTemp   reading
       controlsJSON reading
       controls_convectionFan1Active reading
       controls_convectionFan1Area reading
       controls_convectionFan1Level reading
       controls_convectionFan2Active reading
       controls_convectionFan2Area reading
       controls_convectionFan2Level reading
       controls_frostProtectionActive reading
       controls_frostProtectionTemperature reading
       controls_heatingPower reading
       controls_heatingTimesActive reading
       controls_heatingTimesActiveForComfort reading
       controls_onOff reading
       controls_operatingMode reading
       controls_revision reading
       controls_setBackTemperature reading
       controls_targetTemperature reading
       lastConfirmedRevision reading
       lastSeenMinutes reading
       name       reading
       sensors_inputExternalRequest reading
       sensors_inputFlameTemperature reading
       sensors_inputRoomTemperature reading
       sensors_outputAirFlaps reading
       sensors_outputDischargeMotor reading
       sensors_outputIDFan reading
       sensors_outputIgnition reading
       sensors_outputInsertionMotor reading
       sensors_parameterFeedRateService reading
       sensors_parameterFeedRateTotal reading
       sensors_parameterOnOffCycles reading
       sensors_parameterRuntimeLogs reading
       sensors_parameterRuntimePellets reading
       sensors_parameterStoveTypeNumber reading
       sensors_parameterVersionMainBoard reading
       sensors_parameterVersionTFT reading
       sensors_statusError reading
       sensors_statusFrostStarted reading
       sensors_statusMainState reading
       sensors_statusService reading
       sensors_statusSubState reading
       sensors_statusWarning reading
       stoveFeatures_airFlaps reading
       stoveFeatures_insertionMotor reading
       stoveFeatures_logRuntime reading
       stoveFeatures_multiAir1 reading
       stoveFeatures_multiAir2 reading
       stoveID    reading
       stoveType  reading
     readingNum:
       Absenkung  02
       Frostschutz 03
       RaumTemp   01
       controlsJSON 10
       controls_convectionFan1Active
       controls_convectionFan1Area
       controls_convectionFan1Level
       controls_convectionFan2Active
       controls_convectionFan2Area
       controls_convectionFan2Level
       controls_frostProtectionActive
       controls_frostProtectionTemperature
       controls_heatingPower
       controls_heatingTimesActive
       controls_heatingTimesActiveForComfort
       controls_onOff
       controls_operatingMode
       controls_revision
       controls_setBackTemperature
       controls_targetTemperature
       lastConfirmedRevision
       lastSeenMinutes
       name
       sensors_inputExternalRequest
       sensors_inputFlameTemperature
       sensors_inputRoomTemperature
       sensors_outputAirFlaps
       sensors_outputDischargeMotor
       sensors_outputIDFan
       sensors_outputIgnition
       sensors_outputInsertionMotor
       sensors_parameterFeedRateService
       sensors_parameterFeedRateTotal
       sensors_parameterOnOffCycles
       sensors_parameterRuntimeLogs
       sensors_parameterRuntimePellets
       sensors_parameterStoveTypeNumber
       sensors_parameterVersionMainBoard
       sensors_parameterVersionTFT
       sensors_statusError
       sensors_statusFrostStarted
       sensors_statusMainState
       sensors_statusService
       sensors_statusSubState
       sensors_statusWarning
       stoveFeatures_airFlaps
       stoveFeatures_insertionMotor
       stoveFeatures_logRuntime
       stoveFeatures_multiAir1
       stoveFeatures_multiAir2
       stoveID
       stoveType
     readingOutdated:
     requestReadings:
       update:
         Absenkung  reading 02
         Frostschutz reading 03
         RaumTemp   reading 01
         controlsJSON reading 10
         controls_convectionFan1Active reading
         controls_convectionFan1Area reading
         controls_convectionFan1Level reading
         controls_convectionFan2Active reading
         controls_convectionFan2Area reading
         controls_convectionFan2Level reading
         controls_frostProtectionActive reading
         controls_frostProtectionTemperature reading
         controls_heatingPower reading
         controls_heatingTimesActive reading
         controls_heatingTimesActiveForComfort reading
         controls_onOff reading
         controls_operatingMode reading
         controls_revision reading
         controls_setBackTemperature reading
         controls_targetTemperature reading
         lastConfirmedRevision reading
         lastSeenMinutes reading
         name       reading
         sensors_inputExternalRequest reading
         sensors_inputFlameTemperature reading
         sensors_inputRoomTemperature reading
         sensors_outputAirFlaps reading
         sensors_outputDischargeMotor reading
         sensors_outputIDFan reading
         sensors_outputIgnition reading
         sensors_outputInsertionMotor reading
         sensors_parameterFeedRateService reading
         sensors_parameterFeedRateTotal reading
         sensors_parameterOnOffCycles reading
         sensors_parameterRuntimeLogs reading
         sensors_parameterRuntimePellets reading
         sensors_parameterStoveTypeNumber reading
         sensors_parameterVersionMainBoard reading
         sensors_parameterVersionTFT reading
         sensors_statusError reading
         sensors_statusFrostStarted reading
         sensors_statusMainState reading
         sensors_statusService reading
         sensors_statusSubState reading
         sensors_statusWarning reading
         stoveFeatures_airFlaps reading
         stoveFeatures_insertionMotor reading
         stoveFeatures_logRuntime reading
         stoveFeatures_multiAir1 reading
         stoveFeatures_multiAir2 reading
         stoveID    reading
         stoveType  reading
   sslargs:
Attributes:
   enableCookies 1
   extractAllJSON 1
   group      Temperatur
   reAuthRegex id="login"|Unauthorized
   reading01JSON sensors_inputRoomTemperature
   reading01Name RaumTemp
   reading02JSON controls_setBackTemperature
   reading02Name Absenkung
   reading03JSON controls_frostProtectionTemperature
   reading03Name Frostschutz
   reading10Name controlsJSON
   reading10Regex (?s)controls.*?({.*?})
   replacement11Mode expression
   replacement11Regex data
   room       Favoriten,Ofen,Favourites
   set01Data  {"name": "Vorzimmer", "stoveID": "xxxxxx", "controls": {"frostProtectionTemperature": "$val"}}
   set01Hint  3,5,7,10
   set01Max   10
   set01Min   3
   set01Name  FrostschutzTemp
   set11Data  data
   set11Name  frostProtectionTemperature
   set11URL   https://www.rika-firenet.com/api//client/xxxxxx/controls?controls
   sid01Data  email=ich@wir.at&password=strenggeheim
   sid01URL   https://www.rika-firenet.com/web/login
   stateFormat T: RaumTemp
   userattr   reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Name reading10Name reading10Regex replacement11Mode:reading,internal,text,expression,key replacement11Regex set01Data set01Hint set01Max set01Min set01Name set01URL set11Data set11Name set11URL sid01Data sid01URL



und hier das Log


2017.09.12 14:27:25 3: Ofen: Attr with invalid Expression (mode is expression) in attr Ofen replacement11Value replaceJSON("frostProtectionTemperature", 2): malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./FHEM/99_myUtils.pm line 27.

2017.09.12 20:57:07 3: Ofen: Defined with URL https://www.rika-firenet.com/api/client/xxxxxx/status and interval 60
2017.09.12 20:57:07 1: Including ./log/fhem.save
2017.09.12 20:57:10 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 3225) line 1.

2017.09.12 20:57:10 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 3228) line 1.

2017.09.12 20:57:12 3: Device Eingangstuere added to ActionDetector with 028:00 time
2017.09.12 20:57:12 3: Device Rueckseite_Haus added to ActionDetector with 000:10 time
2017.09.12 20:57:12 3: Device Terrasse added to ActionDetector with 000:10 time
2017.09.12 20:57:12 3: Device Wasserschacht added to ActionDetector with 000:10 time
2017.09.12 20:57:12 3: Device Wintergarten added to ActionDetector with 000:10 time
2017.09.12 20:57:13 3: CUL_HM set Stehlampe_Stiegen statusRequest
2017.09.12 20:57:14 3: CUL_HM set Wintergartenlicht statusRequest
2017.09.12 20:57:32 3: Unregistering HTTPSRV TABLETUI for URL /ftui...
2017.09.12 20:57:32 3: myHmUART device closed
2017.09.12 20:57:32 1: Including fhem.cfg
2017.09.12 20:57:32 3: telnetPort: port 7072 opened
2017.09.12 20:57:32 3: WEB: port 8093 opened
2017.09.12 20:57:32 3: WEBphone: port 8094 opened
2017.09.12 20:57:32 3: WEBtablet: port 8095 opened
2017.09.12 20:57:32 2: eventTypes: loaded 1275 events from ./log/eventTypes.txt
2017.09.12 20:57:32 3: Opening CUL_0 device /dev/ttyACM0
2017.09.12 20:57:32 3: Setting CUL_0 serial parameters to 9600,8,N,1
2017.09.12 20:57:32 3: CUL_0: Possible commands: BCFiANEkGMKUYRTVWXefmLltux
2017.09.12 20:57:32 3: CUL_0 device opened
2017.09.12 20:57:32 3: Opening CUL_1 device /dev/ttyACM1
2017.09.12 20:57:32 3: Setting CUL_1 serial parameters to 9600,8,N,1
2017.09.12 20:57:32 3: CUL_1: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2017.09.12 20:57:32 3: CUL_1 device opened
2017.09.12 20:57:32 3: myHmUART device closed
2017.09.12 20:57:32 3: Opening myHmUART device /dev/ttyAMA0
2017.09.12 20:57:32 3: Setting myHmUART serial parameters to 115200,8,N,1
2017.09.12 20:57:32 3: myHmUART device opened
2017.09.12 20:57:33 3: TABLETUI: new ext defined infix:ftui/: dir:./www/tablet/:
2017.09.12 20:57:33 3: Registering HTTPSRV TABLETUI for URL /ftui   and assigned link ftui/ ...
2017.09.12 20:57:33 3: Ofen: Defined with URL https://www.rika-firenet.com/api/client/xxxxxx/status and interval 60
2017.09.12 20:57:34 1: Including ./log/fhem.save
2017.09.12 20:57:34 5: Ofen: UpdateHintList called
2017.09.12 20:57:34 5: Ofen: UpdateHintList: setlist = FrostschutzTemp:3,5,7,10 frostProtectionTemperature
2017.09.12 20:57:34 5: Ofen: UpdateHintList: getlist =
2017.09.12 20:57:35 4: Ofen: GetUpdate called (update)
2017.09.12 20:57:35 4: Ofen: update timer modified: will call GetUpdate in 60.0 seconds at 2017-09-12 20:58:35
2017.09.12 20:57:35 4: Ofen: AddToQueue adds update, initial queue len: 0
2017.09.12 20:57:35 5: Ofen: AddToQueue adds type update to URL https://www.rika-firenet.com/api/client/xxxxxx/status, no data, no headers, retry 0
2017.09.12 20:57:35 5: Ofen: HandleSendQueue called, qlen = 1
2017.09.12 20:57:35 5: Ofen: Replace called for type update, regex data, mode expression, empty value input:
2017.09.12 20:57:35 5: Ofen: Replace called for type update, regex data, mode expression, empty value input:
2017.09.12 20:57:35 5: Ofen: Replace called for type update, regex data, mode expression, empty value input: https://www.rika-firenet.com/api/client/xxxxxx/status
2017.09.12 20:57:35 4: Ofen: HandleSendQueue sends request type update to URL https://www.rika-firenet.com/api/client/xxxxxx/status, No Data, No Header,
timeout 2
2017.09.12 20:57:35 4: HttpUtils url=https://www.rika-firenet.com/api/client/xxxxxx/status
2017.09.12 20:57:36 5: HttpUtils request header:
GET /api/client/xxxxxx/status HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

2017.09.12 20:57:36 4: https://www.rika-firenet.com/api/client/xxxxxx/status: HTTP response code 401
2017.09.12 20:57:36 4: HttpUtils https://www.rika-firenet.com/api/client/xxxxxx/status: Got data, length: 23
2017.09.12 20:57:36 5: HttpUtils response header:
HTTP/1.1 401 Unauthorized
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 23
Etag: W/"17-JhHneFlTK9mhCN6EForSDQ"
Set-Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI; Path=/; HttpOnly
Vary: Accept-Encoding
Date: Tue, 12 Sep 2017 18:57:36 GMT
Via: 1.1 vegur
2017.09.12 20:57:36 4: Ofen: Read callback: request type was update retry 0,
Header: HTTP/1.1 401 Unauthorized
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 23
Etag: W/"17-JhHneFlTK9mhCN6EForSDQ"
Set-Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI; Path=/; HttpOnly
Vary: Accept-Encoding
Date: Tue, 12 Sep 2017 18:57:36 GMT
Via: 1.1 vegur,
Body: Authorisation required!
2017.09.12 20:57:36 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 3281) line 1.

2017.09.12 20:57:36 5: Ofen: looking for Cookies in HTTP/1.1 401 Unauthorized
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 23
Etag: W/"17-JhHneFlTK9mhCN6EForSDQ"
Set-Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI; Path=/; HttpOnly
Vary: Accept-Encoding
Date: Tue, 12 Sep 2017 18:57:36 GMT
Via: 1.1 vegur
2017.09.12 20:57:36 5: Ofen: Set-Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI; Path=/; HttpOnly
2017.09.12 20:57:36 4: Ofen: Cookie: connect.sid Wert s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI Rest Path=/; HttpOnly
2017.09.12 20:57:36 5: Ofen: ExtractSid called, context reading, num
2017.09.12 20:57:36 5: Ofen: CheckAuth is checking buffer with ReAuthRegex id="login"|Unauthorized
2017.09.12 20:57:36 4: Ofen: CheckAuth decided new authentication required
2017.09.12 20:57:36 4: Ofen: Auth called with Steps: 01
2017.09.12 20:57:36 4: Ofen: AddToQueue adds auth01, initial queue len: 0, prio
2017.09.12 20:57:36 5: Ofen: AddToQueue prepends type auth01 to URL https://www.rika-firenet.com/web/login, data email=ich@wir.at&password=strenggeheim, no headers, retry 0
2017.09.12 20:57:36 5: Ofen: HandleSendQueue called, qlen = 1
2017.09.12 20:57:36 5: Ofen: Replace called for type auth01, regex data, mode expression, empty value input:
2017.09.12 20:57:36 5: Ofen: Replace called for type auth01, regex data, mode expression, empty value input: email=ich@wir.at&password=strenggeheim
2017.09.12 20:57:36 5: Ofen: Replace called for type auth01, regex data, mode expression, empty value input: https://www.rika-firenet.com/web/login
2017.09.12 20:57:36 5: Ofen: HandleSendQueue is adding Cookies: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI
2017.09.12 20:57:36 4: Ofen: HandleSendQueue sends request type auth01 to URL https://www.rika-firenet.com/web/login,
data: email=ich@wir.at&password=strenggeheim,
header: Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI,
timeout 2
2017.09.12 20:57:36 4: HttpUtils url=https://www.rika-firenet.com/web/login
2017.09.12 20:57:36 4: Ofen: AddToQueue adds update, initial queue len: 0
2017.09.12 20:57:36 5: Ofen: AddToQueue adds type update to URL https://www.rika-firenet.com/api/client/xxxxxx/status, no data, no headers, retry 1
2017.09.12 20:57:36 5: Ofen: HandleSendQueue called, qlen = 1
2017.09.12 20:57:36 5: Ofen: HandleSendQueue - still waiting for reply to last request, delay sending from queue
2017.09.12 20:57:36 4: Ofen: CheckAuth requeued request update after auth, retryCount 0 ...
2017.09.12 20:57:36 5: HttpUtils request header:
POST /web/login HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI
Content-Length: 40
Content-Type: application/x-www-form-urlencoded

2017.09.12 20:57:36 4: https://www.rika-firenet.com/web/login: HTTP response code 302
2017.09.12 20:57:36 4: HttpUtils https://www.rika-firenet.com/web/login: Redirect to https://www.rika-firenet.com:443/web/summary
2017.09.12 20:57:36 4: HttpUtils url=https://www.rika-firenet.com:443/web/summary
2017.09.12 20:57:36 5: HttpUtils request header:
POST /web/summary HTTP/1.0
Host: www.rika-firenet.com
User-Agent: fhem
Cookie: connect.sid=s%3AaBBQkGHdLiCEFVYDoDenecnrs29H-WCa.UqH9cE7j9h588Y3R1p2a7sK01mj74pbu2VF3ClJ5z%2FI
Content-Length: 40
Content-Type: application/x-www-form-urlencoded


jump to the top




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

Ja klar. Dein Device heisst Ofen und nicht ofen.

Dann musst Du folgendes anpassen:
myUtils wird:
sub replaceJSON ($$) {
   my ($valToReplace, $value) = @_;
   $value = InternalVal("Ofen", "value", 2);
   Log3 ("Ofen", 3, "replaceJSON Internalvalue: $value");

   my $json = ReadingsVal("Ofen", "controlsJSON","");
   my $decoded = decode_json($json);
   $decoded->{"$valToReplace"} = $value + 0;
   my $result = encode_json($decoded);
   Log3("Ofen", 3, "replaceJSON Result: $result");
   return $result;
}


und dann
attr Ofen replacement11Value replaceJSON("frostProtectionTemperature", 2)
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

Och du Schande
die attr habe ich getippt und die 99er habe ich kopiert.......  und nicht gedacht

Aber jetzt kommt das
Attr with invalid Expression (mode is expression) in attr Ofen replacement11Value replaceJSON("frostProtectionTemperature", 2): malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at ./FHEM/99_myUtils.pm line 27, <$fh> line 650.


das ist die 99
sub replaceJSON ($$) {
   my ($valToReplace, $value) = @_;
   $value = InternalVal("Ofen", "value", 2);
   Log3 ("Ofen", 3, "replaceJSON Internalvalue: $value");

   my $json = ReadingsVal("Ofen", "controlsJSON","");
   my $decoded = decode_json($json);
   $decoded->{"$valToReplace"} = $value + 0;
   my $result = encode_json($decoded);
   Log3("Ofen", 3, "replaceJSON Result: $result");
   return $result;
}


und hier das letzte Log
Body: {"name":"Vorzimmer","stoveID":"xxxxxx","lastSeenMinutes":0,"lastConfirmedRevision":1505198797,"controls":{"revision":1505198797,"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":4},"sensors":{"statusError":0,"statusWarning":0,"statusService":0,"statusMainState":1,"statusSubState":3,"statusFrostStarted":false,"inputFlameTemperature":26,"inputRoomTemperature":23,"inputExternalRequest":true,"outputDischargeMotor":0,"outputInsertionMotor":0,"outputIDFan":0,"outputAirFlaps":0,"outputIgnition":false,"parameterStoveTypeNumber":13,"parameterVersionMainBoard":223,"parameterVersionTFT":223,"parameterRuntimePellets":26,"parameterRuntimeLogs":0,"parameterFeedRateTotal":40,"parameterFeedRateService":660,"parameterOnOffCycles":2},"stoveType":"DOMO MultiAir","stoveFeatures":{"multiAir1":true,"multiAir2":true,"insertionMotor":false,"airFlaps":false,"logRuntime":false}}
2017.09.12 23:01:08 5: Ofen: JSON Flatter called : prefix , ref is HASH(0x2745790)
2017.09.12 23:01:08 5: Ofen: JSON Flatter doing recursion because value is a HASH
2017.09.12 23:01:08 5: Ofen: JSON Flatter called : prefix stoveFeatures_, ref is HASH(0x269fdd8)
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveFeatures_airFlaps to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveFeatures_multiAir2 to true
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveFeatures_insertionMotor to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveFeatures_logRuntime to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveFeatures_multiAir1 to true
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets lastSeenMinutes to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveID to xxxxxx
2017.09.12 23:01:08 5: Ofen: JSON Flatter doing recursion because value is a HASH
2017.09.12 23:01:08 5: Ofen: JSON Flatter called : prefix controls_, ref is HASH(0x26da678)
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_convectionFan1Area to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_convectionFan2Level to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_heatingTimesActiveForComfort to true
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_frostProtectionTemperature to 4
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_frostProtectionActive to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_convectionFan2Area to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_heatingTimesActive to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_heatingPower to 65
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_setBackTemperature to 18
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_revision to 1505198797
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_operatingMode to 2
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_convectionFan1Active to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_convectionFan2Active to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_convectionFan1Level to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_onOff to true
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets controls_targetTemperature to 24
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets stoveType to DOMO MultiAir
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets name to Vorzimmer
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets lastConfirmedRevision to 1505198797
2017.09.12 23:01:08 5: Ofen: JSON Flatter doing recursion because value is a HASH
2017.09.12 23:01:08 5: Ofen: JSON Flatter called : prefix sensors_, ref is HASH(0x307f420)
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_inputRoomTemperature to 23
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_outputIgnition to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterVersionMainBoard to 223
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_statusFrostStarted to false
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_outputDischargeMotor to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_statusService to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_outputInsertionMotor to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_statusWarning to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterOnOffCycles to 2
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_outputAirFlaps to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_inputFlameTemperature to 26
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterVersionTFT to 223
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterStoveTypeNumber to 13
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_statusMainState to 1
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_statusError to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterFeedRateTotal to 40
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterRuntimePellets to 26
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterRuntimeLogs to 0
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_inputExternalRequest to true
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_statusSubState to 3
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_parameterFeedRateService to 660
2017.09.12 23:01:08 5: Ofen: JSON Flatter sets sensors_outputIDFan to 0
2017.09.12 23:01:08 4: Ofen: extracted JSON values to internal
2017.09.12 23:01:08 5: Ofen: looking for Cookies in HTTP/1.1 200 OK
Server: Cowboy
Connection: close
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 1187
Etag: W/"4a3-dPqJqep1DbueKJzLHQyJLw"
Vary: Accept-Encoding
Date: Tue, 12 Sep 2017 21:01:08 GMT
Via: 1.1 vegur
2017.09.12 23:01:08 5: Ofen: ExtractSid called, context reading, num
2017.09.12 23:01:08 5: Ofen: CheckAuth is checking buffer with ReAuthRegex id="login"|Unauthorized
2017.09.12 23:01:08 4: Ofen: CheckAuth decided no authentication required
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_outputInsertionMotor as reading sensors_outputInsertionMotor to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_convectionFan1Active as reading controls_convectionFan1Active to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON name as reading name to value Vorzimmer
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_convectionFan1Area as reading controls_convectionFan1Area to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterOnOffCycles as reading sensors_parameterOnOffCycles to value 2
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterVersionMainBoard as reading sensors_parameterVersionMainBoard to value 223
2017.09.12 23:01:08 5: Ofen: Read set JSON lastConfirmedRevision as reading lastConfirmedRevision to value 1505198797
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_convectionFan1Level as reading controls_convectionFan1Level to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_setBackTemperature as reading controls_setBackTemperature to value 18
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_convectionFan2Area as reading controls_convectionFan2Area to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_frostProtectionActive as reading controls_frostProtectionActive to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterStoveTypeNumber as reading sensors_parameterStoveTypeNumber to value 13
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_statusService as reading sensors_statusService to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_convectionFan2Active as reading controls_convectionFan2Active to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_heatingTimesActiveForComfort as reading controls_heatingTimesActiveForComfort to value true
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterVersionTFT as reading sensors_parameterVersionTFT to value 223
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterFeedRateService as reading sensors_parameterFeedRateService to value 660
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_inputFlameTemperature as reading sensors_inputFlameTemperature to value 26
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_operatingMode as reading controls_operatingMode to value 2
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_statusWarning as reading sensors_statusWarning to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_heatingPower as reading controls_heatingPower to value 65
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_frostProtectionTemperature as reading controls_frostProtectionTemperature to value 4
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveType as reading stoveType to value DOMO MultiAir
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveID as reading stoveID to value xxxxxx
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_convectionFan2Level as reading controls_convectionFan2Level to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_heatingTimesActive as reading controls_heatingTimesActive to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_outputIDFan as reading sensors_outputIDFan to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_inputRoomTemperature as reading sensors_inputRoomTemperature to value 23
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_statusFrostStarted as reading sensors_statusFrostStarted to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveFeatures_multiAir1 as reading stoveFeatures_multiAir1 to value true
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_onOff as reading controls_onOff to value true
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_outputDischargeMotor as reading sensors_outputDischargeMotor to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_revision as reading controls_revision to value 1505198797
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_statusMainState as reading sensors_statusMainState to value 1
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterFeedRateTotal as reading sensors_parameterFeedRateTotal to value 40
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveFeatures_airFlaps as reading stoveFeatures_airFlaps to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON controls_targetTemperature as reading controls_targetTemperature to value 24
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterRuntimePellets as reading sensors_parameterRuntimePellets to value 26
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_parameterRuntimeLogs as reading sensors_parameterRuntimeLogs to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_statusError as reading sensors_statusError to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveFeatures_logRuntime as reading stoveFeatures_logRuntime to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_outputAirFlaps as reading sensors_outputAirFlaps to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_statusSubState as reading sensors_statusSubState to value 3
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveFeatures_insertionMotor as reading stoveFeatures_insertionMotor to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_outputIgnition as reading sensors_outputIgnition to value false
2017.09.12 23:01:08 5: Ofen: Read set JSON lastSeenMinutes as reading lastSeenMinutes to value 0
2017.09.12 23:01:08 5: Ofen: Read set JSON sensors_inputExternalRequest as reading sensors_inputExternalRequest to value true
2017.09.12 23:01:08 5: Ofen: Read set JSON stoveFeatures_multiAir2 as reading stoveFeatures_multiAir2 to value true
2017.09.12 23:01:08 5: Ofen: Read starts parsing response to update with defined readings: 01,02,03,10
2017.09.12 23:01:08 5: Ofen: ExtractReading RaumTemp with json sensors_inputRoomTemperature ...
2017.09.12 23:01:08 4: Ofen: ExtractReading for reading01-1 sets RaumTemp to 23
2017.09.12 23:01:08 5: Ofen: ExtractReading Absenkung with json controls_setBackTemperature ...
2017.09.12 23:01:08 4: Ofen: ExtractReading for reading02-1 sets Absenkung to 18
2017.09.12 23:01:08 5: Ofen: ExtractReading Frostschutz with json controls_frostProtectionTemperature ...
2017.09.12 23:01:08 4: Ofen: ExtractReading for reading03-1 sets Frostschutz to 4
2017.09.12 23:01:08 5: Ofen: ExtractReading controlsJSON with regex /(?s)controls.*?({.*?})/...
2017.09.12 23:01:08 5: Ofen: 1 capture group(s), matchlist = {"revision":1505198797,"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":4}
2017.09.12 23:01:08 4: Ofen: ExtractReading for reading10-1 sets controlsJSON to {"revision":1505198797,"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":4}
2017.09.12 23:01:08 4: Ofen: Read response to update matched Reading(s) sensors_outputInsertionMotor controls_convectionFan1Active name controls_convectionFan1Area sensors_parameterOnOffCycles sensors_parameterVersionMainBoard lastConfirmedRevision controls_convectionFan1Level controls_setBackTemperature controls_convectionFan2Area controls_frostProtectionActive sensors_parameterStoveTypeNumber sensors_statusService controls_convectionFan2Active controls_heatingTimesActiveForComfort sensors_parameterVersionTFT sensors_parameterFeedRateService sensors_inputFlameTemperature controls_operatingMode sensors_statusWarning controls_heatingPower controls_frostProtectionTemperature stoveType stoveID controls_convectionFan2Level controls_heatingTimesActive sensors_outputIDFan sensors_inputRoomTemperature sensors_statusFrostStarted stoveFeatures_multiAir1 controls_onOff sensors_outputDischargeMotor controls_revision sensors_statusMainState sensors_parameterFeedRateTotal stoveFeatures_airFlaps controls_targetTemperature sensors_parameterRuntimePellets sensors_parameterRuntimeLogs sensors_statusError stoveFeatures_logRuntime sensors_outputAirFlaps sensors_statusSubState stoveFeatures_insertionMotor sensors_outputIgnition lastSeenMinutes sensors_inputExternalRequest stoveFeatures_multiAir2 RaumTemp Absenkung Frostschutz controlsJSON
2017.09.12 23:01:08 5: Ofen: HandleSendQueue called, qlen = 0


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/