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

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

Vorheriges Thema - Nächstes Thema

amenomade

Sorry für die ID, hab ich rausgenommen.

Wiederum die Frage: kommt  die Fehlermeldung nur in der Log, oder kommt die wenn Du versuchts, set11Replacement01Value  zu setzen, und dieses Attr wird dann nicht gesetzt?
Wenn es nur in der Log ist, habe ich das Problem auch gehabt. Das kommt davon aus, dass andere Anfragen des HTTPMODs versuchen die Funktion zu rufen, wenn (noch) keine JSON String im Reading. Der Ofen lässt sich aber trotzdem steuern. Wichtig ist, wenn Du mit verbose >= 3 die Log3 Zeilen der Funktion mit richtigen Werte siehst, und wenn die kalkulierte "data" String korrekt gesetzt wird. Danach sollte ein HTTP 200 erfolgen.

Wenn es doch nicht funktioniert, dann kennst du das Verfahren ;) "list Ofen" und relevante Log :) Evtl. nimmst Du das extractAllJSON weg, und machst dann ein "deletereading Ofen .*", dann wird die log deutlich kleiner.
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

#61
OK, ich glaube, ich habe verstanden, was du meintest, und ich kann das Problem reproduzieren. Passiert theoretisch nur bei einem rereadcfg oder ein shutdown/restart von Fhem... was ich bisher nie gemacht hatte..., oder kurz nach dem define, wenn noch keine Werte gelesen worden sind ;)

Dann werden die entspr. Attribute nicht mehr angelegt.
Das ist aber normal, da beim Lesen der Configdatei der Wert von controlsJSON noch nicht gesetzt ist. Wir müssen dann schummeln. Und zwar im myUtils, eine Zeile return if ($json eq ""); hinzufügen:

sub
replaceJSON ($$) {
   my ($valToReplace, $value) = @_;
   $value = InternalVal("Ofen", "value", $value);
   Log3 ("Ofen", 3, "replaceJSON Internalvalue: $value");
   fhem ("get Ofen revision");
   my $json = ReadingsVal("Ofen", "controlsJSON","");
   Log3 ("Ofen", 3, "replaceJSON configsJSON: $json");
   return if ($json eq "");                                                 ### Schummeln beim restart o. rereadcfg da $json noch leer
   my $decoded = decode_json($json);
   my $result;
   for my $key ( keys %$decoded ) {
      $result .= "$key=";
      if ($key eq $valToReplace) {
         $result .= $value."&";
      } else {
         $result .= $decoded->{$key}."&";
      }
   }
   chop($result);
   Log3("Ofen", 3, "replaceJSON Result: $result");
   return $result;
}

Damit wird decode_json nicht aufgerufen, wenn $json beim Start / rereadcfg leer ist.
Sollte aber den gesamten Set-Vorgang nicht beeinflussen, weil dabei $json nw. nicht leer ist.
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 und sorry dass ich mich gestern nicht gemeldet hatte.
Also, nachdem ich nun die Zeile in die 99er eingefügt habe, kommt die Meldung
nach dem setzen des Attr nicht mehr.

Gebe ich nun set Ofen frostProtectionTemperature 3
ein, ändert sich im Ofen nichts und auch die Readings ändern sich nicht.

Hier die Log

2017.09.16 10:21:29 1: Including fhem.cfg
2017.09.16 10:21:29 3: telnetPort: port 7072 opened
2017.09.16 10:21:30 3: WEB: port 8093 opened
2017.09.16 10:21:30 3: WEBphone: port 8094 opened
2017.09.16 10:21:30 3: WEBtablet: port 8095 opened
2017.09.16 10:21:30 2: eventTypes: loaded 1227 events from ./log/eventTypes.txt
2017.09.16 10:21:30 3: Opening CUL_0 device /dev/ttyACM0
2017.09.16 10:21:30 3: Setting CUL_0 serial parameters to 9600,8,N,1
2017.09.16 10:21:31 3: CUL_0: Possible commands: BCFiANEkGMKUYRTVWXefmLltux
2017.09.16 10:21:31 3: CUL_0 device opened
2017.09.16 10:21:31 3: Opening CUL_1 device /dev/ttyACM1
2017.09.16 10:21:31 3: Setting CUL_1 serial parameters to 9600,8,N,1
2017.09.16 10:21:31 3: CUL_1: Possible commands: BbCFiAZNkGMKUYRTVWXefmLltux
2017.09.16 10:21:31 3: CUL_1 device opened
2017.09.16 10:21:31 3: myHmUART device closed
2017.09.16 10:21:31 3: Opening myHmUART device /dev/ttyAMA0
2017.09.16 10:21:31 3: Setting myHmUART serial parameters to 115200,8,N,1
2017.09.16 10:21:31 3: myHmUART device opened
2017.09.16 10:21:33 3: TABLETUI: new ext defined infix:ftui/: dir:./www/tablet/:
2017.09.16 10:21:33 3: Registering HTTPSRV TABLETUI for URL /ftui   and assigned link ftui/ ...
2017.09.16 10:21:33 3: Ofen: Defined with URL https://www.rika-firenet.com/api/client/54156160/status and interval 60
2017.09.16 10:21:33 3: replaceJSON Internalvalue: 2
2017.09.16 10:21:33 3: Ofen: HandleSendQueue - init not done, delay sending from queue
2017.09.16 10:21:33 3: get Ofen revision : revision requested, watch readings
2017.09.16 10:21:33 3: replaceJSON configsJSON:
2017.09.16 10:21:33 3: replaceJSON Internalvalue: 24
2017.09.16 10:21:33 3: Ofen: HandleSendQueue - init not done, delay sending from queue
2017.09.16 10:21:33 3: get Ofen revision : revision requested, watch readings
2017.09.16 10:21:33 3: replaceJSON configsJSON:
2017.09.16 10:21:34 1: Including ./log/fhem.save
2017.09.16 10:21:34 3: Device Eingangstuere added to ActionDetector with 028:00 time
2017.09.16 10:21:34 3: Device Rueckseite_Haus added to ActionDetector with 000:10 time
2017.09.16 10:21:34 3: Device Terrasse added to ActionDetector with 000:10 time
2017.09.16 10:21:34 3: Device Wasserschacht added to ActionDetector with 000:10 time
2017.09.16 10:21:34 3: Device Wintergarten added to ActionDetector with 000:10 time
2017.09.16 10:21:34 1: usb create starting
2017.09.16 10:21:34 3: Probing CUL device /dev/ttyS0
2017.09.16 10:21:34 1: usb create end
2017.09.16 10:21:34 0: Featurelevel: 5.8
2017.09.16 10:21:34 0: Server started with 109 defined entities (fhem.pl:15042/2017-09-10 perl:5.020002 os:linux user:fhem pid:17464)
2017.09.16 10:21:35 3: CUL_HM set Stehlampe_Stiegen statusRequest
2017.09.16 10:21:35 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 68) line 1.

