Modbus.Sunspec with Solaredge SE10K shows invalid Total Real Power value

Hey!

I have a SolarEdge S10K-RWB48 at home, connected to the network via modbus over tcp.
When I manually poll the fields 40188 and 40189:

…I get 203 and 105, so that’s what I typed in the config of my thing.
As a start address I first chose 40121, because the meter model block starts there, but it seems the thing asks for the inverter model block start, as only that gets me some correct values (e.g. AC frequency, which then is 50.0Hz).

Now if I go to channels, i get a “Total Real Power Value” of 0W. (with both 40121 and 40069 as start)
If I directly poll the modbus at 40206, I get -3281, which is correct.

What can I do here? Am I doing anything wrong?
Sunspec: https://www.solaredge.com/sites/default/files/sunspec-implementation-technical-note.pdf
thing config:

UID: modbus:meter-wye-phase:997978a137:e950040a4f
label: Three Phase Meter, Wye-Connected
thingTypeUID: modbus:meter-wye-phase
configuration:
  length: 105
  refresh: 5
  maxTries: 3
  address: 40069
bridgeUID: modbus:tcp:997978a137
channels:
  - id: acGeneral#ac-total-current
    channelTypeUID: modbus:ac-total-current-type
    label: AC Total Current Value
    configuration: {}
  - id: acGeneral#ac-average-voltage-to-n
    channelTypeUID: modbus:ac-average-voltage-to-n-type
    label: Average Line To Neutral AC Voltage
    configuration: {}
  - id: acGeneral#ac-average-voltage-to-next
    channelTypeUID: modbus:ac-average-voltage-to-next-type
    label: Average Line To Line AC Voltage
    configuration: {}
  - id: acGeneral#ac-frequency
    channelTypeUID: modbus:ac-frequency-type
    label: AC Frequency Value
    configuration: {}
  - id: acGeneral#ac-total-real-power
    channelTypeUID: modbus:ac-total-real-power-type
    label: Total Real Power Value
    configuration: {}

Your device is more an inverter than a meter, if I read correctly. However, you have defined your thing as a meter-wye-phase.

What if you define it as inverter-three-phase in stead and use 40069 as starting address?

It is an inverter that has a meter connected to it over wifi afaik. Using the inverter as a thing works, but that only gives me the inverter items which are AC and DC Power generated by the sun, not the electricity bought and sold to the grid, which is what I need :confused:

If I check the binding source code, combined with the sunspec document you linked, I do believe the meter-wye-phase may be correct.

However, you assume the address to start at 40121 for a meter. But that is the start of the common block. I think you should start at 40188, which is the identification block.

With a length of 105 that you specified, the last address is 40293 (or 40292?) which corresponds with the last address of the meter block.

You, sir, are a gentleman, and a scholar! It works!

Can you briefly send a link to the binding source code/say how to find it?

You can find the source code for the meter parser here:

https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.modbus.sunspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/parser/MeterModelParser.java

And from there on you’ll be able to find out more navigating the github repository.