Integration Solar inverter huawei 2000L

Quick question:
My SUN2000-5KTL-L1 inverter is reporting ~120V under Phase A voltage. Is this a bug, since I’m in a 220V region?
I’m using the integration developed by @wlcrs .

this integration took me a lot longer then expected, nothing to do with the integration itself but with getting modbus active on the inverter. It looked so easy but it’s not.

i have a smart dongle-fe connected with a cable to the internet. that dongle had a green led continuous on, telling me it has a good connection but that isn’t enough. it also needs to be detected in the fusion solar backend or huawei server. For me only my inverter was visible and it was offline after i inserted the dongle.
When i connected through the AP in the inverter it tells me it is connected to the huawei server.
At this point i contactied huawei but that was not a big help.

The solution was to go online on the installer his account, delete my inverter, re-add it.
this would make the dongle and inverter go online on the fusion solar website.
Then i updated them to the latest versions.

I activated modbus as described in manual but did not get any connection, i needed to power cycle the inverter to get modbus activated.

So after 7 days it is all working, I hope this can help anyone else with this problem.

1 Like

I have this integration working. I have a power meter, a Luna2000 battery with 10 kWh batteries and a SUN2000-6KTL-L1 single-phase inverter along with solar panels on my roof.

  • The sensor.power_meter_active_power shows a positive value when exporting to the grid, and a negative value when importing from the grid.

  • The sensor.battery_charge_discharge_power shows a positive value when charging the battery, and a negative value when discharging the battery.

  • The sensor.inverter_input_power shows the power coming in via the solar panels on my roof (I understand this entity is pre-conversion loss, so needs a template to reduce it a bit which I have already incorporated).

I am wondering if anyone has managed to calculate the energy consumed in the house (i.e. energy that is not sent to grid, not being used to charge the battery - just energy that is being used the house - be it from solar, grid) from these entities?

I am having a lot of trouble figuring out exactly how to set up the tesla-style-solar-power-card by reptilex. I previously had this working with another brand of inverter, however that was a fronius and the integration tells me how much energy is coming in via solar, how much is being used in the house, and how much is being fed back/imported from the grid.

I’ve been at it for a few hours now and not really making much progress. I wonder if I am missing something? Something simple? This has turned out to be far more complicated than it seemed at first glance. Maybe my approach is wrong? Any insights appreciated.

1 Like

I have the same issue, it was working before (connection directly to the SUN2000 AP), but stopped working since a few days, did you manage to get it working again?

I’ve ended up ordering the smart wifi/fe dongle.
Oh well, hopefully it will provide my stats more reliably. the integrated AP was patchy at best for me.
I’m planning on wiring it up if possible.

1 Like

I’m struggeling with the calculation of my “real” daily solar energy production.
The calculated energy values are too high. The current power production values seem to be correct, they are the same at every point of time; in the Fusion Solar Portal and in Home Assistant.
Huawei Portal shows me 4.26 kWh of yield energy for yesterday.

4.26 kWh: Fusion Solar Portal
2022-12-19 08_25_24-Monitoring

5.46 kWh: Calculated daily solar energy with energy_calc integration (GitHub - KoljaWindeler/energy_calc: A custom integration for Homeassistant that provides an overview about solar power usage)

5.53 kWh: Riemann sum calculated solar produced energy and daily value with Utility Meter

  # Sensor: Riemann sum calculation of solar energy
- platform: integration
  name: "pv energy"
  unique_id: pv_energy
  source: sensor.pv_power
  unit_prefix: k
  round: 2
  # Utility Meter: Daily produced energy
  pv_energy_daily:
  source: sensor.pv_energy
  cycle: daily

So I have two different values for daily solar production in Home Assistant and every single value is too high compared with the value in Huawei Portal.

1 Like

Using a pen wifi with Home assistant (jnsted of built in wifi ) for the past 3 days and running fine!!!

Hi everyone,

I’ve started my journey with HA a couple of weeks ago, so far so good.

I’m struggling to integrate my Huawei inverter SUN2000-6KTL-L1 which has the smart dongle installed.
It’s connected successfully to the Huawei cloud
I can ping the dongle WIFI (192.168.8.218) from the docker container where the HS is installed.
I have asked my installer to upgrade the dongle firmware, which ends with SPC125.
The firmware of the inverter is V200R001C00SPC125.
I have accessed to the inverter AP (192.168.1.200) and I used the SUN2000 App to enable the Modbus-TCP.

Still the HS integration is not able to connect to the inverter at 192.168.8.218, I tried both 6607 and 502 ports. I understood it’s not mandatory to use the inverter AP because the dongle can provide Modbus-TCP as well, but apparently it’s not yet for me. Should I reboot the inverter?

thank if you can provide some insight
PF