2017.09.16 10:21:35 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html><html...") at (eval 71) line 1.

2017.09.16 10:21:36 3: CUL_HM set Wintergartenlicht statusRequest
2017.09.16 10:22:33 3: telnetForBlockingFn_1505550153.40106: port 35607 opened
2017.09.16 10:23:07 3: replaceJSON Internalvalue: 3
2017.09.16 10:23:07 3: get Ofen revision : revision requested, watch readings
2017.09.16 10:23:07 3: replaceJSON configsJSON: {"revision":1505550101,"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":8}
2017.09.16 10:23:07 3: replaceJSON Result: heatingTimesActiveForComfort=true&frostProtectionTemperature=3&setBackTemperature=18&targetTemperature=24&convectionFan2Level=0&convectionFan2Active=false&convectionFan1Level=0&onOff=true&convectionFan1Active=false&convectionFan2Area=0&revision=1505550101&heatingTimesActive=false&convectionFan1Area=0&frostProtectionActive=false&operatingMode=2&heatingPower=65
2017.09.16 10:26:35 3: replaceJSON Internalvalue: 3
2017.09.16 10:26:35 3: get Ofen revision : revision requested, watch readings
2017.09.16 10:26:35 3: replaceJSON configsJSON: {"revision":1505550101,"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":8}
2017.09.16 10:26:35 3: replaceJSON Result: heatingPower=65&convectionFan1Active=false&convectionFan2Area=0&revision=1505550101&heatingTimesActive=false&convectionFan1Area=0&operatingMode=2&frostProtectionActive=false&convectionFan2Level=0&convectionFan2Active=false&convectionFan1Level=0&onOff=true&heatingTimesActiveForComfort=true&frostProtectionTemperature=3&setBackTemperature=18&targetTemperature=24


Ändere ich im Ofen selbst den Frostschutz auf z.B. 5 Grad, ändert sich das Reading  schon - das passt. (siehe Bild)

