Integration Solar inverter huawei 2000L

Hi everyone.

I had been using the integration via the Dongle for many months. Today I decided to try the direct connection to the Inverter AP. To this end I got a Wifi USB Stick, connected my Inverter to HA through that and it all worked pretty easily.

Now here’s the thing…instead of being more stable, it seems like this mode of connection is actually less stable for me. Also, the integration appears to be behaving weirdly, for example I can’t reload it from the HA Settings, as soon as I change anything I need to restart HA completely.

Did I make a mistake somewhere? I can’t really get this to behave consistently at the moment. The Update Interval…I can set it to whatever I like, but it will often just ignore the setting or crash. With the connection through the Dongle I could get it to reliably Update every 12-15 Seconds, now it will theoretically Update every 3 Seconds, but sometimes also takes almost 30…:thinking:

I have noticed that my sun2000 is offering a sdongle upgrade to V200R022C10SPC107 - has anyone tried this with home assistant yet?

Yes, I have been running the V200 107 for quite a few weeks. It seems to be no better or worse than earlier version for me.

I’ll give it a go then!

1 Like

@wlcrs we have changed the password to 0000000a (00000a is not possible as new password because of the length restrictions) it works, so there’s a bug in the integration that doesn’t like other passwords besides the default ones.

2 Likes

Hello. I’ve restarted several times HA trying to depurate some problems with some automations and now the integration states:

Error setting up entry SUN2000-5KTL-L1 for huawei_solar

Tried to reload it with same result, and tried to disable it, restart HA and then enable it again. Can’t get it working again. Any help?

Hi Peaceduck,

Using WLCRS integration and see that it provides a sensor.inverter_efficiency_1 (Primary Inverter in a chain) and sensor.inverter_efficiency_2 (Secondary inverter).

image

Wonder if instead of using the rough calculation that gives a 90% / 95% / 98% efficiency value, would it be more accurate/simpler to query this sensor and multiple by each individual inverters Input Power.

image

i.e. something like:

state: "{{ (states('sensor.inverter_input_power_1') | float (0) ) * (states('sensor.inverter_efficiency_1') | float)}}"

In NZ too and don’t have that issue, my yield is 0.
So likely does relate to the battery output as I don’t have a battery.

I thought about the same, but mine is always 100% as soon as the inverter turns on

Good afternoon…

I have problems connecting to the module that I have via cable… the ip is correct, it responds to ping, but if I telnet to the ip with ports 502 and 6607, neither of them answer me… those are those ports, right? I think 502 for wifi and 6607 for cable.

Thanks in advance

1 Like

Hi Fredrik,

I’ve looked around (finally managed to change my Huawei installer password today and gained access to the battery configs) and it appears I want to do the same as you did regarding the timed charge and discharge of the battery. My reason is that we have a 4 hour period of cheap electricity at night and if I want to charge my battery from the grid I don’t want my EV to take all that charge when the battery SOC state is reached first. Hence I can see that setting the max discharge parameter to 0 during that 4 hour period would work well. My question to you though is whether the TOU mode needs to be set for this to occur? or can this be achieved despite the battery working mode being set to “Maximise Self-Consumption”?

Thanks,
Mike.

Somehow it reverted and is reporting better values.

Since you’re in NZ too, do you struggle with the time offset and NMS vs NTP time source?
It looks like Huawei doesn’t want me to stick with NTP and reverts the time server to their faulty NMS server every time I set it to NTP.

My integration works great, but i have an error in the logs:

