Reading Fronius inverters (Symo 15.0-3-M) with modbus binding

I’m pretty sure this is not related to format=true. This is only to suppress formatting e.g. %2$ to the actual value of the item, and this parameter is only for outbound but not inbound traffic.

very strange… it worked… here is my pv config, only showing — for my values:

items:

Number PV_DaySumCalculated "Tagessumme [%.1f kWh]" <inverter>
Number PV_YearSumCalculated "Jahressumme [%.1f MWh]" <inverter>
Number PV_TotalCalculated "Gesamtsumme [%.1f MWh]" <inverter>
Number PV_Prozent "Auslastung [%.2f %%]" <inverter>
Number  PV_Current      "Aktuelle Leistung [%0f W]"     <inverter>      (PV)            { http="<[froniusrtd:5000:JSONPATH($.Body.Data.PAC.Values.1)]" }
Number  PV_DaySum       "Tagessumme [%0f Wh]"   <inverter>      (PV)            { http="<[froniusrtd:30000:JSONPATH($.Body.Data.DAY_ENERGY.Values.1)]" }
Number  PV_YearSum      "Jahressumme [%0f Wh]"  <inverter>      (PV)            { http="<[froniusrtd:30000:JSONPATH($.Body.Data.YEAR_ENERGY.Values.1)]" }
Number  PV_Total        "Gesamtsumme [%0f Wh]"  <inverter>      (PV)            { http="<[froniusrtd:30000:JSONPATH($.Body.Data.TOTAL_ENERGY.Values.1)]" }

config:

froniusrtd.url=http://192.168.1.180/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System
froniusrtd.updateInterval=5000

sitemap:

Frame label="Photovoltaik Daten" {
        Text item=PV_Current label="PV Leistung: [%.0f W]" icon="none"
		Text item=PV_Prozent label="PV Auslastung: [%.2f %%]" icon="none"
                Text item=PV_DaySumCalculated label="PV Leistung Tag: [%.2f kWh]" icon="none"
                Text item=PV_YearSumCalculated label="PV Leistung Jahr: [%.2f MWh]" icon="none"
		Text item=PV_TotalCalculated label="PV Leistung Total: [%.2f MWh]" icon="none"
        Group item=PV label="Verlaufsdaten" icon="solarplant"
	}

rules:

rule "pv-berechnung in kWh"
when
	Item PV_DaySum received update
then
	PV_DaySumCalculated.postUpdate((PV_DaySum.state as Number)/1000);
end

rule "pv-berechnung in MWh"
when
	Item PV_YearSum received update
then
	PV_YearSumCalculated.postUpdate((PV_YearSum.state as Number)/1000000);
end

rule "pv-berechnung total in MWh"
when
	Item PV_Total received update
then
	PV_TotalCalculated.postUpdate((PV_Total.state as Number)/1000000);
end

rule "auslastung"
when
	Item PV_Current received update
then
	PV_Prozent.postUpdate((PV_Current.state as Number)/8100*100);
end

@Klaus_Schuster
This is a great example for me - I would like to add data from my Fronius Symo Hybrid to openhab 2.
I have problems defining the push service parameters in the Fronius firmware.
I am using a Raspi with openhabian, ip is 192.168.1.9.
Can someone help me please to find out what the push service line looks like so I can use the above items and rules in openhab?

Many thanks in advance!

Hi Martin,

you don’t need to configure a push service for getting Fronius json data !
Just try in your browser if you receive any data with the following URL:
http://192.168.1.9/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System

Hallo Klaus

Thanks a lot, it is working in the browser and in openhab!

perfect! so can you tell me if you can find any values or also showing — in your sitemap?

As it would be great to get also data about level of battery and current power usage… like

I tried this in http.cfg
froniusrtd.url=http://192.168.1.39/solar_api/v1/GetPowerFlowRealtimeData.fcgi?Scope=System

and these in .items:
Number PV_Current “Aktuelle Leistung [%0f W]” { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Inverters.1.P)]" }
Number PV_DaySum “Tagessumme [%0f Wh]” { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Day)]" }
Number PV_YearSum “Jahressumme [%0f Wh]” { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Year)]" }
Number PV_Total “Gesamtsumme [%0f Wh]” { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Total)]" }
Number PV_Battery “Batterieladung [%d %]” (gPV) { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.SOC)]" }
Number PV_Battery “Batterieladung [%d Prozent]” (gPV) { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.SOC)]" }
Number PV_Grid “Leistung vom Netz [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Grid)]" }
Number PV_Akku “Leistung von Batterie [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Akku)]" }
Number PV_PV “Leistung vom Dach [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_PV)]" }

and was successful in displaying all battery data!!!

Thanks a lot for pointing me in the right direction!

can you tell me if you do not get any data for “Leistung vom Dach” or do you have parsing errors ? Should there stand 0 W instead of - W ?

solved my problem: HTTP Binding http.cfg error

It was just a snapshot at night - I see “Leistung vom Dach” as soon as the inverter receives power from the roof.

@Ren001

