Fronius Solar Component

Did you solve this? scan_interval is your answer

@mecag What do you mean by that? Can i use scan_interval in this sensor. There is nothing in the docs about it.

Courious?

EDIT: Yes it ist possible. I just changed the scan_interval to 10 and it works…

Yes, scan_interval is mentioned in the docs.

scan_interval | no | string | 60 | The interval to query the Fronius Inverter for data.

Hi guys.
I have Fronius with connected 2 strings of solar panels.
How can I get data (DC voltage, DC current and DC power) from each string?
As I understand current component shows summary of this data?

The DC voltage and amps are not available separately for the two strings in the real-time API. The only way to obtain them separately is from the historical API every 5th minute.

Hi, I spent a few days to figure it out, but it is possible to get realtime DC string data out from the inverter by MODBUS TCP instead of using REST API or the integration.
config:

### Modified for new (2021.04) MODBUS config standard
modbus:
  - name: mb_fronius        ### or whatever name
    type: tcp
    host: fronius        ### ip/hostname your inverter has
    port: 502
    sensors:
### AC power scaled:
    - name: mb_fronius_pac_s
      slave: 1
      address: 40083
      count: 1
      data_type: uint
      scan_interval: 15
### AC power scale factor:
    - name: mb_fronius_pac_sf
      slave: 1
      address: 40084
      count: 1
      scan_interval: 10
### Generated energy total scaled:
    - name: mb_fronius_meter_total_s
      slave: 1
      address: 40093
      count: 2
      data_type: custom
      structure: ">L"
      scan_interval: 60
### Generated energy total scale factor:
    - name: mb_fronius_meter_total_sf
      slave: 1
      address: 40095
      count: 1
      scan_interval: 30
### DC string 1 power scaled:
    - name: mb_fronius_pdc1_s
      slave: 1
      address: 40274
      count: 1
      data_type: uint
      scan_interval: 15
### DC string 2 power scaled:
    - name: mb_fronius_pdc2_s
      slave: 1
      address: 40294
      count: 1
      data_type: uint
      scan_interval: 15
### DC string 1&2 power scale factor:
    - name: mb_fronius_pdc_sf
      slave: 1
      address: 40257
      count: 1
      scan_interval: 10


sensors:
  - platform: template 
    scan_interval: 15
    sensors:
### AC power result:
      solar_pac:
        unit_of_measurement: 'W'
        device_class: power
        value_template: >-
          {{ ((states('sensor.mb_fronius_pac_s') | int) * (10 ** ((states('sensor.mb_fronius_pac_sf')| int )) )) | int }}
### Generated energy result:
      solar_meter_total:
        unit_of_measurement: 'kWh'
        device_class: power
        icon_template: "{{ 'mdi:counter' }}"
        value_template: >-
          {{ (((states('sensor.mb_fronius_meter_total_s') | int) * (10 ** ((states('sensor.mb_fronius_meter_total_sf')| int )) ))  | float /1000 ) | round(1) }}
### DC 1 power result:
      solar_pdc1:
        unit_of_measurement: 'W'
        device_class: power
        value_template: >-
          {% if (states('sensor.mb_fronius_pdc1_s') | int ) == ( 65535 | int ) %}        ### for some reason my DC results are jumping between 0 and 65535 when offline, so this is discarded here
            {{ 0 | int }}
          {% else %}  
            {{ ((states('sensor.mb_fronius_pdc1_s') | int) * (10 ** ((states('sensor.mb_fronius_pdc_sf')| int )) )) | int }}
          {% endif %}
### DC 2 power result:
      solar_pdc2:
        unit_of_measurement: 'W'
        device_class: power
        value_template: >-
          {% if (states('sensor.mb_fronius_pdc2_s') | int ) == ( 65535 | int ) %}        ### Only DC1 did the value jump thing, but i have trust issues :)
            {{ 0 | int }}
          {% else %}  
            {{ ((states('sensor.mb_fronius_pdc2_s') | int) * (10 ** ((states('sensor.mb_fronius_pdc_sf')| int )) )) | int }}
          {% endif %}

Inverter is set up like this:
Képernyőkép 2021-01-25 181833

There are lots of more data parts you can get out of the inverter, this works for a SYMO 3 phase - seems it is very dependent on model/year/fw version.
Also you may need a good modbus monitor tool to check the values, my registers were in a -1 offset relative to the modbus documentation from Fronius…

5 Likes

Hey thanks mate, very interesting I will give this ago and report back.

Thanks so much for this code. I have three primo inverters so I am going to dig into this a bit and I’ll post my code back here if I get them all working together. I would love to be able to track all 6 of my strings separately.

Regarding to Modbus TCP - do You know the solution Sunspec?

For my Fronius it is not working yet (it shows a lot of data but the data are wrong; most probably some address offset issue) but I see a potential in that addon.

I am using the official Fronius integration for my inveter (soon Victron will be added into the play).
Is there a way to change the units? I do not want to see total, year or daily harvest in Wh but in kWh.

Use helper entities (templates) for this and hide the original entities. Or just use the energy panel - it converts to kWh by default.

I can’t find scan_interval in the documentation. Is it still possible to change the default interval?
Where do I need to add/change this?

It’s not a thing anymore. See New Fronius UI Integration with Multi Inverters - #2 by farmio

Could someone confirm if this Fronius “addon” is still working. Tested to install this and get:

2023-01-23 19:43:32.070 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration fronius_inverter which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-23 19:43:52.859 ERROR (MainThread) [homeassistant.components.sensor] The fronius platform for the sensor integration does not support platform setup. Please remove it from your config.

Okay, I can confirm this myself now, got it working.

It seems you added the fronius_inverter custom component, but tried to configure the fronius core integration - which doesn’t support yaml anymore.

Okay, Yes I have issues with the current setup as the data read is not always matching what it actually is.
Do you have any link to any updated components?

I only know the core integration. A link to this is here: https://www.home-assistant.io/integrations/fronius/
The custom component is querying mostly the same APIs afaik, but it’s error handling and data parsing should work differently.

Ah okay yes then I have also tested the core integration but I’m not getting (finding) enough measurements from there to be able to get a good result in the data. Most probably I have messed something up and is not able to sort it out.

What measurement are you looking for?