Und jetzt kommt das merkwürdige an der Sache - ändere ich im Ofen wieder zurück auf 8 Grad, wird es in den attr angezeigt, ändert sich aber nach dem Intervall
wieder zurück auf die 5 Grad.
Dafür sehe ich in der Log bei Verbose 3 nichts.
Das kommt sicher davon - oder? Durch "set Ofen frostProtectionTemperature 5" wird {{data}} mit dem Ergebnis von der Funktion, sprich die gesamte Kette von controls, wie die letztens gelesen worden sind, ersetzt. Nur "frostProtectionTemperature" wird durch den neuen Wert 5 in der Funktion geändert. Das zweite Parameter "2" gilt als "defaultValue", falls er evtl. die 5 nicht erinnern kann (diese wird im Internal "value" nw. gespeichert, und dann in der Funtion mit "InternalVal("Ofen", "value", defVal)" wieder gelesen.


Hier nochmals ein List vom Ofen

Internals:
   BUSY       0
   DEF        https://www.rika-firenet.com/api/client/xxxxxx/status 60
   HTTPCookies connect.sid=s%3Az49BrEKspQ3me0yVGbnXebs_DhknE0Se.GpBQdf%2FVFegKUDXT4MPzBgAa2ZOdDiWIPogNxesGpDc
   Interval   60
   JSONEnabled 1
   LASTSEND   1505550996.03562
   LastAuthTry 2017-09-16 10:21:35
   MainURL    https://www.rika-firenet.com/api/client/xxxxxx/status
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       Ofen
   NR         239
   ReplacementEnabled 1
   STATE      T: 23
   TRIGGERTIME 1505551056.03415
   TRIGGERTIME_FMT 2017-09-16 10:37:36
   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%3Az49BrEKspQ3me0yVGbnXebs_DhknE0Se.GpBQdf%2FVFegKUDXT4MPzBgAa2ZOdDiWIPogNxesGpDc
   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-LLB0YPoLQSbBsCN7yG9rvQ"

Vary: Accept-Encoding

Date: Sat, 16 Sep 2017 08:36:36 GMT

Via: 1.1 vegur
   httpversion 1.0
   hu_blocking 0
   hu_filecount 25
   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%3Az49BrEKspQ3me0yVGbnXebs_DhknE0Se.GpBQdf%2FVFegKUDXT4MPzBgAa2ZOdDiWIPogNxesGpDc
   QUEUE:
   READINGS:
     2017-09-16 10:36:36   Absenkung       18
     2017-09-16 10:36:36   Frostschutz     5
     2017-09-16 10:36:36   RaumTemp        23
     2017-09-16 10:36:36   controlsJSON    {"revision":1505550697,"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}
   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
     readingNum:
       Absenkung  02
       Frostschutz 03
       RaumTemp   01
       controlsJSON 10
     readingOutdated:
     requestReadings:
       get09:
         Absenkung  reading 02
         Frostschutz reading 03
         RaumTemp   reading 01
         controlsJSON reading 10
       update:
         Absenkung  reading 02
         Frostschutz reading 03
         RaumTemp   reading 01
         controlsJSON reading 10
   sslargs:
Attributes:
   enableCookies 1
   get09Name  revision
   get09URL   https://www.rika-firenet.com/api/client/xxxxxx/status
   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.*?({.*?})
   replacement01Mode expression
   replacement01Regex {{data}}
   room       Favoriten,Ofen,Favourites
   set11Name  frostProtectionTemperature
   set11Replacement01Value replaceJSON("frostProtectionTemperature", 2)
   set12Name  targetTemperature
   set12Replacement01Value replaceJSON("targetTemperature", 24)
   setData    {{data}}
   setURL     https://www.rika-firenet.com/api/client//controls
   sid01Data  email=xx@xx.at&password=strenggeheim
   sid01URL   https://www.rika-firenet.com/web/login
   stateFormat T: RaumTemp
   userattr   get09Name get09URL reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Name reading10Name reading10Regex replacement01Mode:reading,internal,text,expression,key replacement01Regex set11Name set11Replacement01Value set12Name set12Replacement01Value setData setURL sid01Data sid01URL
   verbose    3



Danke dir
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

Bin unterwegs, aber du hast noch ein doppel slash in seturl. Wenn es nicht reicht, dann brauche ich verbose 5. Die funktion tut was sie soll

Via Tapatalk

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 und herzlichen Dank. Das wars ich hatte keine OfenID drinnen (//)
Du bist genial - das was du analysiert hast steht in keiner CommandRef
Ich werde den thread noch umbennen damit man(n) RIKA und Firenet findet.
Ich habe leider keine Berechtigung fürs Wiki - wäre sichere interessant es dort raufzustellen (wenn du einverstanden bist, ist ja dein Werk)
Ich werde auf jeden Fall wenn ich alles definiert habe, noch zum Abschluss hier ein list einstellen.
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

Cool :)

Das mit dem Wiki hatte ich schon vor. Ich wollte aber warten, bis es funktioniert ;) Jetzt hab ich es angepasst
https://wiki.fhem.de/wiki/HTTPMOD#Further_replacements_of_URL.2C_header_or_post_data

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

Nochmals ein großer Dank an amenomade.
Hier das list vom Ofen (Rika Domo MultiAir - verbunden über iNet mit RIKAFirenet)

Internals:
   BUSY       0
   DEF        https://www.rika-firenet.com/api/client/Deine_Ofen_ID/status 60
   HTTPCookies connect.sid=s%3AEXFUy7ISrlLvOtgPQH_sjSzddnoBa8ID.V%2FkNPbtb1O5ULz2e85YsQZTHfJjWg4HyBObY2w%2BwjfE
   Interval   60
   JSONEnabled 1
   LASTSEND   1505831551.70873
   LastAuthTry 2017-09-19 16:31:31
   MainURL    https://www.rika-firenet.com/api/client/Deine_Ofen_ID/status
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       Ofen
   NR         239
   ReplacementEnabled 1
   STATE      T: 22
   TRIGGERTIME 1505831611.70731
   TRIGGERTIME_FMT 2017-09-19 16:33:31
   TYPE       HTTPMOD
   addr       https://www.rika-firenet.com:443
   buf
   code       200
   conn
   data
   displayurl https://www.rika-firenet.com/api/client/Deine_Ofen_ID/status
   header     Cookie: connect.sid=s%3AEXFUy7ISrlLvOtgPQH_sjSzddnoBa8ID.V%2FkNPbtb1O5ULz2e85YsQZTHfJjWg4HyBObY2w%2BwjfE
   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-tB40qilW8N6fhbtIlHLHYg"

Vary: Accept-Encoding

Date: Tue, 19 Sep 2017 14:32:31 GMT

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

       Value      s%3AEXFUy7ISrlLvOtgPQH_sjSzddnoBa8ID.V%2FkNPbtb1O5ULz2e85YsQZTHfJjWg4HyBObY2w%2BwjfE
   QUEUE:
   READINGS:
     2017-09-19 16:32:32   Absenkung       18
     2017-09-19 16:32:32   Frostschutz     5
     2017-09-19 16:32:32   RaumTemp        22
     2017-09-19 16:32:32   controlsJSON    {"revision":1505824038,"onOff":true,"operatingMode":2,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":18,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":5}
     2017-09-19 16:32:32   controls_convectionFan1Active false
     2017-09-19 16:32:32   controls_convectionFan1Area 0
     2017-09-19 16:32:32   controls_convectionFan1Level 0
     2017-09-19 16:32:32   controls_convectionFan2Active false
     2017-09-19 16:32:32   controls_convectionFan2Area 0
     2017-09-19 16:32:32   controls_convectionFan2Level 0
     2017-09-19 16:32:32   controls_frostProtectionActive false
     2017-09-19 16:32:32   controls_frostProtectionTemperature 5
     2017-09-19 16:32:32   controls_heatingPower 80
     2017-09-19 16:32:32   controls_heatingTimesActive false
     2017-09-19 16:32:32   controls_heatingTimesActiveForComfort true
     2017-09-19 16:32:32   controls_onOff  true
     2017-09-19 16:32:32   controls_operatingMode 2
     2017-09-19 16:32:32   controls_revision 1505824038
     2017-09-19 16:32:32   controls_setBackTemperature 18
     2017-09-19 16:32:32   controls_targetTemperature 24
     2017-09-19 16:32:32   lastConfirmedRevision 1505824038
     2017-09-19 16:32:32   lastSeenMinutes 1
     2017-09-19 16:32:32   name            Vorzimmer
     2017-09-19 16:32:32   sensors_inputExternalRequest true
     2017-09-19 16:32:32   sensors_inputFlameTemperature 42
     2017-09-19 16:32:32   sensors_inputRoomTemperature 22
     2017-09-19 16:32:32   sensors_outputAirFlaps 0
     2017-09-19 16:32:32   sensors_outputDischargeMotor 0
     2017-09-19 16:32:32   sensors_outputIDFan 0
     2017-09-19 16:32:32   sensors_outputIgnition false
     2017-09-19 16:32:32   sensors_outputInsertionMotor 0
     2017-09-19 16:32:32   sensors_parameterFeedRateService 633
     2017-09-19 16:32:32   sensors_parameterFeedRateTotal 67
     2017-09-19 16:32:32   sensors_parameterOnOffCycles 2
     2017-09-19 16:32:32   sensors_parameterRuntimeLogs 0
     2017-09-19 16:32:32   sensors_parameterRuntimePellets 46
     2017-09-19 16:32:32   sensors_parameterStoveTypeNumber 13
     2017-09-19 16:32:32   sensors_parameterVersionMainBoard 223
     2017-09-19 16:32:32   sensors_parameterVersionTFT 223
     2017-09-19 16:32:32   sensors_statusError 0
     2017-09-19 16:32:32   sensors_statusFrostStarted false
     2017-09-19 16:32:32   sensors_statusMainState 1
     2017-09-19 16:32:32   sensors_statusService 0
     2017-09-19 16:32:32   sensors_statusSubState 3
     2017-09-19 16:32:32   sensors_statusWarning 0
     2017-09-19 16:32:32   stoveFeatures_airFlaps false
     2017-09-19 16:32:32   stoveFeatures_insertionMotor false
     2017-09-19 16:32:32   stoveFeatures_logRuntime false
     2017-09-19 16:32:32   stoveFeatures_multiAir1 true
     2017-09-19 16:32:32   stoveFeatures_multiAir2 true
     2017-09-19 16:32:32   stoveID         Deine_Ofen_ID
     2017-09-19 16:32:32   stoveType       DOMO MultiAir
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://www.rika-firenet.com/api/client/Deine_Ofen_ID/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:
       get09:
         Absenkung  reading 02
         Frostschutz reading 03
         RaumTemp   reading 01
         controlsJSON reading 10
         controls_convectionFan1Active get 09
         controls_convectionFan1Area get 09
         controls_convectionFan1Level get 09
         controls_convectionFan2Active get 09
         controls_convectionFan2Area get 09
         controls_convectionFan2Level get 09
         controls_frostProtectionActive get 09
         controls_frostProtectionTemperature get 09
         controls_heatingPower get 09
         controls_heatingTimesActive get 09
         controls_heatingTimesActiveForComfort get 09
         controls_onOff get 09
         controls_operatingMode get 09
         controls_revision get 09
         controls_setBackTemperature get 09
         controls_targetTemperature get 09
         lastConfirmedRevision get 09
         lastSeenMinutes get 09
         name       get 09
         sensors_inputExternalRequest get 09
         sensors_inputFlameTemperature get 09
         sensors_inputRoomTemperature get 09
         sensors_outputAirFlaps get 09
         sensors_outputDischargeMotor get 09
         sensors_outputIDFan get 09
         sensors_outputIgnition get 09
         sensors_outputInsertionMotor get 09
         sensors_parameterFeedRateService get 09
         sensors_parameterFeedRateTotal get 09
         sensors_parameterOnOffCycles get 09
         sensors_parameterRuntimeLogs get 09
         sensors_parameterRuntimePellets get 09
         sensors_parameterStoveTypeNumber get 09
         sensors_parameterVersionMainBoard get 09
         sensors_parameterVersionTFT get 09
         sensors_statusError get 09
         sensors_statusFrostStarted get 09
         sensors_statusMainState get 09
         sensors_statusService get 09
         sensors_statusSubState get 09
         sensors_statusWarning get 09
         stoveFeatures_airFlaps get 09
         stoveFeatures_insertionMotor get 09
         stoveFeatures_logRuntime get 09
         stoveFeatures_multiAir1 get 09
         stoveFeatures_multiAir2 get 09
         stoveID    get 09
         stoveType  get 09
       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
   get09Name  revision
   get09URL   https://www.rika-firenet.com/api/client/Deine_Ofen_ID/status
   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.*?({.*?})
   replacement01Mode expression
   replacement01Regex {{data}}
   room       Favoriten,Ofen,Favourites
   set11Name  frostProtectionTemperature
   set11Replacement01Value replaceJSON("frostProtectionTemperature", 2)
   set12Name  targetTemperature
   set12Replacement01Value replaceJSON("targetTemperature", 24)
   setData    {{data}}
   setURL     https://www.rika-firenet.com/api/client/Deine_Ofen_ID/controls
   sid01Data  email=xyz@xyz.com&password=strenggeheim
   sid01URL   https://www.rika-firenet.com/web/login
   stateFormat T: RaumTemp
   userattr   get09Name get09URL reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Name reading10Name reading10Regex replacement01Mode:reading,internal,text,expression,key replacement01Regex set11Name set11Replacement01Value set12Name set12Replacement01Value setData setURL sid01Data sid01URL
   verbose    0


und die 99_myUtils.pm


##############################################
# $Id: myUtilsTemplate.pm 7570 2015-01-14 18:31:44Z rudolfkoenig $
#
# Save this file as 99_myUtils.pm, and create your own functions in the new
# file. They are then available in every Perl expression.

package main;

use strict;
use warnings;
use POSIX;
use JSON;

sub
myUtils_Initialize($$)
{
  my ($hash) = @_;
}

# Enter you functions below _this_ line.

sub
replaceJSON ($$) {
   my ($valToReplace, $value) = @_;
   $value = InternalVal("Ofen", "value", $value);
   Log3 ("Ofen", 3, "replaceJSON Internalvalue: $value");
   fhem ("get Ofen revision");
   my $json = ReadingsVal("Ofen", "controlsJSON","");
   Log3 ("Ofen", 3, "replaceJSON configsJSON: $json");
   return if ($json eq "");
   my $decoded = decode_json($json);
   my $result;
   for my $key ( keys %$decoded ) {
      $result .= "$key=";
      if ($key eq $valToReplace) {
         $result .= $value."&";
      } else {
         $result .= $decoded->{$key}."&";
      }
   }
   chop($result);
   Log3("Ofen", 3, "replaceJSON Result: $result");
   return $result;
}
1;


Schönen Abend
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/

Helmi55

Guten Morgen
muss den Beitrag nochmals rausholen:
Mir ist in den letzten tagen aufgefallen dass das set "Ofen controls_operatingMode Manuell" nicht immer funktioniert

Habe im Log diesen Eintrag:
2017.10.14 19:56:06 3: replaceJSON Internalvalue: 2
2017.10.14 19:56:06 3: get Ofen revision : revision requested, watch readings
2017.10.14 19:56:06 3: replaceJSON configsJSON: {"revision":1507997495,"onOff":true,"operatingMode":0,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":16,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":8}
2017.10.14 19:56:06 3: replaceJSON Result: convectionFan2Level=0&setBackTemperature=16&onOff=true&operatingMode=2&heatingTimesActive=false&targetTemperature=24&frostProtectionActive=false&heatingTimesActiveForComfort=true&revision=1507997495&convectionFan2Active=false&convectionFan1Active=false&convectionFan1Area=0&heatingPower=80&frostProtectionTemperature=8&convectionFan2Area=0&convectionFan1Level=0
2017.10.14 19:56:06 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "OK") at (eval 61141) line 1.