Bezug vom Netz can be read from the fronius Inverter or are you using additional modules Like fronius smart Meter?

Thanks!

I do have a Fronius smart meter – the inverter does not provide “P_Grid” and P_Load” values.

http://192.168.1.39//solar_api/v1/GetPowerFlowRealtimeData.fcgi?Scope=System http://192.168.1.39/solar_api/v1/GetPowerFlowRealtimeData.fcgi?Scope=System

“P_Grid” : 665.71998511999846,
“P_Load” : -665.71998511999846,

I have a question regarding a Fronius Symo installation.

From what I understand we need a Fronius Datamanager to acces it’s data.
What I can find about a Fronius Datamanager, says it sends data also to their own cloud.

Can I use the openhab binding to get the data and not send it to their cloud?

Yves

A way to do this is to place the Fronius in a seperate network (like a guest network) which has no access to the internet. An other way would be to block the outgoing traffic for the IP address of the fronius.
In both cases you still can access the data from a local openhab server - the data used in openhab comes from the local fronius inverter/smart meter.

As far as I see the inverter even offers a menu item for local access only:
Interfaces réseau
Mode de liaison

  • |Internet via WLAN||
  • ||Internet via LAN|
  • ||Réseau local via point d'accès|
1 Like

Hi. Im new to openhab. How do i install the fronius binding?

I did not install a fronius binding - instead I am using the http binding to fetch the data from the fronius.
In order to do this you need to install the http binding form the Paper UI, then place three lines in your /services/http.cfg file, where you specify the IP address and update intervall of your fronius, like:

froniusrtd.url=http://192.168.1.59/solar_api/v1/GetPowerFlowRealtimeData.fcgi?Scope=System
froniusrtd.updateInterval=5000
format=false

Then you put one line for each value to fetch in your home.items file (I am using a group gPV to display all collected fronius data):

// Fronius via HTTP

Number PV_Load “Aktueller Verbrauch [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Load)]" }
Number PV_Current “Aktuelle Produktion [%d W]” { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Inverters.1.P)]" }
Number PV_DaySum “Tagessumme [%0f Wh]” { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Day)]" }
Number PV_YearSum “Jahressumme [%0f Wh]” { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Year)]" }
Number PV_Total “Gesamtsumme [%0f Wh]” { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Total)]" }
Number PV_Grid “Bezug vom Netz [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Grid)]" }
Number PV_Akku “Leistung von Batterie [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Akku)]" }
Number PV_PV “Leistung vom Dach [%.1f W]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_PV)]" }
Number PV_Battery “Batterieladestand [%d Prozent]” (gPV) { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.SOC)]" }
Number PV_Self “Eigenverbrauch erzeugter Leistung [%.1f Prozent]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.rel_SelfConsumption)]" }
Number PV_Autonomy “Autonom zu [%.1f Prozent]” (gPV) { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.rel_Autonomy)]" }

Hope it works for you!

Hi,
that’s exactly, what I’m doing. HTTP Binding.
Joerg

would you share also your items?
would help to understand better some of the values in the json

Hi Shorty707,
there’s no difference in my items except other names.
I don’t know what I should add to all the other explanations in this thread.
the API is documented here

Here we go:

//   Fronius via HTTP

Number  PV_Load        "Aktueller Verbrauch [%.1f W]"       (gPV)    { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Load)]" }
Number  PV_Current      "Aktuelle Produktion [%d W]"              { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Inverters.1.P)]" }
Number  PV_DaySum       "Tagessumme [%0f Wh]"                    { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Day)]" }
Number  PV_YearSum      "Jahressumme [%0f Wh]"                    { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Year)]" }
Number  PV_Total        "Gesamtsumme [%0f Wh]"                    { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.E_Total)]" }
Number  PV_Grid        "Bezug vom Netz [%.1f W]"       (gPV)    { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Grid)]" }
Number  PV_Akku        "Leistung von Batterie [%.1f W]"       (gPV)    { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_Akku)]" }
Number  PV_PV        "Leistung vom Dach [%.1f W]"       (gPV)    { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.P_PV)]" }
Number PV_Prozent "Auslastung Panel [%.2f %%]"   (gPV)
Number  PV_Battery        "Batterieladestand [%d Prozent]"       (gPV)    { http="<[froniusrtd:30000:JSONPATH($.Body.Data.Inverters.1.SOC)]" }
Number  PV_Self        "Eigenverbrauch erzeugter Leistung [%.1f Prozent]"       (gPV)    { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.rel_SelfConsumption)]" }
Number PV_DaySumCalculated "Tagesproduktion [%.1f kWh]"   (gPV)
Number PV_YearSumCalculated "Jahresproduktion [%.1f MWh]"   (gPV)
Number PV_Autonomy       "Autonom zu [%.1f Prozent]"      (gPV)       { http="<[froniusrtd:5000:JSONPATH($.Body.Data.Site.rel_Autonomy)]" }
Number PV_TotalCalculated "Gesamtproduktion [%.1f MWh]"   (gPV)