Polling and parsing external (json) data using an API

I have multiple environment sensors feeding LibreNMS data. These are working just fine. In order to interpret the data better I’d like to compare our readings from within the building with the actual weather outside. Adding an other device to LibreNMS monitoring the weather outside is an option. But this would require me to buy such a device. (Suggestions are welcome, please no DIY options) An other option is to pull in the weather data from one of the many sites offering these data sets. Is a external polling solution already in place in LibreNMS? For example using an API key and a URL to obtain a JSON data set/object containing several variables with their corresponding values. E.g. temperature, humidity, etc. Then parse the selected variables and put their values into a graph.

2 Likes

Would you mind explaining a little bit how do you process the json value you get from external devices in librenms ?
I’m new to librenms and I would like it to generate a graph based on the parsing of some json value that can be retrieve from an http request. basically I’m trying to read temperature from remote tasmota devices and populate a graph in librenms out of it. the http command I have to send to the device is :
http://deviceURL/cm?cmnd=status%2010

And the returned value looks like :
{“StatusSNS”:{“Time”:“2022-05-27T20:44:37”,“DS18B20”:{“Id”:“0411E80264FF”,“Temperature”:24.9},“TempUnit”:“C”}}

Any idea or tutorial you could point me to ?

This is exactly what I am interested in doing. I want to read the JSON data from my Fronius inverter, then parse and graph it.

#json
#rest