2017.10.14 20:06:12 3: replaceJSON Internalvalue: 2
2017.10.14 20:06:12 3: get Ofen revision : revision requested, watch readings
2017.10.14 20:06:12 3: replaceJSON configsJSON: {"revision":1508003780,"onOff":true,"operatingMode":0,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":16,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":8}
2017.10.14 20:06:12 3: replaceJSON Result: convectionFan2Area=0&frostProtectionTemperature=8&heatingPower=80&convectionFan1Area=0&convectionFan1Active=false&convectionFan1Level=0&frostProtectionActive=false&targetTemperature=24&heatingTimesActive=false&convectionFan2Active=false&revision=1508003780&heatingTimesActiveForComfort=true&operatingMode=2&setBackTemperature=16&convectionFan2Level=0&onOff=true
2017.10.14 20:06:12 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "OK") at (eval 61211) line 1.

2017.10.14 20:07:40 3: replaceJSON Internalvalue: 2
2017.10.14 20:07:40 3: get Ofen revision : revision requested, watch readings
2017.10.14 20:07:40 3: replaceJSON configsJSON: {"revision":1508004401,"onOff":true,"operatingMode":0,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":16,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":8}
2017.10.14 20:07:40 3: replaceJSON Result: operatingMode=2&convectionFan2Level=0&setBackTemperature=16&onOff=true&convectionFan1Area=0&heatingPower=80&convectionFan1Active=false&frostProtectionTemperature=8&convectionFan2Area=0&convectionFan1Level=0&heatingTimesActive=false&targetTemperature=24&frostProtectionActive=false&heatingTimesActiveForComfort=true&revision=1508004401&convectionFan2Active=false
2017.10.14 20:07:41 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "OK") at (eval 61238) line 1.

