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:
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…