Input.httpjson - Telegraf does not take any data from my heatingsystem

Hello guys. I hope you can help me because I am very close to get crazy.

I have got a new heating-system in my house. I can start a http requests
and get a json as response… Telegraf cant handle that json and i dont
know why.

The response i get is:

{
   "system":{
      "L_ambient":"74",
      "L_errors":"0",
      "L_usb_stick":"false"
   },
   "hk1":{
      "L_roomtemp_act":"0",
      "L_roomtemp_set":"220",
      "L_flowtemp_act":"492",
      "L_flowtemp_set":"482",
      "L_comfort":"0",
      "L_state":"32",
      "L_statetext":"Heizbetrieb aktiv",
      "L_pump":"true",
      "remote_override":"0",
      "mode_auto":"1",
      "time_prg":"0",
      "temp_setback":"180",
      "temp_heat":"220",
      "temp_vacation":"150",
      "name":"Heizkreis",
      "oekomode":"0",
      "autocomfort":"-1",
      "autocomfort_sunset":"0",
      "autocomfort_sunrise":"0"
   },
   "pu1":{
      "L_tpo_act":"542",
      "L_tpo_set":"532",
      "L_tpm_act":"528",
      "L_tpm_set":"532",
      "L_pump_release":"542",
      "L_pump":"23",
      "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":"551",
      "L_offtemp_act":"551",
      "L_pump":"false",
      "L_state":"8208",
      "L_statetext":"Zeit innerhalb Zeitprogramm|Anforderung Aus",
      "time_prg":"0",
      "sensor_on":"0",
      "sensor_off":"0",
      "mode_auto":"1",
      "mode_dhw":"1",
      "heat_once":"false",
      "temp_min_set":"300",
      "temp_max_set":"550",
      "name":"",
      "smartstart":"0",
      "use_boiler_heat":"0",
      "oekomode":"0"
   },
   "error":{
   }
}

How can I handle this… My config for that:

[[inputs.httpjson]]
   interval = "5m"
   name = "Oekofenanlage"
   #method = "GET"
   servers = [
     "http://192.168.0.123:1337/xxxx/all"
   ]

Can the “linebreaks” being a problem? The response is pure text, without a header.

I also tried things like filtering and so on.

many thanks in advance
Ivo

Tell us more about what “telegraf can’t handle that JSON” means.

What error messages do you get?

Antony.

When I just put in my config (see above) nothing happens. All other [[inputs.httpjson]]s (openweathermap) I use are working fine. So I think, it has something to do with the rawformat of the response.

grafik

But i have no clue, what is wrong in that file.

obviously there is something wrong

Hi there,

In the readme for httpjson it says:

NOTE This plugin only reads numerical measurements, strings and booleans will be ignored.

Whereas in your response it looks to be all string fields, so it’s ignoring the values. You’ll either need to set them as tag_keys or json_string_fields for example:

json_string_fields = [“system_L_ambient”]

There’s more info about json parsing here.

Let me know if that doesn’t solve the issue.

Thats it… My wanted integers are strings… ;( so wrote to the manufacture to make a firmware update with no leading " in front of the integers…

Now i try to find out how to convert my json in a “good” json, because i cant wait for the update.

using 2 Pellematic Smart since years, i do the monitoring using a python script. This loads the data to influx and monitoring is done by grafana.
https://nc-x.com/oekofen-spy
I’m happy to share the python sript.
Do have 2 versions, for your older JSON-format and another one for the newer JSON used since Touch V4x
Regards
Peter