2017.10.14 20:09:39 3: replaceJSON Internalvalue: 2
2017.10.14 20:09:39 3: get Ofen revision : revision requested, watch readings
2017.10.14 20:09:39 3: replaceJSON configsJSON: {"revision":1508004537,"onOff":true,"operatingMode":0,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":16,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":8}
2017.10.14 20:09:39 3: replaceJSON Result: heatingTimesActiveForComfort=true&revision=1508004537&convectionFan2Active=false&heatingTimesActive=false&targetTemperature=24&frostProtectionActive=false&convectionFan1Level=0&heatingPower=80&convectionFan1Area=0&convectionFan1Active=false&frostProtectionTemperature=8&convectionFan2Area=0&onOff=true&convectionFan2Level=0&setBackTemperature=16&operatingMode=2
2017.10.14 20:09:39 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "OK") at (eval 61264) line 1.


Kannst du mir bitte nochmals weiterhelfen - Danke
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

Zeig mal bitte den jetzigen Stand deines DOIFs (list). Ist der Befehl wirklich "set controls_operatingMode" ? controls_operatingMode ist ein Reading vom decodeAllJSON oder?
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 du mein Retter
das ist kein DOIF ich schalte im Moment noch mit dem Set Befehl im Device Overview

2017.10.15 21:10:12 3: replaceJSON configsJSON: {"revision":1508087946,"onOff":true,"operatingMode":0,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":16,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":8}
2017.10.15 21:10:12 3: replaceJSON Result: convectionFan2Level=0&convectionFan2Area=0&heatingTimesActiveForComfort=true&targetTemperature=24&frostProtectionTemperature=8&convectionFan1Active=false&heatingTimesActive=false&convectionFan2Active=false&operatingMode=2&convectionFan1Level=0&heatingPower=80&onOff=true&setBackTemperature=16&convectionFan1Area=0&revision=1508087946&frostProtectionActive=false
2017.10.15 21:10:12 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "OK") at (eval 5256) line 1.


