Custom Component: ABB/Power-One/FIMER PV Inverters - SunSpec Modbus TCP

I inserted this line:
modbus:

  • name: ElfinEE11
    type: tcp
    host: 192.168.1.139
    port: 502
    delay: 0
    message_wait_milliseconds: 30
    timeout: 5
    where do I find the ID of my inverter? should it be 2?
    or on Aurora I found this entry: FLASH ID is this?

please be patient, if you can help me I will be grateful.

Marino, where did you put this line? This integration is installed via config flow. Thereā€™s no line to be added anywhere. You need to follow the instructions provided in the readme.

Install the component via HACS, then add the integration from the integrations page, then configure it.

You can find the inverter id (slave id) on the inverter display, usually itā€™s 2 or 254 but you need to find it.

Iā€™m redoing the procedure from scratch

First you need to understand HOW things work.

The integration needs an IP and a PORT, not a virtual com port. You only need to enable the Modbus TCP on the Elfin and check what tcp port uses, should be 502. Then you use IP:PORT of the Elfin to configure the integration.

The integration will query the elfin using modbus tcp, and the elfin will translate those commands on the serial port to the inverter and reply back.

Ensure of the Slave ID is correct.

Hi!
Iā€™ve a Aurora Power-One inverter, but this has a Modbus RTU (RS485) interface only.
Iā€™m using SolarView to log my inverters since years. Is there any solution to use RS485 directly?

On RS485 you can only enable the Aurora protocol to access register data, so this integration wonā€™t work, since it only supports Sunspec standard mapping. You need to install the VSN300 card (check if itā€™s compatible with your inverter model), that is a datalogger that also translates Aurora protocol to Modbus TCP Sunspec.

Hello,

I have an ABB TRIO with an Ethernet Expansion Card (FIMER_ETHERNET expansion board_Quick Installation Guide_EN_RevC (1).pdf) that supports Modbus TCP. This has already been mentioned before. Unfortunately, there is no implementation according to the SunSpec.

The data from the inverter is displayed in the input registers and is probably mapped 1:1 from Modbus RTU to TCP.

The register mapping can be found here:
Modbus_RTU_registers_map_for_TRIO_8.5(5.8)_TL_OUTD (abb.com)

I have read out my data here with the Modbus Scanner:

Is there a way to modify the register mapping in your project so that I can get it to work with this Ethernet card as well?

The VSN300 is currently hard to come by, and in principle, with the right mapping, it should work with the Ethernet card as wellā€¦

I decided to stick to Sunspec because the standard register mapping could change based on the inverter model.

Nothing stops you from forking the project and modifying the code to implement custom mapping for your inverter, if you know all the register addresses of your inverter.

But if I was you, I would wait to have the VSN300 when available.

If you have the registers map you could read the values directy via modbus integration from HA, is a PITA because you have to map every single parameter but itā€™s better than nothing and, I think, an easier task than modifying existing Sunspec implementation to fit your inverter map.

My 2 centsā€¦

Hi fabyano,

yes these is was Iā€™ve done now, after checking the implementation of alexdelprete.
It was much easyer to use modbus directly for the interesting parameter.

VSN300 was no option it will be available again by end of the year, maybeā€¦

Thanks

Hi, I have an aurora abb pvi-12.5-tl-outd-fs and can read everything through modbus TCP, but we have a dynamic energy contract and would like to adjust my solar power output of the inverter to 0kW when there is a negative price (we have to pay to send energy back to the grid). I donā€™t want to use a relay or anything to de-energize the inverter. I have been able to get this working on a SolarEdge inverter, now I need to get this working on an ABB inverter.
Anyone know if you can the power output using modbus TCP?

AFAIK thereā€™s no way of changing the injection policy of the inverter via mod bus.
On my system the setting must be changed via web gui logged in as admin user.
Donā€™t know if there are exposed APIā€™s that allow this.

You should ask to Fimer support service if there is some way to programmatically change the policy.

Hi!

I have bought a house recently with a REACT2-5.0-TL installed by the previous owner. So far the integration works great but I canā€™t manage to get battery data from it. I read through most of this thread. The current configuration is base address at 40000. I get a lot of data but sadly nothing about the installed battery.

I am a little bit lost here and donā€™t know how and where to continue. Any help much appreciated!

By the way, I tried to get support through GitHub (Sign in to GitHub Ā· GitHub) which lead to a dead end. Just fyi.

Thank you!

