Integration Solar inverter huawei 2000L

How to set template sensor active_power ?

It doesn’t work that way:
pv_active_power:
friendly_name: “Produkcja AC”
entity_id: sensor.sun2000_8ktl_m0
unit_of_measurement: ‘W’
icon_template: mdi:solar-power
value_template: “{{ state_attr(‘sensor.sun2000_8ktl_m0’, ‘active_power’) }}”

You don’t need pv_active_power becouse it is the same as value from sensor.sun2000_8ktl_m0 entity.
From HA 0.115 you don’t add entity_id in template. This is example of template sensor:

- platform: template
  sensors:
    pv_01_voltage:
      friendly_name: "String 1 napięcie"
      unit_of_measurement: 'V'
      icon_template: mdi:flash-alert-outline
      value_template: "{{ state_attr('sensor.sun2000_8ktl_m0', 'pv_string_01_voltage') }}"

ok you are right i didn’t notice

Hi Rafał,
thanks for your work on this. Thanks to that, I’m successfully using now hass with sun2000-8ktl-m0.

My question is about the power metter - I got zeroes:
day_active_power_peak: 0
power_meter_active_power: 0

Is this some external meter needed that is compatible with Huawei? Or version of inverter that has it built-in? or am I missing sth? :slight_smile:

Potrzebujesz miernika dodatkowo zaraz za głównym licznikiem. Ja mam DTSU666-H bo taki jest podawany w katalogu. Podobno jest jakiś chiński zamiennik który również współpracuje z tym falownikiem (kiedyś widziałem na elektrodzie wpis o tym). Sam falownik żadnej firmy nie mam możliwości mierzenia energii przepływającej między domem a licznikiem, gdyż ta energia omija falownik. Jak się sprawuje instalacją? Mam do Jasła 60km prawie po sąsiedzku.

And I wanted to clarify one thing, because for some newbies (like me) it was not obvious.

There are four interfaces on Sun2000 when you have internet dongle plugged in (or just two without it):

  • built-in wifi access-point (internal) that exposes the data we need for HAss under the SSID SUN2000-HV… or when you use FusionSolar app when directly connected to wifi of Sun2000.
  • built-in serial interface you may use probably to get such info as well (the big plug below inverter).
  • dongle-ethernet and dongle-wifi - AFAIK those two are just to connect to internet using existing network connection. No simple way to get data from it. It’s used by inverter to send data to fusion-solar cloud, or any other configured provider for service/maintenance/data statistics. You get data about your PV from that cloud when you use fusionSolar app outside your home-network wifi.

Easiest option is to connect to the first one: built-in wifi AP as a client (with RaspberryPi or router like Rafał did) and use it to connect to Huawei Sun2000 device (usually its on IP: 192.168.8.1/24).

There is also another option - to grab those data from FusionSolar cloud using Kiosk option mentioned above. It has some drawbacks (like you expose your data a bit more while enabling Kiosk mode, you rely on internet connection and third party cloud services). For this option to work, you need to use web POST method to get data instead of modbus TCP (with resource: https://eu5.fusionsolar.huawei.com/kiosk/getRealTimeKpi) - See Frans’ post above for details.

Hope this is putting all methods in one post for clarification.

2 Likes

Ja jestem z Wro :slight_smile:
Ok dzięki za wyjaśnienie. Tutaj dokładnie opisane: https://www.youtube.com/watch?v=RmwZYNVjqHI

Pozdro

I’m afraid your model just doesn’t support that function. If you really want it you could recreate it within Home Assistant.

Do you know how to draw month with production per day?

1 Like

Hmm, based on the manual, it seems power meter should work with SUN2000-(8KTL, 10KTL, 12KTL, 15KTL, 17KTL, 20KTL).

Check this:

Power meter works with:

Sun2000-2~6KTL-L1;
SUN2000-3~10KTL-M0/M1;
SUN2000-8~20KTL-M0/M2;
SUN2000-50~60KTL-M0(tylkozSmartdongle-4G);
SUN2000-100KTL-M1(tylkozSmartdongle-4G)

I use mew-01 for this. It replaces a dedicated meter, easy to use and easy to integrate into the HA. It is also cheaper by half.

You will need to have a power meter installed if you want to know the net power delivered to the grid (production of the inverter - consumption of your house). If you only want the power generated by the inverter, that’s the state value of the sensor.

You have two options:

The second one is easier to set up and looks better integrated but you database will get ~3x as big (if you’re using the current default of 10 days) which might become an issue. If you want to look at longer trends, let’s say months or years then can only go with InfluxDB or Prometheus.

I hope HA will move one day to Prometheus so that long term data and graphs can be first class citizens in Home Assistant.

How to set [Energy storage unit] Working mode (47004) on home-assistant.

Right now this is not possible with the huawei-solar package. I didn’t implement writing values because I did not need it and because it seemed safer to (start with) read-only. You could use the modbus switch, if you’re not afraid of messing things up.

1 Like

Where did you find such beautiful icons for inverter, smart meter, panels. ?

It’s from fusionsolar app for android.

Thanks, I have found icons in apk file in good quality and with transparency :slight_smile:

1 Like

Did you also have had the problem that you can’t connect your inverter in Python? I’m having a SUN2000-6KTL-MO but it’s giving me this ‘false’ reaction. Even why I try to scan on open ports on my invert, it giving null open ports.

>>> import pymodbus
>>> import time
>>> from pymodbus.client.sync import ModbusTcpClient
>>> client = ModbusTcpClient('192.168.2.14', '502')
>>> client.connect()
False