Hi!
I need some help getting data from my Fronius inverter.
The Fronius json API seems to be working very well. However not all inverter data is available from “static” request commands. To get data regarding e.g. the individual MPPT string (current and voltage) I have to query the historical data source which means I have to add a time span to the request command.
More specifically the following command fetches the measuring value within the last 5 minutes:
http://INVERTER_IP/solar_api/v1/GetArchiveData.cgi?Scope=System&StartDate=2019-10-29T10:05:00+01:00&EndDate=2019-10-29T10:10:00+01:00&Channel=Current_DC_String_1&Channel=Current_DC_String_2&Channel=Voltage_DC_String_1&Channel=Voltage_DC_String_2
Notice the 5 minute span in the request. The datalogger in the inverter seems to be working with 5 minute resolution, at least regarding archive data.
I’m thinking that if I query the so called “ArchiveData” every 5 minutes and somehow time shift the value with 5 minutes I can store a lot more data then what is available from the static requests.
Is this strategy feasable and if so could someone please help me in the right direction in reagards of constructing a rule where the time span is defined as “now minus 5 minutes”. A CRON trigger could then initiate the request every 5 minutes
Output from the request:
{
"Body" :
{
"Data" :
{
"inverter/1" :
{
"Data" :
{
"Current_DC_String_1" :
{
"Unit" : "A",
"Values" :
{
"0" : 4.2800000000000002
},
"_comment" : "channelId=66050"
},
"Current_DC_String_2" :
{
"Unit" : "A",
"Values" :
{
"0" : 2.7600000000000002
},
"_comment" : "channelId=131586"
},
"Voltage_DC_String_1" :
{
"Unit" : "V",
"Values" :
{
"0" : 326.30000000000001
},
"_comment" : "channelId=66049"
},
"Voltage_DC_String_2" :
{
"Unit" : "V",
"Values" :
{
"0" : 647.20000000000005
},
"_comment" : "channelId=131585"
}
},
"DeviceType" : 123,
"End" : "2019-10-29T10:09:59+01:00",
"NodeType" : 97,
"Start" : "2019-10-29T10:05:00+01:00"
}
}
},
"Head" :
{
"RequestArguments" :
{
"Channel" :
[
"Current_DC_String_1",
"Current_DC_String_2",
"Voltage_DC_String_1",
"Voltage_DC_String_2"
],
"EndDate" : "2019-10-30T10:09:59+01:00",
"HumanReadable" : "True",
"Scope" : "System",
"SeriesType" : "Detail",
"StartDate" : "2019-10-29T10:05:00+01:00"
},
"Status" :
{
"Code" : 0,
"ErrorDetail" :
{
"Nodes" : []
},
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2019-11-04T08:56:06+01:00"
}
}
Thanks!
- Platform information:
- Hardware: Raspberry Pi 2 B
- OS: Openhabian v1.5-532, Raspbian GNU/Linux 9 (stretch)
- Java Runtime Environment: openjdk version “1.8.0_152”
- openHAB version: 2.4.0-1
- Peripheral equipment: Fronius Symo 8.2-3-M with power meter