Hi,
I have the same inverter, with 2 battery pack. I used Alex integration in the beginning, but I choose to switch to REST API integration for my plant due to some problems I had (related mostly to poor wifi coverage in the inverter area, not Alexā€™s precious work).

You can try it on your inverter, It should have the same references in the REST JSO as mine so it should be pretty simple to use, take a look here:

Hey! Thank you so much!

Iā€™ve setup the new sensors using the REST endpoints. When I check the entities all the data is displayed right as expected. Sadly I canā€™t setup those new sensors as data inputs for the Energy dashboard. I canā€™t find them there.

Do I have to setup additional helper sensors that accumulate the sensor readings? I read something about this in some other approach.

Yeah, sorry, my bad. Itā€™s the problem of the DIY and not using a fully build integration :slight_smile: The one retrieved by the API are the power values only (W). You need to convert the proper ones to Energy values (Wh, via platform/integration) to be able to pick 'em up in the Energy Dashboard, something like this

sensor:
  - platform: integration
    source: sensor.generation_to_battery
    name: battery_charge_energy
    unique_id: battery_charge_energy
    unit_prefix: k
    round: 2
    method: left

  - platform: integration
    source: sensor.battery_to_house
    name: battery_discharge_energy
    unique_id: battery_discharge_energy
    unit_prefix: k
    round: 2
    method: left

  - platform: integration
    source: sensor.generation_to_grid
    name: injected_energy
    unique_id: injected_energy
    unit_prefix: k
    round: 2
    method: left

  - platform: integration
    source: sensor.grid_to_house
    name: imported_energy
    unique_id: imported_energy
    unit_prefix: k
    round: 2
    method: left

  - platform: integration
    source: sensor.generation_instant_output
    name: overall_solar_energy
    unique_id: overall_solar_energy
    unit_prefix: k
    round: 2
    method: left

  - platform: integration
    source: sensor.generation_to_house
    name: autoconsumed_energy
    unique_id: autoconsumed_energy
    unit_prefix: k
    round: 2
    method: left

The examples you provided donā€™t seem to work for me to calculate battery discharge and charge values correctly. I did find out that sensor.battery_instant_power_flow from your example, which uses PBat from the JSON source, is basically what I need.

The value is negative when discharging from battery and charging when itā€™s positive.

I just canā€™t wrap my head around how to write a riemann sum for this to integrate that into the energy dashboard.

What is the problem with my sensor definition?

PBat as you say is positive when charging and negative while discharging. Given that we are speaking of power and not energy you need to create 2 different sensors derived from PBat,

  • one that is positive while charging and null while discharging
  • one that is positive (absolute) while discharging and null while charging

and that is exactly what the template definition in my configuration.yaml do (brutally copied from @monkeypr00f Nodered Flow).
Having these ā€œrectifiedā€ values you can now do a simple integral/reimann sum and derive energy values.

Hey, sorry it took a while for me to answer. Was busy with some stuff.

I just want to share how I got it working in my case. I use the REST API to create two sensors for my battery for incoming and outgoing power. As for solar energy production, I use the before used sunspec integration and simply created a riemann sum helper sensor.

Thanks @wrongisthenwright couldnā€™t have done it without your help! <3

rest:
    resource: http://IP/v1/livedata
    username: "myusername"
    password: "mysupersecretpassword"
    authentication: basic
    scan_interval: 60
    timeout: 30
    sensor:
      - name: "Battery Charge Total"
        value_template: >
                {% for point in value_json['BATTERY-ID']['points'] %}
                        {% if point.name == 'ECharge' %}
                        {{ point.value/1000 }}
                        {% endif %}
                {% endfor %}
        device_class: energy
        unit_of_measurement: kWh
        state_class: total
      - name: "Battery Discharge Total"
        value_template: >
                {% for point in value_json['BATTERY-ID']['points'] %}
                        {% if point.name == 'EDischarge' %}
                        {{ point.value/1000 }}
                        {% endif %}
                {% endfor %}
        device_class: energy
        unit_of_measurement: kWh
        state_class: total
sensor:
  - platform: integration
    source: sensor.inverter_dc_watts
    name: solar_energy_production
    unique_id: solar_energy_production
    unit_prefix: k
    round: 2
    method: left

Hi, i think you are italian, I would like to talk with you in italian, may be in private.

So, this is an international comunity, i must to speak english.

ā€¦I have a powerone (aurora) inverter connected via rs845 and a wifi module called Elfin W11.

You think i can use your integration for to connecdt? I tried, but falliedā€¦ thanks!