5.02021-11-21T21:54:51ZSolarFronius SolarFronius Solar## Description
Uses Fronius API V1 to query inverter Make sure you update the following macros after linking the template DEVICE_ID: the device you want to monitor (defaults to 1 if you only have 1 inverter). Make sure your host has a hsotname of ip address configured. This must be the address of the Fronius device to monitor
## Overview
Introduction
============
This [Zabbix](https://www.zabbix.com/) template allows monitoring of Fronius devices such as inverters, dataloggers and smart loads through the [Fronius Solar API V1](https://www.fronius.com/en/photovoltaics/products/all-products/system-monitoring/open-interfaces/fronius-solar-api-json-).
[](https://raw.githubusercontent.com/wilsonwaters/zabbix-fronius/master/doc/fronius-graph.png)
The template uses Zabbix dependent items to reduce the number of API calls made to the device. One API call is made and multiple dependent items use javascript pre-processing to parse the required field from the response.
<a id="user-content-requirements" class="anchor" style="box-sizing: border-box; background-color: initial; color: #0366d6; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;
===============================================================================================================================================================================================
SolarSolar- Energy Generated DayDEPENDENTfronius.day_energy01wWhTotal energy generated on current day by all inverters on the systemSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var dayEnergy = null;
if (apiResponse.Body.Data.DAY_ENERGY != undefined) {
dayEnergy = 0;
for (var entry in apiResponse.Body.Data.DAY_ENERGY.Values) {
dayEnergy += apiResponse.Body.Data.DAY_ENERGY.Values[entry];
}
}
return dayEnergy ;fronius.GetInverterRealtimeData
- Energy Consumed Meter TotalDEPENDENTfronius.EnergyReal_WAC_Sum_Consumed01wFLOATWhSmart meter energy consumptionSolarJSONPATH$.Body.Data.0.EnergyReal_WAC_Sum_Consumedfronius.GetMeterRealtimeData
- Energy Consumed Meter DayCALCULATEDfronius.energy_consumed_meter_day30s1wFLOATWhlast("fronius.EnergyReal_WAC_Sum_Consumed")-last("fronius.energy_consumed_meter_startofday")Energy consumption from the grid todaySolar
- Energy Consumed Meter start-of-dayCALCULATEDfronius.energy_consumed_meter_startofday0;h01wFLOATWhlast("fronius.EnergyReal_WAC_Sum_Consumed")Energy consumption from the grid at the start of todaySolar
- Device Error CodeDEPENDENTfronius.ErrorCode01werror code for inverter {$DEVICE_ID}SolarJSONPATH$.Body.Data.DeviceStatus.ErrorCodefronius.GetInverterRealtimeData_CommonInverterDataAPI
- Frequency meterDEPENDENTfronius.Frequency_Phase_Average01wFLOATHzSmart meter Frequency Phase AverageSolarJSONPATH$.Body.Data.0.Frequency_Phase_Averagefronius.GetMeterRealtimeData
- InverterRealtimeDataAPIHTTP_AGENTfronius.GetInverterRealtimeData30s00TEXTGetInverterRealtimeData API call. Use dependent items to parse thisSolar30shttp://{HOST.CONN}/solar_api/v1/GetInverterRealtimeData.cgiScopeSystem
- InverterRealtimeData_3PInverterDataAPIHTTP_AGENTfronius.GetInverterRealtimeData_3PInverterDataAPI30s00TEXTGetInverterRealtimeData API call. Use dependent items to parse thisSolar30shttp://{HOST.CONN}/solar_api/v1/GetInverterRealtimeData.cgiDataCollection3PInverterDataScopeDeviceDeviceId{$DEVICE_ID}
- InverterRealtimeData_CommonInverterDataAPIHTTP_AGENTfronius.GetInverterRealtimeData_CommonInverterDataAPI30s00TEXTGetInverterRealtimeData API call. Use dependent items to parse thisSolar30shttp://{HOST.CONN}/solar_api/v1/GetInverterRealtimeData.cgiDataCollectionCommonInverterDataScopeDeviceDeviceId{$DEVICE_ID}
- MeterRealtimeDataAPIHTTP_AGENTfronius.GetMeterRealtimeData30s00TEXTGetMeterRealtimeData API call. Use dependent items to parse this.
These items only work if your system has a smart meter installedSolar30shttp://{HOST.CONN}/solar_api/v1/GetMeterRealtimeData.cgiScopeSystem
- OhmPilotRealtimeDataAPIHTTP_AGENTfronius.GetOhmPilotRealtimeData30s00TEXTGetOhmPilotRealtimeData API call. Use dependent items to parse this. Assumes you only have a single OhmPilot at device 0Solar30shttp://{HOST.CONN}/solar_api/v1/GetOhmPilotRealtimeData.cgiScopeDeviceDeviceId0
- PowerFlowRealtimeDataAPIHTTP_AGENTfronius.GetPowerFlowRealtimeData30s00TEXTGetPowerFlowRealtimeData API call. Use dependent items to parse thisSolar30shttp://{HOST.CONN}/solar_api/v1/GetPowerFlowRealtimeData.fcgi
- DC CurrentDEPENDENTfronius.idc01wFLOATADC current for inverter {$DEVICE_ID}SolarJSONPATH$.Body.Data.IDC.Valuefronius.GetInverterRealtimeData_CommonInverterDataAPI
- Ohmpilot Error CodeDEPENDENTfronius.ohmpilot.CodeOfError01wError status of OhmPilot at device 0SolarJSONPATH$.Body.Data.CodeOfErrorfronius.GetOhmPilotRealtimeData
- Ohmpilot Status CodeDEPENDENTfronius.ohmpilot.CodeOfState01wstatus code of OhmPilot at device 0SolarJSONPATH$.Body.Data.CodeOfStatefronius.GetOhmPilotRealtimeData
- Ohmpilot Total Energy ConsumedDEPENDENTfronius.ohmpilot.EnergyReal_WAC_Sum_Consumed01wWhtotal energy consumed by OhmPilot at device 0SolarJSONPATH$.Body.Data.EnergyReal_WAC_Sum_Consumedfronius.GetOhmPilotRealtimeData
- Ohmpilot Power ConsumedDEPENDENTfronius.ohmpilot.PowerReal_PAC_Sum01wCurrent power used by OhmPilot at device 0SolarJSONPATH$.Body.Data.PowerReal_PAC_Sumfronius.GetOhmPilotRealtimeData
- Ohmpilot Sensor TemperatureDEPENDENTfronius.ohmpilot.Temperature_Channel_101wFLOATTemperature of sensor plugged into OhmPilot at device 0SolarJSONPATH$.Body.Data.Temperature_Channel_1fronius.GetOhmPilotRealtimeData
- Power GeneratedDEPENDENTfronius.pac01wWTotal AC power being generated by all inverters on systemSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var pac = null;
if (apiResponse.Body.Data.PAC != undefined) {
pac = 0;
for (var entry in apiResponse.Body.Data.PAC.Values) {
pac += apiResponse.Body.Data.PAC.Values[entry];
}
}
return pac;fronius.GetInverterRealtimeData
- Power Consumed meterDEPENDENTfronius.power_consumed_meter01wFLOATWSmart meter power consumptionSolarJSONPATH$.Body.Data.0.PowerReal_P_Sumfronius.GetMeterRealtimeData
- Power Consumed Phase 1DEPENDENTfronius.power_consumed_p1_meter01wFLOATWSmart meter power consumptionSolarJSONPATH$.Body.Data.0.PowerReal_P_Phase_1fronius.GetMeterRealtimeData
- Power Consumed Phase 2DEPENDENTfronius.power_consumed_p2_meter01wFLOATWSmart meter power consumptionSolarJSONPATH$.Body.Data.0.PowerReal_P_Phase_2fronius.GetMeterRealtimeData
- Power Consumed Phase 3DEPENDENTfronius.power_consumed_p3_meter01wFLOATWSmart meter power consumptionSolarJSONPATH$.Body.Data.0.PowerReal_P_Phase_3fronius.GetMeterRealtimeData
- Power Consumed excluding SmartloadsDEPENDENTfronius.power_no_ohmpilot01wFLOATWSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
// powerConsumption is provided as a negative value, whereas ohmPlot consumption is provided as positive.
var powerConsumption = apiResponse.Body.Data.Site.P_Load;
var ohmPilotConsumption = 0;
if (apiResponse.Body.Data.Smartloads != undefined) {
if (apiResponse.Body.Data.Smartloads.Ohmpilots != undefined) {
for (var ohmpilotId in apiResponse.Body.Data.Smartloads.Ohmpilots) {
ohmPilotConsumption += apiResponse.Body.Data.Smartloads.Ohmpilots[ohmpilotId].P_AC_Total;
}
}
}
var consumption = (-powerConsumption) - ohmPilotConsumption;
// consumption can be negative sometimes which is silly in this situation. I think this happens
// because the P_Load and P_AC_Total from Fronius aren't measured at exactly the same time (even though it's in the same API call)
// Simply clamp the value to 0w
return Math.max(0, consumption);fronius.GetPowerFlowRealtimeData
- Power GridDEPENDENTfronius.P_Grid01wFLOATWSolarJSONPATH$.Body.Data.Site.P_Gridfronius.GetPowerFlowRealtimeData
- Power ConsumedDEPENDENTfronius.P_Load01wFLOATWSolarJSONPATH$.Body.Data.Site.P_LoadMULTIPLIER-1fronius.GetPowerFlowRealtimeData
- Device Status CodeDEPENDENTfronius.StatusCode01wstatus code for inverter {$DEVICE_ID}SolarJSONPATH$.Body.Data.DeviceStatus.StatusCodefronius.GetInverterRealtimeData_CommonInverterDataAPI
- Energy Generated TotalDEPENDENTfronius.total_energy01wWhTotal energy generated on current day by all inverters on the systemSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var totalEnergy = null;
if (apiResponse.Body.Data.DAY_ENERGY != undefined) {
totalEnergy = 0;
for (var entry in apiResponse.Body.Data.TOTAL_ENERGY.Values) {
totalEnergy += apiResponse.Body.Data.TOTAL_ENERGY.Values[entry];
}
}
return totalEnergy;fronius.GetInverterRealtimeData
- DC VoltageDEPENDENTfronius.udc01wFLOATVDC Voltage for inverter {$DEVICE_ID}SolarJSONPATH$.Body.Data.UDC.Valuefronius.GetInverterRealtimeData_CommonInverterDataAPI
- Voltage Phase 1 inverterDEPENDENTfronius.vac_p101wFLOATVVoltage measured by inverter is only available when inverter is active (i.e. doesn't work at night time).
Use the equivalent meter readings if you have oneSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var entry = "UAC_L1";
// default to null value, which is discarded
var voltage = null;
if (apiResponse.Body.Data[entry]!= undefined) {
voltage = apiResponse.Body.Data[entry].Value;
}
return voltage;fronius.GetInverterRealtimeData_3PInverterDataAPI
- Voltage Phase 2 inverterDEPENDENTfronius.vac_p201wFLOATVVoltage measured by inverter is only available when inverter is active (i.e. doesn't work at night time).
Use the equivalent meter readings if you have oneSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var entry = "UAC_L2";
// default to null value, which is discarded
var voltage = null;
if (apiResponse.Body.Data[entry]!= undefined) {
voltage = apiResponse.Body.Data[entry].Value;
}
return voltage;fronius.GetInverterRealtimeData_3PInverterDataAPI
- Voltage Phase 3 inverterDEPENDENTfronius.vac_p301wFLOATVVoltage measured by inverter is only available when inverter is active (i.e. doesn't work at night time).
Use the equivalent meter readings if you have oneSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var entry = "UAC_L3";
// default to null value, which is discarded
var voltage = null;
if (apiResponse.Body.Data[entry]!= undefined) {
voltage = apiResponse.Body.Data[entry].Value;
}
return voltage;fronius.GetInverterRealtimeData_3PInverterDataAPI
- Power Generated Phase 1 inverterDEPENDENTfronius.va_generated_p1_inverter01wFLOATVVoltage and current measurements supplied by inverter are only available when inverter is active (i.e. doesn't work at night time).
Use the equivalent meter readings if you have oneSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var phase = "1";
var voltageEntry = "UAC_L"+phase;
var currentEntry = "IAC_L"+phase;
// default to null value, which is discarded
var va = null;
if (apiResponse.Body.Data[voltageEntry]!= undefined && apiResponse.Body.Data[currentEntry]!= undefined) {
va = apiResponse.Body.Data[voltageEntry ].Value * apiResponse.Body.Data[currentEntry].Value;
}
return va;fronius.GetInverterRealtimeData_3PInverterDataAPI
- Power Generated Phase 2 inverterDEPENDENTfronius.va_generated_p2_inverter01wFLOATVVoltage and current measurements supplied by inverter are only available when inverter is active (i.e. doesn't work at night time).
Use the equivalent meter readings if you have oneSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var phase = "2";
var voltageEntry = "UAC_L"+phase;
var currentEntry = "IAC_L"+phase;
// default to null value, which is discarded
var va = null;
if (apiResponse.Body.Data[voltageEntry]!= undefined && apiResponse.Body.Data[currentEntry]!= undefined) {
va = apiResponse.Body.Data[voltageEntry ].Value * apiResponse.Body.Data[currentEntry].Value;
}
return va;fronius.GetInverterRealtimeData_3PInverterDataAPI
- Power Generated Phase 3 inverterDEPENDENTfronius.va_generated_p3_inverter01wFLOATVVoltage and current measurements supplied by inverter are only available when inverter is active (i.e. doesn't work at night time).
Use the equivalent meter readings if you have oneSolarJAVASCRIPTvar apiResponse = JSON.parse(value);
var phase = "3";
var voltageEntry = "UAC_L"+phase;
var currentEntry = "IAC_L"+phase;
// default to null value, which is discarded
var va = null;
if (apiResponse.Body.Data[voltageEntry]!= undefined && apiResponse.Body.Data[currentEntry]!= undefined) {
va = apiResponse.Body.Data[voltageEntry ].Value * apiResponse.Body.Data[currentEntry].Value;
}
return va;fronius.GetInverterRealtimeData_3PInverterDataAPI
- Voltage Phase 1 meterDEPENDENTfronius.Voltage_AC_Phase_1_meter01wFLOATVSmart meter voltage measurementSolarJSONPATH$.Body.Data.0.Voltage_AC_Phase_1fronius.GetMeterRealtimeData
- Voltage Phase 2 meterDEPENDENTfronius.Voltage_AC_Phase_2_meter01wFLOATVSmart meter voltage measurementSolarJSONPATH$.Body.Data.0.Voltage_AC_Phase_2fronius.GetMeterRealtimeData
- Voltage Phase 3 meterDEPENDENTfronius.Voltage_AC_Phase_3_meter01wFLOATVSmart meter voltage measurementSolarJSONPATH$.Body.Data.0.Voltage_AC_Phase_3fronius.GetMeterRealtimeData
{$DEVICE_ID}1SolarFILLED_REGIONC8E6C9RIGHT- Fronius Solarfronius.day_energy
1FILLED_REGIONFFCDD2RIGHT- Fronius Solarfronius.energy_consumed_meter_day
2EF9A9A- Fronius Solarfronius.P_Load
31A7C11- Fronius Solarfronius.pac
4FF4000- Fronius Solarfronius.power_no_ohmpilot