SMA Solar Integration

Hello Ben,

I have been able to solve parts of my problems.I have added two devices as SMA Solar integrations (Energy Meter and Storage Boy). As I said above, you just have to see which selection point has to be active.

An old inverter I can only partially read out via the Scrape command (Scrape sensor for SMA Sunny Portal - #18 by tropfen) from the sunnyportal.

What I am missing is access to the SMA Home Manager 2.0, which is unfortunately not included in the SMA Solar Integration.

Frank

Hello Ben,

what SMA entity you are looking at (inverter name + Version)? Have you tested the 4 possible derivations of the check boxes in the SMA Solar integration set up?

Is there a reason why you are using the 2021.8.8 version?

Frank

have you seen this thread?

I got my SMA invertor and home manager 2 connected from there. The only issue I have is that I cant see any of the data in the new energy screen.

Hello JerryCih

In order to integrate devices into the energy area, they require special properties. For example these

    device_class: energy
    state_class: total_increasing  

Here, either the current entities must be assigned this property or the existing values must be assigned to newly created ones that have these properties.

My inverter in > 10 years old (SMA Sunny Boy 2500HF-30). No access via Modbus etcā€¦

Frank

Hello JerryCih,

you say you have access via Modbus to the SMA Home Manager 2.0. How did you achieve this? I donā€™t even have access to the device via the web.

Frank

I followed chris_ka tutorial and it works (its not modbus)

As for the energy area, I know that they require something but I have no idea how to do that, Im not a coder, Im a follower :slight_smile:
I use the power wheel from HACS to see my power distrubution.

Hi Frank,

The SMA inverter I have is a SUNNY TRIPOWER 4.0 (firmware 3.10.10.R) and Iā€™m running HA version 2021.10.0 on a pi with HA OS but the problem not being able to login using the SMA Solar integration still exists.


The modbus workaround works partially but when i create a sensor integration for the Energy tab the sma_power still is showing negative values:

sensor 3:
  - platform: integration
    source: sensor.sma_power
    method: left
    name: energy_sun
    unit_prefix: k
    round: 2

even with this template:

- name: "sma_power_template"
      unit_of_measurement: "power"
      state: "{% if states('sensor.sma_power') is not none %}
                 {% if states('sensor.sma_power') | int < 0 %}
                    {{ 0 }}
                 {% else %}
                    {{ states('sensor.sma_power') | int }}
                 {% endif %}
               {% else %}
                 {{ 'error' }}
               {% endif %}"
      attributes:         
          last_reset: '1970-01-01T00:00:00+00:00'

image

Hello Ben
Have you tried the group ā€˜userā€™?
Frank

funny numbers like yours are usually a result of a wrong way to assign variables. So e.g. integer instead of floating number. But I am not a programmer in HA. I only know this from my programming work in climate research.

No idea if this can be a problem here too.
Frank

Yes, same result :frowning:

The strange thin is that the entity sma_power works fine in another card, just not in the Energy tab

This can be fixed by adding sensors like this:

sensor 3:
  - platform: integration
    source: sensor.sma_power
    method: left
    name: energy_sun
    unit_prefix: k
    round: 2

except for the negative value in my caseā€¦

Hello Ben,

One question: you can connect to the inverter via SMA Solar Integration?
If so what entities are visible at Configuration - Entities - Search: SMA Solar? Which values / units are there?

Frank

Hello Frank,

No, tried every option to connect locally but since an update this summer the SMA Solar integration is not working anymore (user, installer, SSL on/off etc, nothing works) so currently only the modbus workaround is an sort of an option for me at this moment. As said with this the sma_power entity works well on a card, but not on the energy screen. I created a sensor interation for sma_power but this one shows negative values

1 Like

Hi all, I noticed my sensor.daily_yield is not the same as the sunny portal shows as the yield of the day. Also, there is an entity ā€œtotal_yieldā€ and ā€œpv_gen_meterā€, that are almost the same and I think are meant as the same numbers. Anyone can tell me more about it?

Did you fix this problem? Stumbling on the same problem in a new environment.

Hi Mathieu,

No, I did not find a solution yet. It should not be that hard to fix this since it worked fine before august this yearā€¦

In my case the modbus workaround isnā€™t even workingā€¦

modbus:
  - type: tcp
    name: sma
    host: 192.168.2.28    # use the ip address for your inverter as mentioned in the text
    port: 502                # use the port you saw in sunny explorer
    close_comm_on_error: true
    delay: 5
    timeout: 5
    sensors:
      - name: AccumulatedPower
        unit_of_measurement: W   # see register description in section 5.4.1 of the document
        slave: 2                   # use the UnitID you found in Sunny Explorer
        address: 30233            # use a register from section 5.4.1 of the document
        input_type: input       # all registers starting with 3 need to have the type input
        count: 2   
      - name: TotalEnergy
        unit_of_measurement: Wh
        slave: 2
        address: 30513
        input_type: input
        count: 4  
      - name: PVFeedIn
        unit_of_measurement: W
        slave: 2
        address: 30775
        input_type: input
        count: 2

Schermafbeelding 2021-11-30 om 12.03.10

Hi all, my first post here.

Iā€™ve seen that a lot of you are struggling with SMA integration so Iā€™ll post here how I integrated two different SMA solar plants (one at my place with SMA Data manager, custom BControl EML300LR energy meter, SMA TPL25 and one at fathers place SMA Home Manager 2.0 and two SMA inverters).

Install https://peyanski.com/how-to-install-home-assistant-community-store-hacs/ HACS
Within HACS install GitHub - CJNE/ha-sunspec: Home Assistant customcomponent for SunSpec modbus devices

My place (BControl energy meter + SMA inverter):
For BControl and inverter (please enable modbus on it)
Add both via Sunspec (try slaves 1,2,3,126. For me BCcontrol is 1, and inverter is 126)


You will see sensors working out of the box

Fatherā€™s place (SMA Home Manager 2.0, SMA inverters)
(since Home manager does not support modbus, you need to have a special integration for it)
Install and configure MQTT like here htt[REMOVE]ps://learn.adafruit.com/set-up-home-assistant-with-a-raspberry-pi/mqtt-setup
Install ht[REMOVE]tps://github.com/kellerza/hassio-sma-em (here youā€™ll want to add sensors you need to the plugin configuration like i2,i3,i1 for the amps per phases etc.)

I had to add [REMOVE] to links since, system wonā€™t let me to add this helpful guide, as Iā€™m a new user.
Please let me know if someone tries without success and I can guide you.

1 Like

Data from BControl and SMA inverter