Hier habe ich gestern den Ofen von Komfort wieder auf Manuel zurückgestellt
Das habe ich dann im Log

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

Sorry... mache zu viele Sachen gleichzeitig! lol

Ich meinte ein list von dem Ofen natürlich.
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

Kein Problem
hier bitte

Internals:
   BUSY       0
   DEF        https://www.rika-firenet.com/api/client/xxxxxxxx/status 60
   HTTPCookies connect.sid=s%3ACimsTjaR2vC1u-hS-7IgAyGVajcjDm4j.EegeIVLAXwyBv12kD9hUtH9Bfdlz6fJU%2BMClbIg1cWs
   Interval   60
   JSONEnabled 1
   LASTSEND   1508172518.18927
   LastAuthTry 2017-10-15 13:46:32
   MainURL    https://www.rika-firenet.com/api/client/xxxxxxxx/status
   ModuleVersion 3.4.0 - 9.9.2017
   NAME       Ofen
   NR         238
   ReplacementEnabled 1
   STATE      T: 21 Art: K BT:21
   TRIGGERTIME 1508172578.18542
   TRIGGERTIME_FMT 2017-10-16 18:49:38
   TYPE       HTTPMOD
   addr       https://www.rika-firenet.com:443
   buf
   code       200
   conn
   data
   displayurl https://www.rika-firenet.com/api/client/xxxxxxxx/status
   header     Cookie: connect.sid=s%3ACimsTjaR2vC1u-hS-7IgAyGVajcjDm4j.EegeIVLAXwyBv12kD9hUtH9Bfdlz6fJU%2BMClbIg1cWs
   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: 1189

Etag: W/"4a5-A9JkHOEn3UybedOXfWMb1w"

Vary: Accept-Encoding

