Integration Solar inverter huawei 2000L

I only expose values which are directly available from the inverter. If you want to know the watts produced by each PV-string, you can deduce it yourself by computing the product of the voltage and amperage: W = V * A

1 Like

Hi @wlcrs I was using Emilyv2 and I switched to your integration and I’m missing “the current house consumption” in real time.

I don’t find in your integration “active_power” and “power_meter_active_power” to do the math. I’m missing something?

The current house consumption is active_power - power_meter_active_power But I don’t find the second one

I have one question which might sound a bit stupid, but I just can’t figure it out. How can I calculate my daily solar yield from the given sensors. I have 2 inverters and a Luna battery connected to one of the inverters. I have setup a template sensor which calculates the following value:

Daily yield inverter 1 + Daily yield inverter 2 + Battery Day Charge

The result is always a little bit too high. Not too far off, but it is slightly off. And this dispite the fact that the values from the sensors are identical to those in the Fusionsolar app (as they should be). Does anyone have an idea what is going on?

Edit: Found the solution myself. It has to be:

Daily yield inverter 1 + Daily yield inverter 2 + Battery Day Charge - Battery Day Discharge

1 Like

The current house consumption can be calculated by:

Input Power (from inverter(s)) - Active power (from Power Meter) - Charge/Discharge Power (from Battery)

If Active Power from Power Meter is positive then you are exporting to grid, if it’s negative you are importing.

1 Like

In v1.0.0a1, I’ve called the active power reported by the power meter “Grid Active Power” to better differentiate it from the active power reported by the inverter itself. In earlier versions, those sensors had identical names, resulting in the power meter active power entity being called sensor.active_power_2, which was not very helpful :-/

It’s a good idea to go through Configuration → Devices → click on the Huawei Solar tile to get an overview of the devices that I detected. You can then drill down into each device to find the entities that you need.

1 Like

Looking for v1.0.0 testers

I’ve polished the integration in the past weekend, and am looking for people willing to test the beta-version. I expect the sensor-part to be very stable already, but am not formally releasing it because of the new configurable parameter-entities that need some testing.

I’m especially looking for users with more advanced setups with multiple inverters, batteries, etc.

Changes since the previous release (v0.5.1)

  • Added support for changing some parameters, all related to batteries: maximum charge/discharge power, working mode, enable/disable charge from grid, …
  • Added some services to start/stop forced charge/discharge;
  • Added login-mechanism which uses the installer-account of your inverter to make changing parameters possible;
  • Improved naming of some entities to better differentiate between similar values (ex. ‘active power’ and ‘grid active power’);
  • Improved support for multiple inverters, batteries, power meters in the same setup;
  • Shifted some of the complexity from the HA integration into the library, to (hopefully) speed up the process of getting accepted in core;

Note that due to the multi-inverter support, I had to change the way the underlying unique_ids are calculated for entities. This can cause the old entities to become Unavailable “ghost” entities, and new ones to appear instead. I thererfore advice you to remove the integration and add it again if you encounter such issues.

How to test

Go to HACS, click on the three-dots menu of the Huawei Solar integration, and choose ‘Redownload’. Check the ‘Beta versions’ checkbox, and choose version ‘1.0.0a’ from the dropdown list.

Please let me know if you encounter any problems (or not). Include some details about your inverter setup: model name, firmware version, do you have a power meter/battery/sdongle/ … All feedback is appreactiated, either here or as a GitHub issue.

3 Likes

Hi @wlcrs , when @ffm777 pointed me out to the formula (inverter and power meter) I looked into the source code and I discover the sensor.active_power and sensor.active_power_2 since they have the same name in the code.

If I can give you a suggestion here or maybe you prefer the suggestion as an issue in github. Maybe its worth it to name the sensor something more easy to identify and related with the inverter.
I find sensor.active_power quite general, but something (idea) like sensor.sun2000_5tkl_active_power is more clear: sensor.<inverter_model>_attribute_name

Anyway, thanks for the work!

I tried to setup the new version but it is not working. The config flow never finishes but exits with a “Unexpected error” message. In the log I can see the following:

Logger: custom_components.huawei_solar.config_flow
Source: custom_components/huawei_solar/config_flow.py:86
Integration: Huawei Solar
First occurred: 9:22:15 AM (2 occurrences)
Last logged: 9:23:33 AM
‘HuaweiSolarBridge’ object has no attribute ‘get_info’

