Created
January 21, 2021 19:02
-
-
Save farmio/618ca3c1b3f335dd966b19a92acef832 to your computer and use it in GitHub Desktop.
Telegraf Input and Processor plugin configuration for Fronius Inverters using SolarAPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# PROCESSOR PLUGINS # | |
############################################################################### | |
[[processors.strings]] | |
## Replace all non-overlapping instances of old with new | |
## Trim the given prefix from the field | |
[[processors.strings.trim_prefix]] | |
field_key = "*" | |
prefix = "Body_Data_Site_" | |
[[processors.strings.trim_prefix]] | |
field_key = "*" | |
prefix = "Body_Data_0_" | |
############################################################################### | |
# INPUT PLUGINS # | |
############################################################################### | |
# Read formatted metrics from one or more HTTP endpoints | |
[[inputs.http]] | |
# measurement name | |
name_override = "smartmeter" | |
# override default http query interval | |
interval = "1m" | |
## One or more URLs from which to read formatted metrics | |
urls = [ | |
"http://${FRONIUS_IP}/solar_api/v1/GetMeterRealtimeData.cgi?Scope=System" | |
] | |
## Data format to consume. | |
# json parsing | |
data_format = "json" | |
json_time_key = "Body_Data_0_TimeStamp" | |
json_time_format = "unix" | |
# data filtering | |
# EnergyReal_WAC_Plus_Absolute ... Import | |
# EnergyReal_WAC_Minus_Absolute ... Export | |
# Power* individual phases; *_Sum only sum of all phases. | |
fieldpass = [ | |
"Body_Data_0_Energy*", | |
"Body_Data_0_Current_AC_*", | |
"Body_Data_0_Power*", | |
# "Body_Data_0_*_Sum" | |
] | |
[[inputs.http]] | |
# measurement name | |
name_override = "powerflow" | |
# override default http query interval | |
interval = "1m" | |
## One or more URLs from which to read formatted metrics | |
urls = [ | |
"http://${FRONIUS_IP}/solar_api/v1/GetPowerFlowRealtimeData.fcgi" | |
] | |
## Data format to consume. | |
# json parsing | |
data_format = "json" | |
json_time_key = "Head_Timestamp" | |
json_time_format = "2006-01-02T15:04:05Z07:00" | |
# data filtering | |
fieldpass = [ | |
"Body_Data_Site_P_*", | |
"Body_Data_Site_rel_*", | |
"Body_Data_Site_E_Total" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I haven't tested the envirnoment variable unpacking (${FRONIUS_IP}) yet. I've just hardcoded the IP.