The logs:
Aborting client creation due to error.
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py”, line 157, in create
await huawei_solar._initialize()
File “/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py”, line 120, in _initialize
self.time_zone = (await self.get(rn.TIME_ZONE)).value
File “/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py”, line 254, in get
return (await self.get_multiple([name], slave))[0]
File “/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py”, line 296, in get_multiple
response = await self._read_registers(
File “/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py”, line 389, in _read_registers
result = await _do_read()
File “/usr/local/lib/python3.10/site-packages/backoff/_async.py”, line 151, in retry
ret = await target(*args, **kwargs)
File “/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py”, line 354, in _do_read
raise ConnectionException(message)
huawei_solar.exceptions.ConnectionException: Modbus client is not connected to the inverter.


Logger: huawei_solar.huawei_solar
Source: /usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py:353
First occurred: 15:33:44 (5 occurrences)
Last logged: 15:40:25

Modbus client is not connected to the inverter.

Logger: pymodbus.client.asynchronous.async_io
Source: runner.py:120
First occurred: 15:33:44 (82 occurrences)
Last logged: 16:07:15

  • Failed to connect: [Errno 111] Connect call failed (‘192.168.8.218’, 6607)
  • Failed to connect: Multiple exceptions: [Errno 111] Connect call failed (’::1’, 6607, 0, 0), [Errno 111] Connect call failed (‘127.0.0.1’, 6607)
  • Failed to connect: [Errno 111] Connect call failed (‘192.168.8.218’, 502)
  • Failed to connect: Multiple exceptions: [Errno 111] Connect call failed (’::1’, 502, 0, 0), [Errno 111] Connect call failed (‘127.0.0.1’, 502)

Have to keep me posted, see if it works, and I will order in the new year.

Nope, and Huawei support are being totally useless, just not replying or answering the phone.
They’ve confirmed they removed the functionality, but are yet to downgrade all the components for me to get it working again.

1 Like

New beta release 1.2.0 beta 2

A lot of new features have been added in this new beta. A lot of new code also means a lot of occasions for new bugs to creep in. Please help me by testing this new version on your installation and reporting any errors via the GitHub issue tracker .

A big thank you to my GitHub sponsors: your support is greatly appreciated! :heart:

New features :sparkles:

  • Inverter ON/OFF switch
  • Capacity control mode
  • End-of-charge SOC and End-of-discharge SOC configuration entities
  • Time of use periods and fixed charging/discharging periods can be retrieved through extended attributes of ‘Time of use periods’ and ‘Fixed charging periods’ sensor
  • Time of use periods are now editable through huawei_solar.set_tou_periods service
  • Fixed charging periods are now editable through huawei_solar.set_charging_periods service
  • Capacity control periods are editable through huawei_solar.set_capacity_control_periods

Improvements

  • Batched retrieval of configuration entity values
  • Improved and dynamic correctness of minimum value/maximum value/availability of certain configuration entities (for example: capacity control can only be enabled if charging from grid is also enabled, capacity control SOC must be larger than maximum discharge SOC of the battery)
  • Support for V103 Optimizer Data Files (fixes reading optimizer data in recent firmware versions)

Screenshots

Inverter ON/OFF switch


TOU periods as extended attributes

Full Changelog: Comparing 1.2.0b1...1.2.0b2 · wlcrs/huawei_solar · GitHub

5 Likes

Not sure if this is a new “bug” but the “Inverter Input Power” and the sum of “PV1 VoltageCurrent + PV2VoltageCurrent” seems to deviate now and I hadn’t noticed that before. Might just be me though…:thinking:

Can someone explain the difference between input_power and active_power sensors?
Thanks in advanced!

Hi @wlcrs

Thanks again for the great work!
Is there already any wiki available how to set the capacity control trough HA?
Happy holidays!

Input is the power from the PV, active power is the sum of power that goos trough the inverter (pv/battery/grid feed in)

Based on what you say input power should be always less than active one, but it’s not the case for me - input power is always bigger by about 20W (when solar panels generate energy). When no solar generation we have both sensors (active_power and input_power) are 0.

So if I want to measure power which was generated by solar only should I use active power or input one?

1 Like

I’ve documented the usage of the capacity control feature here: Capacity control · wlcrs/huawei_solar Wiki · GitHub . Please let me know if something is unclear, so that I can improve the wiki page where necessary.

2 Likes

The 20W difference is the conversion loss from the DC power provided by your solar panels (=input_power) to AC power (=active_power) injected in your home electricity network.

3 Likes

Many thanks for confirmation, Thijs W.

I’ll use active_power for my future calculations of used power&energy from solar panels to house & grid.

@wlcrs any suggestions ons this one?
Suddenly is only allows a max of 100w after set the capacity-control-period to 00-23:59.

ALready disable the capacity control mode, but the max grid charge power stays max 100w.
Even try to reload the integration, same issue