Hallo Leute,
ich habe seit dieser Woche eine Okeofen Pellematic Condes die ein Json ausgibt.
Leider bekomme ich im JsonMod-Modul immer eine "API_LAST_MSG invalid server response"
Kann da mal bitte einer der Experten drüber schauen ob der Fehler vor dem Bildschirm sitzt.Ich bin jetzt seit vier Tagen am erzweifeln.
Vielen Dank
List:
Internals:
API_LAST_MSG invalid server response
API_LAST_RES 1636641001.53682
CFGFN
DEF http://192.168.178.199:4321/<passwort>/all
FUUID 618d134e-f33f-bd9c-dc5c-dc60551fb6661485
NAME Oekofen
NEXT 2021-11-11 15:45:00
NR 624
SOURCE http://192.168.178.199:4321/<passwort>/all (401)
STATE ???
SVN 24783 2021-07-21 22:37:12 UTC
TYPE JsonMod
CONFIG:
IN_REQUEST 0
SOURCE http://192.168.178.199:4321/<passwort>/all
SECRET:
Attributes:
DbLogExclude .*
interval */15 * * * *
readingList complete()
room Heizung
verbose 5
Log (Im "echten Leben" steht bei <passwort> natürlich das richtige Passwort):
2021.11.11 15:29:28 5: HttpUtils url=http://192.168.178.199:4321/<passwort>/all NonBlocking via http
2021.11.11 15:29:28 4: IP: 192.168.178.199 -> 192.168.178.199
2021.11.11 15:29:28 5: HttpUtils request header:
GET /<passwort>/all HTTP/1.0
Host: 192.168.178.199:4321
User-Agent: fhem
Accept-Encoding: gzip,deflate
Accept: application/json
Accept-Charset: utf-8, iso-8859-1
2021.11.11 15:29:29 4: http://192.168.178.199:4321/<passwort>/all: HTTP response code 200
2021.11.11 15:29:29 5: HttpUtils http://192.168.178.199:4321/<passwort>/all: Got data, length: 3914
2021.11.11 15:29:29 5: HttpUtils response header:
HTTP/1.1 200 OK
Connection: close
Date: Thu, 11 Nov 2021 14:29:28 GMT
Content-length: 3914
2021.11.11 15:29:29 4: [Oekofen] api encoding is , designated encoder is utf-8-strict
Json (Achtung ist zeimlich lang):
{
"system":{
"L_ambient":30,
"L_errors":0,
"L_usb_stick":0,
"L_existing_boiler":0
},
"weather":{
"L_temp":90,
"L_clouds":98,
"L_forecast_temp":90,
"L_forecast_clouds":10,
"L_forecast_today":0,
"L_starttime":840,
"L_endtime":1440,
"L_source":"http://www.openweathermap.org",
"L_location":"Grünberg|DE|2914428",
"cloud_limit":55,
"hysteresys":-40,
"offtemp":-100,
"lead":120,
"refresh":0,
"oekomode":0
},
"forecast":{
"L_w_0":"Do, 11 Nov 16:24|9|98|7 km/h|04n|804|C|07:14|16:21",
"L_w_1":"Do, 11 Nov 19:00|6|92|6 km/h|04n|804|C",
"L_w_2":"Do, 11 Nov 22:00|5|46|6 km/h|03n|802|C",
"L_w_3":"Fr, 12 Nov 01:00|4|16|6 km/h|02n|801|C",
"L_w_4":"Fr, 12 Nov 04:00|4|46|6 km/h|03n|802|C",
"L_w_5":"Fr, 12 Nov 07:00|4|43|6 km/h|03n|802|C",
"L_w_6":"Fr, 12 Nov 10:00|8|14|9 km/h|02d|801|C",
"L_w_7":"Fr, 12 Nov 13:00|11|7|12 km/h|01d|800|C",
"L_w_8":"Fr, 12 Nov 16:00|8|1|9 km/h|01d|800|C",
"L_w_9":"Fr, 12 Nov 19:00|5|3|9 km/h|01n|800|C",
"L_w_10":"Fr, 12 Nov 22:00|5|1|10 km/h|01n|800|C",
"L_w_11":"Sa, 13 Nov 01:00|5|5|12 km/h|01n|800|C",
"L_w_12":"Sa, 13 Nov 04:00|5|97|11 km/h|04n|804|C",
"L_w_13":"Sa, 13 Nov 07:00|6|98|12 km/h|04n|804|C",
"L_w_14":"Sa, 13 Nov 10:00|8|100|12 km/h|04d|804|C",
"L_w_15":"Sa, 13 Nov 13:00|10|100|12 km/h|04d|804|C",
"L_w_16":"Sa, 13 Nov 16:00|8|100|11 km/h|04d|804|C",
"L_w_17":"Sa, 13 Nov 19:00|7|100|9 km/h|04n|804|C",
"L_w_18":"Sa, 13 Nov 22:00|8|100|8 km/h|04n|804|C",
"L_w_19":"So, 14 Nov 01:00|8|100|7 km/h|04n|804|C",
"L_w_20":"So, 14 Nov 04:00|8|100|4 km/h|04n|804|C",
"L_w_21":"So, 14 Nov 07:00|8|100|3 km/h|04n|804|C",
"L_w_22":"So, 14 Nov 10:00|9|97|5 km/h|04d|804|C",
"L_w_23":"So, 14 Nov 13:00|9|99|6 km/h|04d|804|C",
"L_w_24":"So, 14 Nov 16:00|9|62|7 km/h|04d|803|C"
},
"hk1":{
"L_roomtemp_act":0,
"L_roomtemp_set":240,
"L_flowtemp_act":582,
"L_flowtemp_set":582,
"L_comfort":0,
"L_state":32,
"L_statetext":"Heizbetrieb aktiv",
"L_pump":1,
"remote_override":0,
"mode_auto":1,
"time_prg":0,
"temp_setback":200,
"temp_heat":240,
"temp_vacation":150,
"name":"",
"oekomode":0,
"autocomfort":-1,
"autocomfort_sunset":0,
"autocomfort_sunrise":0
},
"pu1":{
"L_tpo_act":731,
"L_tpo_set":632,
"L_tpm_act":503,
"L_tpm_set":632,
"L_pump_release":731,
"L_pump":100,
"L_state":256,
"L_statetext":"Anforderung Ein",
"mintemp_off":80,
"mintemp_on":80,
"ext_mintemp_off":80,
"ext_mintemp_on":80
},
"ww1":{
"L_temp_set":500,
"L_ontemp_act":745,
"L_offtemp_act":731,
"L_pump":0,
"L_state":8208,
"L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus",
"time_prg":0,
"sensor_on":0,
"sensor_off":1,
"mode_auto":1,
"mode_dhw":1,
"heat_once":0,
"temp_min_set":300,
"temp_max_set":550,
"name":"",
"smartstart":0,
"use_boiler_heat":0,
"oekomode":0
},
"pe1":{
"L_temp_act":738,
"L_temp_set":750,
"L_ext_temp":-32768,
"L_frt_temp_act":5181,
"L_frt_temp_set":6037,
"L_frt_temp_end":6150,
"L_br":0,
"L_ak":0,
"L_not":1,
"L_stb":1,
"L_modulation":46,
"L_runtimeburner":900,
"L_resttimeburner":9000,
"L_currentairflow":55,
"L_lowpressure":993,
"L_lowpressure_set":999,
"L_fluegas":25,
"L_uw_speed":16,
"L_state":4,
"L_statetext":"Leistungsbrand",
"L_type":6,
"L_starts":58,
"L_runtime":85,
"L_avg_runtime":87,
"L_uw_release":731,
"L_uw":16,
"L_storage_fill":2949,
"L_storage_min":400,
"L_storage_max":6000,
"L_storage_popper":49,
"storage_fill_today":2,
"storage_fill_yesterday":0,
"mode":1
},
"error":{
}
}
Aus den Development-Tools vom Chrome konnte ich leider kein Copy and Paste machen, deswegen hier als Screenshot.
Ich hoffe es kann mir jemand helfen.
Vielen Dank
Gruß
Sascha
[EDIT]: Tippfehler korrigiert
Hat niemand eine zündende Idee was ich da tun könnte?
Ich kenne das json-modul nicht...aber das geht garantiert auch mit httpmod....
Mir fällt aber in deinem Screenshot was auf....
Grundsätzlich kann man Apis toll mit einem api-client testen: zum Beispiel: https://insomnia.rest/
Keine Ahnung ob dir das was nützt...
Danke, werde HTTPMOD mal testen.
servus
schau mal hier: https://wiki.fhem.de/wiki/HTTPMOD
Hier wird weiter unten beschrieben wie mein RIKA Pelletsofen gesteuert wird.
Sag die aber gleich, ich werde keine große Hilfe sein. Für mich ist das teils "spanisch"
und mir wurde Gott sei Dank hier im Forum geholfen
Gruß
Helmut
Mit HTTPMOD und reading01JSON und reading01Name, etc. hab ich´s hinbekommen.
Danke an Euch beide.
Gruß
Sascha
Moin Moin...
Es wäre schön wenn du hier noch schreibst, wie es dann funktioniert hat. Das ist für den nächsten der das sucht,dann eine Hilfe.
Grüße
Andreas
Oh, ich dachte https://forum.fhem.de/index.php/topic,124070.msg1187546.html#msg1187546 (https://forum.fhem.de/index.php/topic,124070.msg1187546.html#msg1187546) hier weiter oben reicht aus.
Hier nochmal im Detail wie ich´s mit HTTPMOD gemacht habe:
define Pelletronic HTTPMOD http://192.168.xxx.xx:4321/geheim/all
attr Pelletronic bodyDecode none
attr Pelletronic reading01JSON pu1_L_tpo_act
attr Pelletronic reading01Name PufferOben
attr Pelletronic reading01OExpr $val/10
attr Pelletronic reading02JSON pu1_L_tpm_act
attr Pelletronic reading02Name PufferMitte
attr Pelletronic reading02OExpr $val/10
attr Pelletronic reading03JSON pe1_L_temp_act
attr Pelletronic reading03Name Kesseltemperatur
attr Pelletronic reading03OExpr $val/10
Gruß
Sascha