Configuration for modbus on Steca Stecagrid solar inverter (using solaredge_modbus)

Hi.
Maybe someone will need the solutions I found for Steca solar inverters.
I struggled a bit with modbus access to the Steca inverter. I did not find a ready integration. Below is a description of the working configuration.

  1. Integration needed: solaredge_modbus
  2. Registers number found on the basis of the description from: https://www.solaredge.com/sites/default/files/sunspec-implementation-technical-note.pdf
    The register addresses in the steca inverter are higher by 2 than in the above-mentioned implementation.
    The following configuration allows access to the basic parameters of a Steca inverter. Tested on hardware: StecaGrid5513.

configuration.yaml:

modbus:
  - type: tcp
    host: IP # for example (192.168.x.x)
    port: 1502 #from Your inverter modbus configuration. 1502 is default in my inverter
    name: steca

sensor:
  - platform: integration
    source: sensor.current_ac_power_steca
    name: steca_energy_production
    round: 2

  - platform: template
    sensors:
      daily_energy_production_steca:
        friendly_name: Daily Energy Production Steca
        unit_of_measurement: kWh
        value_template: "{{ states('sensor.daily_energy_steca')|float }}"
      monthly_energy_production_steca:
        friendly_name: Monthly Energy Production Steca
        unit_of_measurement: kWh
        value_template: "{{ states('sensor.monthly_energy_steca')|float }}"
      yearly_energy_production_steca:
        friendly_name: Yearly Energy Production Steca
        unit_of_measurement: kWh
        value_template: "{{ states('sensor.yearly_energy_steca')|float }}"


  - platform: modbus
    scan_interval: 10
    registers:
      - name: "DC Power (steca)"
        hub: steca
        unit_of_measurement: "kW"
        scale: 0.001
        precision: 3
        slave: 71
        register: 40102

      - name: "Total production (steca)"
        hub: steca
        unit_of_measurement: "kWh"
        slave: 71
        register: 40095
        data_type: uint32
        count: 2
        scale: 0.001
        precision: 1
      - name: "L1 Voltage (steca)"
        hub: steca
        unit_of_measurement: "V"
        slave: 71
        register: 40081
        scale: 0.1
        precision: 2
      - name: "L2 Voltage (steca)"
        hub: steca
        unit_of_measurement: "V"
        slave: 71
        register: 40082
        scale: 0.1
        precision: 2
      - name: "L3 Voltage (steca)"
        hub: steca
        unit_of_measurement: "V"
        slave: 71
        register: 40083
        scale: 0.1
        precision: 2
      - name: "Apparent Power (steca)"
        hub: steca
        unit_of_measurement: "kVA"
        scale: 0.001
        precision: 3
        slave: 71
        register: 40089
      - name: "Current AC Power (steca)"
        hub: steca
        unit_of_measurement: "kW"
        scale: 0.001
        precision: 3
        slave: 71
        register: 40085
      - name: "Temp. (steca)"
        hub: steca
        unit_of_measurement: "°C"
        slave: 71
        register: 40104
        scale: 0.1
        precision: 2


utility_meter:
  daily_energy_steca:
    source: sensor.steca_energy_production
    cycle: daily
  monthly_energy_steca:
    source: sensor.steca_energy_production
    cycle: monthly
  yearly_energy_steca:
    source: sensor.steca_energy_production
    cycle: yearly

As people from helpdesks say: “It works for me”.
Greetings from Poland.
Michał

3 Likes

Hi Michał,

I thought about the same approach, I have a Power-One Aurora 3-phase inverter, it has its own protocol and register mappings, but luckily they made a wifi card which acts as a gateway with a SunSpec adapter, so it remaps the internal registers to SunSpec specifications. I managed to find the documentation of these registers, but I was also thinking that if both solaredge and other vendors comply to SunSpec, the fundamental registers should not be different.

Reading your post it looks you found out that your register addresses were +2 respect to SolarEdge, is that correct?

Another thing I want to ask: the config you posted doesn’t seem to rely on the solaredge_modbus integration, or am I missing something in the code?

Thanks for any advice…

Hi.
Yes, for me, the addresses of the registers were higher by 2 than in the specification (pdf file).
I use this integration (solaredge_modbus), but the sensors I display in lovelace are those created in configuration.yaml.
I do not use entities added automatically by this integration (they don’t work).
I wish you successful attempts.
Greetings.

So what is the need for the integration, if you don’t use the sensors it creates? That is what confused me. :slight_smile:

Integration (solaredge_modbus) is needed to use the modbus protocol. I use sensors that I configure in the configuration.yaml file, e.g. “DC Power (steca)”, “L1 Voltage (steca)” or “Temp. (steca)”, etc.
Value of the sensor called “sensor.daily_energy_production_steca” is calculated by the HA on the basis of utility meter “utility_meter: daily_energy_steca” ← “sensor.steca_energy_production” ← “sensor.current_ac_power_steca”. Thats all.
greetings

In order to use modbus, you just need the official modbus integration, that is enabled through this code you have in config.yaml:

modbus:
  - type: tcp
    host: IP # for example (192.168.x.x)
    port: 1502 #from Your inverter modbus configuration. 1502 is default in my inverter
    name: steca

The custom integration is not needed to enable modbus. You are correctly using the modbus (official integration) and you also installed solaredge_modbus custom component but not using it. That is what confused me. :slight_smile:

Thanks for the information.

Hi,

I have a Steca inverter as well. But I can not seem to get this working. Have a configuration.yaml and a sensor.yaml file.
Can you explain a bit more on what to do where?
How do I find the inverter-port for my StecaGrid6013?

Hi.
See settings / modbus sunspec (TCP) for the port number.
In my case, the port number is 1502.
Depending on the firmware version, the ports are shifted by 1 or 2 in relation to the attached pdf file.
Regards
Michał

1 Like

According to Steca they do not support modbus TCP, when I was asking about portnumber.
You are referring to inverter of Steca.com right?

Below You can find the view of modbus settings from my inverter.

Yes, I wrote about the Steca inverter.

https://www.steca.com/index.php?coolcept-fleX-XL-en#productproperty

My is StecaGrid 5513.
Regards
Michał

1 Like

After the last HA update to version 2022.04 “uint” should be changed to “uint32”.

I’ve managed the integration of my StecaGrid7013 inverter in HA 2023.4.0 using the modbus integration, the mentioned connection parameters and shifting the registers of the sunspec-implementation-technical-note.pdf by 1.

The value types of the specification must be set as specified (uint16, uint32, int16, int32) or mapped to corresponding Python types/structures to get the correct results.