Traceback (most recent call last):
File “/config/custom_components/huawei_solar/config_flow.py”, line 170, in async_step_user
info = await validate_input(user_input)
File “/config/custom_components/huawei_solar/config_flow.py”, line 86, in validate_input
slave_info = await slave_bridge.get_info()
AttributeError: ‘HuaweiSolarBridge’ object has no attribute ‘get_info’

Those ID’s are generated from the “user friendly” name by HA. So if I would apply your suggestion, that entity would appear in the user interface as “SUN2000 5KTL Active Power” as well. As that is way too long, the last words would disappear behind an ellipsis (…) , which is no good. I settled for the middle ground of naming the active power sensor of the power meter “Grid Active Power”, which will thus result in sensor.grid_active_power.

Whoops. Fixed in 1.0.0a2.

Thanks for testing!

2 Likes

Hi. I’ve compared the internal wifi and dongle response times again on newest firmware (SPC141 for inverter and 127 for dongle)…

tl;dr:


Full post: Huawei SUN2000: why using a USB dongle for monitoring is not a good idea – skyboo.net

I just installed 1.0.0a2.
Looks pretty good.
I have a SUN2000-6KTL-L1 with the Luna 5kwh battery and the smart power meter.
It’s a single phase inverter with built in wifi.
The inverter is connected to my wifi and the integration is connecting to the inverters ip.

Only slightly odd figure is from the power meter, it has two entities grid_active_power and grid_active_power_2, I not sure what the second one is, it seems to be max int constant.

The battery settings that are exposed have been read correctly, I haven’t tried changing any yet.
I have it in Time of Use working mode at the moment, it has the charge limits and charge rates read out ok, doesn’t have the time slots but I imagine those are going to be tricky to handle in HA.

One value that would be nice to have is PV yield for the day.
The daily yield value on the inverter includes energy from the battery that was put there from the grid.
For example right now I have daily yield from the integration of 7.65 kwh but in fusion solar daily yield on the overview is just the PV and is 3.15kwh. The rest of the energy came from the grid charging the battery on lower priced night rate. Maybe fusion solar is doing something on the backend to accumulate this and it’s not easily available from the registers.

Hi, thanks for your full description.

  • I’ll remove the second Grid Active Power entity in the next update. I wasn’t sure what it was reading the modbus register documentation, but it clearly is not useful.

  • I can read/write the time of use times in the underlying library (implemented, but untested to be honest). However, I don’t really see a good way to expose them in HA. I can always implement a custom entity, but then some work needs to be done on the front-end to be able to display/manipulate it. (Contributions welcome!!)

  • PV Yield is not exposed by the inverter. I’ve seen that other brands of inverters also don’t expose that value. The commonly suggested solution is to calculate it yourself using a Riemann sum. More info in this GitHub issue. I’m still testing this solution myself, and for today I see a deviation of about 10% between the calculated yield (top entry) and the actual yield (which should be equal as my battery is currently depleted): image

1 Like

hola, perdona, pero no había leido esto. Lo hice entrando en la web de eu5.

Tienes que entrar en la web de tu planta solar, ir a administracion de planta, administracion de actualizaciones y ahí añadir una nueva tarea con la instalación del firmware, tienes que seleccionar INVERSOR, y luego la version que quieres poner y luego el equipo… que sale en un desplegable.

HELLO,

many thanks for your work. I want to test it this weekend. I have a question. Can you integrate de daily export and the selfconsumption daily? I have it on accumulated value… or can I calculated it?

Thaks a lot!

This can be achieved with Utility Meter - Home Assistant

This can be done much easier than that. See my solution from above:

Daily yield inverter 1 + Daily yield inverter 2 + Battery Day Charge - Battery Day Discharge

These values perfectly match the numbers from the Fusionsolar app.

This can be easily calculated with the following formula:

Daily yield inverter 1 + Daily yield inverter 2 + Battery Day Charge - Battery Day Discharge

Ok. Tested the new version. Now the setups goes through fine, but I don’t get the checkbox anymore for setting up the advanced features (like the switch for AC charging the battery).

may I can calculate PV yield (kWh) with

Integration - Riemann sum integral

and this code in config.yaml?

  - platform: integration
    source: sensor.input_power
    name: Energia_ingresso_inverter_kWh
    unit_prefix: k
    unit_time: h
    method: left
    round: 2