Date: Mon, 16 Oct 2017 16:48:38 GMT

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

       Value      s%3ACimsTjaR2vC1u-hS-7IgAyGVajcjDm4j.EegeIVLAXwyBv12kD9hUtH9Bfdlz6fJU%2BMClbIg1cWs
   QUEUE:
   READINGS:
     2017-10-16 18:48:38   Absenkung       16
     2017-10-16 18:48:38   Betriebsart     K
     2017-10-16 18:48:38   BrennTemp       21
     2017-10-16 18:48:38   Frostschutz     8
     2017-10-16 18:48:38   Pellets         229
     2017-10-16 18:48:38   RaumTemp        21
     2017-10-16 18:48:38   SollTemp        24
     2017-10-16 18:48:38   controlsJSON    {"revision":1508094612,"onOff":true,"operatingMode":2,"heatingPower":80,"targetTemperature":24,"heatingTimesActive":false,"heatingTimesActiveForComfort":true,"setBackTemperature":16,"convectionFan1Active":false,"convectionFan1Level":0,"convectionFan1Area":0,"convectionFan2Active":false,"convectionFan2Level":0,"convectionFan2Area":0,"frostProtectionActive":false,"frostProtectionTemperature":8}
     2017-10-16 18:48:38   controls_convectionFan1Active false
     2017-10-16 18:48:38   controls_convectionFan1Area 0
     2017-10-16 18:48:38   controls_convectionFan1Level 0
     2017-10-16 18:48:38   controls_convectionFan2Active false
     2017-10-16 18:48:38   controls_convectionFan2Area 0
     2017-10-16 18:48:38   controls_convectionFan2Level 0
     2017-10-16 18:48:38   controls_frostProtectionActive false
     2017-10-16 18:48:38   controls_frostProtectionTemperature 8
     2017-10-16 18:48:38   controls_heatingPower 80
     2017-10-16 18:48:38   controls_heatingTimesActive false
     2017-10-16 18:48:38   controls_heatingTimesActiveForComfort true
     2017-10-16 18:48:38   controls_onOff  true
     2017-10-16 18:48:38   controls_operatingMode 2
     2017-10-16 18:48:38   controls_revision 1508094612
     2017-10-16 18:48:38   controls_setBackTemperature 16
     2017-10-16 18:48:38   controls_targetTemperature 24
     2017-10-16 18:48:38   lastConfirmedRevision 1508094612
     2017-10-16 18:48:38   lastSeenMinutes 0
     2017-10-16 18:48:38   name            Vorzimmer
     2017-10-16 18:48:38   sensors_inputExternalRequest true
     2017-10-16 18:48:38   sensors_inputFlameTemperature 21
     2017-10-16 18:48:38   sensors_inputRoomTemperature 21
     2017-10-16 18:48:38   sensors_outputAirFlaps 0
     2017-10-16 18:48:38   sensors_outputDischargeMotor 0
     2017-10-16 18:48:38   sensors_outputIDFan 0
     2017-10-16 18:48:38   sensors_outputIgnition false
     2017-10-16 18:48:38   sensors_outputInsertionMotor 0
     2017-10-16 18:48:38   sensors_parameterFeedRateService 700
     2017-10-16 18:48:38   sensors_parameterFeedRateTotal 229
     2017-10-16 18:48:38   sensors_parameterOnOffCycles 5
     2017-10-16 18:48:38   sensors_parameterRuntimeLogs 0
     2017-10-16 18:48:38   sensors_parameterRuntimePellets 156
     2017-10-16 18:48:38   sensors_parameterStoveTypeNumber 13
     2017-10-16 18:48:38   sensors_parameterVersionMainBoard 223
     2017-10-16 18:48:38   sensors_parameterVersionTFT 223
     2017-10-16 18:48:38   sensors_statusError 0
     2017-10-16 18:48:38   sensors_statusFrostStarted false
     2017-10-16 18:48:38   sensors_statusMainState 1
     2017-10-16 18:48:38   sensors_statusService 0
     2017-10-16 18:48:38   sensors_statusSubState 3
     2017-10-16 18:48:38   sensors_statusWarning 0
     2017-10-16 18:48:38   stoveFeatures_airFlaps false
     2017-10-16 18:48:38   stoveFeatures_insertionMotor false
     2017-10-16 18:48:38   stoveFeatures_logRuntime false
     2017-10-16 18:48:38   stoveFeatures_multiAir1 true
     2017-10-16 18:48:38   stoveFeatures_multiAir2 true
     2017-10-16 18:48:38   stoveID         xxxxxxxx
     2017-10-16 18:48:38   stoveType       DOMO MultiAir
   REQUEST:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       update
     url        https://www.rika-firenet.com/api/client/xxxxxxxx/status
     value      0
   defptr:
     readingBase:
       Absenkung  reading
       Betriebsart reading
       BrennTemp  reading
       Frostschutz reading
       Pellets    reading
       RaumTemp   reading
       SollTemp   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
       Betriebsart 05
       BrennTemp  06
       Frostschutz 03
       Pellets    07
       RaumTemp   01
       SollTemp   04
       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:
       get09:
         Absenkung  reading 02
         Betriebsart reading 05
         BrennTemp  reading 06
         Frostschutz reading 03
         Pellets    reading 07
         RaumTemp   reading 01
         SollTemp   reading 04
         controlsJSON reading 10
         controls_convectionFan1Active get 09
         controls_convectionFan1Area get 09
         controls_convectionFan1Level get 09
         controls_convectionFan2Active get 09
         controls_convectionFan2Area get 09
         controls_convectionFan2Level get 09
         controls_frostProtectionActive get 09
         controls_frostProtectionTemperature get 09
         controls_heatingPower get 09
         controls_heatingTimesActive get 09
         controls_heatingTimesActiveForComfort get 09
         controls_onOff get 09
         controls_operatingMode get 09
         controls_revision get 09
         controls_setBackTemperature get 09
         controls_targetTemperature get 09
         lastConfirmedRevision get 09
         lastSeenMinutes get 09
         name       get 09
         sensors_inputExternalRequest get 09
         sensors_inputFlameTemperature get 09
         sensors_inputRoomTemperature get 09
         sensors_outputAirFlaps get 09
         sensors_outputDischargeMotor get 09
         sensors_outputIDFan get 09
         sensors_outputIgnition get 09
         sensors_outputInsertionMotor get 09
         sensors_parameterFeedRateService get 09
         sensors_parameterFeedRateTotal get 09
         sensors_parameterOnOffCycles get 09
         sensors_parameterRuntimeLogs get 09
         sensors_parameterRuntimePellets get 09
         sensors_parameterStoveTypeNumber get 09
         sensors_parameterVersionMainBoard get 09
         sensors_parameterVersionTFT get 09
         sensors_statusError get 09
         sensors_statusFrostStarted get 09
         sensors_statusMainState get 09
         sensors_statusService get 09
         sensors_statusSubState get 09
         sensors_statusWarning get 09
         stoveFeatures_airFlaps get 09
         stoveFeatures_insertionMotor get 09
         stoveFeatures_logRuntime get 09
         stoveFeatures_multiAir1 get 09
         stoveFeatures_multiAir2 get 09
         stoveID    get 09
         stoveType  get 09
       update:
         Absenkung  reading 02
         Betriebsart reading 05
         BrennTemp  reading 06
         Frostschutz reading 03
         Pellets    reading 07
         RaumTemp   reading 01
         SollTemp   reading 04
         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
   get09Name  revision
   get09URL   https://www.rika-firenet.com/api/client/xxxxxxxx/status
   group      Temperatur
   reAuthRegex id="login"|Unauthorized
   reading01JSON sensors_inputRoomTemperature
   reading01Name RaumTemp
   reading02JSON controls_setBackTemperature
   reading02Name Absenkung
   reading03JSON controls_frostProtectionTemperature
   reading03Name Frostschutz
   reading04JSON controls_targetTemperature
   reading04Name SollTemp
   reading05JSON controls_operatingMode
   reading05Name Betriebsart
   reading05OMap 0:M, 1:A, 2:K
   reading06JSON sensors_inputFlameTemperature
   reading06Name BrennTemp
   reading07JSON sensors_parameterFeedRateTotal
   reading07Name Pellets
   reading10Name controlsJSON
   reading10Regex (?s)controls.*?({.*?})
   replacement01Mode expression
   replacement01Regex {{data}}
   room       Favoriten,Vorzimmer
   set11Name  frostProtectionTemperature
   set11Replacement01Value replaceJSON("frostProtectionTemperature", 2)
   set12Name  targetTemperature
   set12Replacement01Value replaceJSON("targetTemperature", 24)
   set13IMap  0:Manuell, 1:Auto, 2:Komfort
   set13Name  controls_operatingMode
   set13Replacement01Value replaceJSON("operatingMode", 2)
   setData    {{data}}
   setURL     https://www.rika-firenet.com/api/client/xxxxxxxx/controls
   sid01Data  email=xxx@yyy.at&password=strenggeheim
   sid01URL   https://www.rika-firenet.com/web/login
   stateFormat T: RaumTemp Art: Betriebsart BT:BrennTemp
   userattr   get05IMap get05Map get05OMap get09Name get09URL reading01JSON reading01Name reading02JSON reading02Name reading03JSON reading03Name reading04JSON reading04Name reading05JSON reading05Name reading05OMap reading06JSON reading06Name reading07JSON reading07Name reading10Name reading10Regex replacement01Mode:reading,internal,text,expression,key replacement01Regex set05Hint set05IMap set05OMap set11Name set11Replacement01Value set12Name set12Replacement01Value set13IMap set13Name set13Replacement01Value setData setURL sid01Data sid01URL




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