Unexpected error importing huawei_solar/intent.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 50, in _async_process_single_integration_platform_component
    platform = integration.get_platform(platform_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.huawei_solar-main.intent'

…there is any file named intent.py… what it want?

I have a SUN2000-6KTL-L1 connected to a 6kw Luna battery pack.

using this code:

  - sensor:
      - name: energy_pv
        #friendly_name: "PV Energy"
        unique_id: "PV Energy"
        state: "{{ (states('sensor.inverter_total_yield') | float) - (states('sensor.battery_total_discharge') | float) + (states('sensor.battery_total_charge') | float)}}"
        device_class: energy      
        state_class: total
        unit_of_measurement: kWh
      - name: energy_pv_daily
        #friendly_name: "PV Energy daily"
        unique_id: "PV Energy daily"
        state: "{{ (states('sensor.inverter_daily_yield') | float) - (states('sensor.battery_day_discharge') | float) + (states('sensor.battery_day_charge') | float)}}"
        device_class: energy
        state_class: total
        unit_of_measurement: kWh

The energy dashboard create this graph:

But as you can see there is a negative solar production during the night.

How can I solve this issue?

Hi!
Just want to know if someone has trouble with the huawei solar integration, that’s two days that doesn’t work at all. Already opened a bug issue on GitHub .

      - name: energy_pv
        unique_id: "PV Energy"
        state: "{{ (states('sensor.inverter_total_yield') | float) - (states('sensor.battery_total_discharge') | float) + (states('sensor.battery_total_charge') | float)}}"
        device_class: energy      
        state_class: total
        unit_of_measurement: kWh

Add this as a template and use it instead

Is there any solution for connecting two Huawei inverters to home assistant if a connection between them is in cascade? master is with a dongle which has wifi or LAN connection?

for now I can only see and read all data from master inverter and metar .Thanks

This is the same code that I posted.

Need a little bit of help.
One of my inverters constantly disables the IP integration so I do not have access (I think it my provider that monitor everything is doing something)

So I bought a EW11 and connected it following this guide: Connecting to the inverter · wlcrs/huawei_solar Wiki · GitHub

But I can’t get any data the integration fails to read data from the Inverter thru EW11.
When running QModMaster I can read register 30000 sometimes, I can have 4-5 timeouts then I get the values.

The setup is 2 inverters a battery and a backupbox connected to this ModBus.
If I try to read battery data 37762 I get it after a few tries.
Can I do anything to either set more tries or anything on the EW11 to get it working better

Log from the setup

Error setting up entry SUN2000-4KTL-L1 for huawei_solar
16:00:28 – (ERROR) Huawei Solar (custom integration)
Aborting client creation due to error.
16:00:28 – (ERROR) /usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py
Config entry 'SUN2000-4KTL-L1' for huawei_solar integration not ready yet: Failed to read register 30071 after 6 tries; Retrying in background
15:59:55 – (WARNING) config_entries.py - message first occurred at 15:03:09 and shows up 2 times
Giving up _do_read(...) after 6 tries (asyncio.exceptions.TimeoutError)
15:59:55 – (ERROR) Huawei Solar (custom integration) - message first occurred at 15:03:09 and shows up 8 times
Aborting client creation due to error.
15:16:53 – (ERROR) /usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py - message first occurred at 15:13:41 and shows up 5 times
Modbus client is not connected to the inverter.
15:16:53 – (ERROR) /usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py - message first occurred at 07:20:41 and shows up 6 times
Failed to connect:
15:16:52 – (WARNING) Huawei Solar (custom integration) - message first occurred at 15:14:19 and shows up 4 times
Failed to connect:
15:13:40 – (WARNING) Huawei Solar (custom integration)
Aborting client creation due to error.
15:04:20 – (ERROR) /usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py - message first occurred at 07:44:27 and shows up 8 times
Got error Failed to read register 47000 after 6 tries while trying to determine battery.
15:04:20 – (ERROR) /usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py
Failed to read register 43006 after 6 tries
14:58:31 – (ERROR) Huawei Solar (custom integration) - message first occurred at 07:44:27 and shows up 7 times
Giving up _do_read(...) after 6 tries (asyncio.exceptions.TimeoutError)
14:58:31 – (ERROR) Huawei Solar (custom integration) - message first occurred at 07:44:27 and shows up 7 times
Giving up _do_login(...) after 4 tries (asyncio.exceptions.TimeoutError)
07:40:16 – (ERROR) Huawei Solar (custom integration) - message first occurred at 18 September 2023 at 18:50:45 and shows up 2156 times
Timeout fetching HV2140011391_data_update_coordinator data
07:08:31 – (ERROR) Huawei Solar (custom integration)
Config entry 'SUN2000-4KTL-L1' for huawei_solar integration not ready yet: Failed to login after 4 tries; Retrying in background
18 September 2023 at 18:50:45 – (WARNING) config_entries.py

Hey all in the group. Just thought I’d report that I got the integration working OK. To me the dongle is extremely stable. Im sure it has a lot to do with your router rater than the dongle itself. This is my screen so far. Unfortunately I do not have usage metrics and return to grid metrics to report so this is it for now unless anyone has some suggestions. At this stage there is no point using HA energy tab. I plan to install the Huawei meter in the switchboard which should yield further metrics.

Thinking about it, the only thing I can add is you need to have an installers account when you log into the unit using the SUN2000 app. That’s the only place you can turn on the necessary levels to access Modbus data correctly I believe ar at least I couldn’t find them in the FusionSolar app.

EDIT: If you want rock solid performance after modifying any parameters with the SUN2000 app, make sure you go to Communications Settings/Router and enter the password to your router into the inverter again. That should guarantee rock solid performance.

6 Likes