using telegraf to pull metrics from Fronius Gen24
To collect metrics from a Fronius Gen24 inverter, there are a couple URLs that contain interesting data.
- http://10.42.23.26/solar_api/v1/GetMeterRealtimeData.cgi dump of voltage and power metrics from the smart meter
- http://10.42.23.26/solar_api/v1/GetStorageRealtimeData.cgi dump of metrics from the battery
- http://10.42.23.26/solar_api/v1/GetPowerFlowRealtimeData.fcgi show power flow to different directions
With telegraf it is possible to pull data from these URLs, but it needs to be converted from json to line protocol. This is done via the json_v2 data_format.
[[inputs.http]]
urls = ["http://10.42.23.26/solar_api/v1/GetPowerFlowRealtimeData.fcgi"]
data_format = "json_v2"
[[inputs.http.json_v2]]
measurement_name = "power_flow_realtime"
[[inputs.http.json_v2.object]]
path = "Body.Data.Inverters"
[[inputs.http.json_v2.object]]
path = "Body.Data.Site"
[[inputs.http]]
urls = ["http://10.42.23.26/solar_api/v1/GetStorageRealtimeData.cgi"]
data_format = "json_v2"
[[inputs.http.json_v2]]
measurement_name = "storage_realtime"
[[inputs.http.json_v2.object]]
path = "Body.Data.0.Controller"
[[inputs.http]]
urls = ["http://10.42.23.26/solar_api/v1/GetMeterRealtimeData.cgi"]
data_format = "json_v2"
[[inputs.http.json_v2]]
measurement_name = "meter_realtime"
[[inputs.http.json_v2.object]]
path = "Body.Data.0"
This results a ton of metrics. The most interesting I found for now are mostly in power_flow_realtime.