Also... ich kann keinen Fehler erkennen.

Das
Zitat2017.10.15 21:10:12 3: Ofen: error while parsing JSON data: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "OK") at (eval 5256) line 1.
hatten wir schon. Das ist kein echter Fehler, nur die Antwort nach dem "set", das er nicht als JSON parsen kann. Die Antwort ist aber doch "OK"

Und die Funktion macht doch was sie soll:
Zitat2017.10.14 19:56:06 3: replaceJSON Result: convectionFan2Level=0&setBackTemperature=16&onOff=true&operatingMode=2&heatingTimesActive=false&targetTemperature=24&frostProtectionActive=false&heatingTimesActiveForComfort=true&revision=1507997495&convectionFan2Active=false&convectionFan1Active=false&convectionFan1Area=0&heatingPower=80&frostProtectionTemperature=8&convectionFan2Area=0&convectionFan1Level=0

Es wäre zu prüfen, ob die Werte für operatingMode stimmen (ist "2" richtig?). Wenn Du es manuell setzt, was kommt zurück bei der nächste Abfrage von den Readings?
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 und guten Abend
es kommt manchmal vor dass er (der Ofen - Firenet)  den Befehl von FHEM nicht ausführt. Muss manchmal ein 2x senden.
Aber ja, da ist das I-net im Spiel ich dachte, die Fehlermeldung hat damit etwas zu tun.
Die "2" stimmt. Nochmals Danke für deine Mühe und einen schönen Abend
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/

Henno

Hallo zusammen,

ist es nicht möglich hiermit
"set Ofen on"
"set Ofen xx%"
abzusetzen?