Fronius Integration into Energy dashboard

@farmio First of all, thanks for providing the New Fronius Integration. My Fronius is a Gen24 with Firmware 1.14.1. In the Documentation you mention that we should use a Riemann Sum for adding a Battery to the Energy-Dashboard. Do you have an example? I canā€™t get my head around for Integrating my Battery.

Thanks
Lukas

have a look some posts above: Fronius Integration into Energy dashboard - #13 by almtaler

This looks quite promising, apart from the entity names - which are used twice for grid and battery (grid_import_power and grid_export_power) - but you should only need the battery ones anyway. So I guess (copied untested as I donā€™t have a battery myself):

sensor:
  - platform: template
    sensors:
      battery_discharge_power:
        device_class: power
        friendly_name: "Batterie entladen"
        unit_of_measurement: "W"
        value_template: "{{ max(0, states('sensor.power_battery_fronius_power_flow_0_http_192_168_99_1') | float) }}"

      battery_charge_power:
        device_class: power
        friendly_name: "Batterie laden"
        unit_of_measurement: "W"
        value_template: "{{ max(0, 0 - states('sensor.power_battery_fronius_power_flow_0_http_192_168_99_1') | float) }}"
        
  - platform: integration
    source: sensor.battery_charge_power
    name: Batterie geladen
    unit_prefix: k
    round: 2

  - platform: integration
    source: sensor.battery_discharge_power
    name: Batterie entladen
    unit_prefix: k
    round: 2

Just try it and let me know if it works :man_shrugging:

1 Like

Looks promising.
Iā€™ll let it run for a few days and check the values and will come back with a result.

1 Like

Just a quick respond: Energy to Battery looks rock solid and the values are nearly the same as reported by the Fronius Smartmeter.

Energy from Battery Look like the values are to high. Since there is not much Sun in Austria at the Moment, my Battery does not charge really much. Iā€™ll have a closer Look over the next few days/weeks an keep you informed.

1 Like

Today was a little bit more Sun here. If more Energy get pulled out from the Battery (or the last 5% a pulled out to a lower State of Charge) it looks very good. Today there is only a difference from 0.05 kwh energy from the battery.

So it looks good.
Iā€™ll keep you updated

Did anyone switch from the Fronius platform to the Fronius integration?
I donā€™t know what happened in my system, but from the moment I started using the integration the solar production measure skyrocketed (wrong values and as if Wh are being interpreted as kWh).

Iā€™m using the energy_total_fronius_inverter_1 sensor. It used to work perfectly.

Any clue about what may be happening?

What are its states? Open your Home Assistant instance and show your state developer tools.
Do you have any customize:ed entities?

This is the state for the main sensor (the one Iā€™m using for the solar panels):

state_class: total_increasing
unit_of_measurement: Wh
device_class: energy
friendly_name: Energy total

Nonetheless, it seems that everything is working ok right now. I did not do anything, so I guess it was some kind of glitch.

The only drawback is that now both Energy total and Energy Year are way off what should be their real value. I wonder which records would I need to update on the DB to make it right.

Did you use the core Fronius integration, or the custom component before? The core integration did always report Wh afaik.

No idea how to change these things in db, but Iā€™ve seen some posts about such here (mostly removing single entries) - youā€™ll surely find that info somewhere in the forums.

I used the integration via YAML settings, but now Iā€™m using the integration on the GUI.

Hi all, I wonder if you can help. I added Fronius integration via the gui here Fronius - Home Assistant

Itā€™s all great, I got a Symo 10.0-3-M & SolarNet device. Iā€™m not sure why I need both. SolarNet has sensor.solarnet_power_photovoltaics which I believe is the important thing. Which seems identical to sensor.symo_10_0_3_m_1_power_ac.

I donā€™t care about tariffs etc.

I have solaranalytics so not the 3rd device you all have.

