MODBUS data from SMA Inverter

Is there any possibility to get the data of the different strings connected to the inverter?
I asked cause I had trouble with one string some days before without recognizing it. By monitoring the strings I would be able to detect it much earlier that there is an issue.

Which inverter are you using?

If you are using a Tripower X, you could use my integraton.

It’s a Tripower 20000tl-30.
Any chance that your integration is working with this one?

Not sure. You can install the integration on a test basis and see if you get the values via “webconnect” or “speedwire”. If not, delete them again.

Seems to work.
Thanks for the hint!

Did you used “webconnect” or “speedwire”?

I would like to update my list of supported devices.

Speedwire as it seems to be more reliable.

Hi!

Inspired by this post, I adjusted it a bit.

I made a helper in which I can set the max power:

I can show it as a slider in Lovelace:
image

Linked to that helper, I made an automation which writes the helper-value to the SMA modbus:

alias: Set Max PV Power from Helper
description: ""
trigger:
  - platform: state
    entity_id:
      - input_number.maxpvpower
condition: []
action:
  - service: modbus.write_register
    data:
      address: 40915
      slave: 3
      value:
        - 0
        - "{{ states('input_number.maxpvpower') | int  }}"
      hub: sma_modbus
mode: single

then I made 2 automations which set the helper to 0 or max, depending on the current Tibber energy price:

alias: Price Negative, Max Power 0
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.electricity_price_address
    from: ">0"
    to: <0
condition: []
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.maxpvpower
    data:
      value: 0
mode: single
alias: Price Positive, Max Power 8000
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.electricity_price_address
    from: <0
    to: ">0"
condition: []
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.maxpvpower
    data:
      value: 8000
mode: single

So now I can adjust the max power that my SMA delivers with the slider in Lovelace. (this is not quite useful for my situation, but it works).

But when the energy-price goes negative, the max power goes to 0. Besides that, my heat-pump starts heating the DHW. In the future my batteries will load at the lowest point and my future swimming pool, jacuzzi and sauna will start heating. All up to the max power my connection allows.