Seems the power_ac is electricity production, and I donā€™t actually have grid in/out figures. Is that right?

I can put SolarNet Energy day under Configure solar panels. ā† but is this right? I donā€™t fully understand it. I thought it would want solarnet_power_photovoltaics somewhere.

So I canā€™t use Grid consumption & Return to grid which isnā€™t provided?

So far it looks thus
image

Not sure where 1.5 is coming from.

Hi :wave:!

Id use ā€œEnergy totalā€ from the inverter device, HA will do the rest for you.
The energy panel always expects energy entities.
Have a look at the integration documentation, it is listed en detail what you should configure there.

The SolarNet device is used eg. to show values calculated from multiple devices (eg. 2 inverters or a Smartmeter). If you only have one inverter you can probably ignore it.

To have grid import and export you would need a meter (eg. Fronius Smartmeter) connected to your inverter.

HA starts to count when you set up the integration and updates hourly (I think). So this was probably your production since you set up the energy panel - until the last full hour.

Hi almtaler

I have pasted your code in my configuration.yaml and amended the IPs to match mine and also implemented the slight amendment by farmio.

When checking now the sensors, I can see they are created but the state is unknown. I believe that might also be the reason why they are not available to be selected under the energy dashboard.

It is the first time I am using anything else than the UI so I am really not familiar with yaml yet (but working on it).

I have a SymoGen24 with a BYD battery and Smart Meter (sitting right behind my official meter), so I assume I have the same config as you.

Is there anything you could think of what I could have done wrong? I can ping the inverter from the Pi.

Thanks in advance and have a nice evening.

Hi :wave:!
The Fronius integration isnā€™t configured via yaml anymore since almost a year. Configure it via UI.

Meanwhile the default entity_ids are different too so you might have to adapt that (they donā€™t include IP address anymore).

And Riemann sum integration is now also configurable via UI.

Also have a look at this guide: Howto: Fronius Integration with battery into Energy Dashboard

1 Like

Hi farmio,

thanks (again :innocent:) for pointing me in the right direction. Iā€™ve managed with the guide to get the data. But they are somehow not matching with what the fronius app is telling me.

HA is telling me a consumption of 9kWh. Fronius shows me about 1kWh live consumption and 16kWh total for today. The meter location is set to 0. I have tried and change it to 1 but that makes it even worse.



0 is correct.

ā€œLive consumptionā€ is load - power - thatā€™s kW, not kWh. That will not show in the energy dashboard.

There is no solar production in your energy dashboard. 16 - 9 = 7 so your import value seems right.

1 Like

Iā€™m having similar problemsā€¦ And HA just seems to be getting the energy production for hybrid systems wrong.
It looks OK for my inverter with no battery. But my inverter with battery reads low for the day. And also accumulates ā€˜productionā€™ during the night.

e.g.

Did you configure the energy dashboard data entities according to the documentation? Fronius - Home Assistant

Eventually, yesā€¦ Typical userā€¦ Never reads the whole manual before becoming confused.
It would be nice if the energy entries were created automaticallyā€¦ As Iā€™m not sure when it would never be necessaryā€¦

Hello,
i am a newbie and implementation of Fronius into HA is my first task here.
I was able to create simple cards displaying all the values, but the Energy Management is more powerful so i wanted to use this.
My problem is that none of the sensor datas is visible in the Energy dashboard configuration side.
I assume because all sensor ids from fonius like ā€œsensor.solarnet_pv_leistungā€ have ā€œdevice_class: powerā€ and ā€œstate_class: measurementā€ instead of ā€œdevice_class: energyā€ and ā€œstate_class: total/total_increasingā€
But changing is not working since they are getting overwritten with every polling.
So i wonder how you process so the data/Sensors can be used for the energy dashboardā€¦
My Fronius GEN 24 had been installed beginning of the year and i just updated the devices.
I feel my question is related, if i should create a new ā€œissueā€ please let me know.
Thanks