Integration Solar inverter huawei 2000L

For the house power consumption, I do:
house power consumption = inverter active power - power meter active power

But for some reason this gives a very noisy approximation.
For example, in the graph below, the sun came through the clouds between 5:30 and 5:45, so the inverter power increases significantly. However no extra device was turned on inside the house, so the house power consumption (blue line, calculated using the above formula) should have been an almost straight horizontal line (which it clearly isnā€™t).

Anyone any idea of why this is happening?

1 Like

Hello

I get alle the time this Error in Log

`Logger: pymodbus.client.asynchronous.async_io
Source: /usr/local/lib/python3.10/site-packages/pymodbus/client/asynchronous/async_io/init.py:307
First occurred: 19:12:49 (26 occurrences)
Last logged: 19:31:42

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: Multiple exceptions: [Errno 111] Connect call failed (ā€™::1ā€™, 502, 0, 0), [Errno 111] Connect call failed (ā€˜127.0.0.1ā€™, 502)`

Anyone know how to solve this or can I ignore it?

Found it, luckily I kept the box left by the installer.
Just completed the connection and deleted/added my inverter again in HA.
All seems to be working fine, thanks for all your work!

Clipboard01

2 Likes

hello

can you show me the code?

thanks

Add a template sensor to your configuration.yaml:

template:
  - sensor:
    - name: "House power Consumption"
      unique_id: "house_power_consumption"
      unit_of_measurement: "W"
      device_class: power
      state_class: measurement
      state: >
        {% set meter_power = states('sensor.power_meter_active_power') | float %}
        {% set inverter_power = states('sensor.inverter_active_power') | float %}
        {{ (inverter_power - meter_power )  | float(0) }}
2 Likes

Thank you soo much !!

with your code, iā€™ve made another

template:
  - sensor:
    - name: "Overproduction Companny Injection"
      unique_id: "solar_power_Overproduction"
      unit_of_measurement: "W"
      device_class: power
      state_class: measurement
      state: >
        {% set meter_power = states('sensor.house_power_consumption') | float %}
        {% set inverter_power = states('sensor.inverter_input_power') | float %}
        {{ (inverter_power - meter_power )  | float(0) }}

What is the simply way to update the integration? thank you

Hello and thanks for a fantastic integration!
Iā€™m currently using it with the dongle config and calling services through a flow in Node Red.

I have a problem with the service forcible_charge_soc, it times out and so the charging is not initiated.
Itā€™s working fine with the services stop_forcible_charge and forcible_charge_soc. Any ideas what the issue can be? Attaching log from HA

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/huawei_solar/services.py:139
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: September 6, 2022, 23:00:03 (1 occurrences)
Last logged: September 6, 2022, 23:00:03

[547714910768]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/huawei_solar/services.py", line 139, in forcible_charge_soc
    await bridge.set(rn.STORAGE_FORCIBLE_CHARGE_DISCHARGE_SETTING_MODE, 1)
  File "/usr/local/lib/python3.10/site-packages/huawei_solar/bridge.py", line 359, in set
    return await self.client.set(name, value, slave=self.slave_id)
  File "/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py", line 496, in set
    response = await self.write_registers(
  File "/usr/local/lib/python3.10/site-packages/huawei_solar/huawei_solar.py", line 520, in write_registers
    response = await self._client.protocol.write_registers(
  File "/usr/local/lib/python3.10/site-packages/pymodbus/client/asynchronous/async_io/__init__.py", line 35, in execute
    resp = await asyncio.wait_for(req, timeout=self._timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

Feel free to submit a Bug report on the GitHub repo. Filling out that template will give me some extra information to investigate the issue.

Hey, I need help with upgrading the FW on my sun2000l-17ktl

I have the ā€œInstallerā€ account password but how do I connect to the inverter from my laptop? I can use the Energy dashboard with ā€œInstallerā€ account so I know it works. I have a user account (was given to me by the installer of the inverter) to fusionsolar and I have also registerd an installer account on another e-mail address but I cant add my inverter that account.
Do I need to disable my connection to HA when adding the inverter or how? Someone have a stupid simple guide on how to do this?

Maybe this helps?
https://skyboo.net/2021/09/how-to-do-a-firmware-upgrade-using-fusionsolar/

Unfortunately not, it describes how to do the upgrade but not how to login as ā€œInstallerā€

Stefan,

In case you donā€™t have the installer password, you can reset the inverter, (Resetting Password - SUN2000-(2KTL-6KTL)-L1 User Manual - Huawei. First time you logon the default installer pasword is 00000a and the you can chane the installer password

Regards

Geert

All,

After reading this complete topic, (itā€™s pretty long). Currently iā€™m accessing Inverter through internal WAN (192.168.200.1) with RPI in bridge mode. Also I can connect my test devices through this WLAN and connect to MODBUS to try some queries with qModMaster to check the values. Butā€¦, only device ID0 works. Problem is that ID0 is not allowed in my configā€¦ only 1-255.
I got SUN2000-4.6KTL-L1 Firmware: V200R001C00 and SW: V200R001C00SPC124, all up to date. Modbus is allowed, start from 1 unrestricted.

According DOC How to change modbus TCP salve id from 0 to 1 - Huawei Enterprise Support Community this is normal, HA doesnā€™t difficult to acces ID0?

Regards,

Hey Geert and thanks for the reply. I do have the Installer password, Iā€™m using it to connect to the inverter from my homeassistant hub.

But I cant login to the inverter? How do I do that? I can connect to the inverters wireless accespoint with my laptop but after that, what do I do? I have tried with the fusionsolar app but it wount work?

I wonder if someone can help me. Iā€™ve had the integration running flawlessly for several months now, but when my installers installed the Huawei system they changed the installer password to something which theyā€™re now reluctant to give me (since they say theyā€™ve used on all of their installed systemsā€¦despite me telling them that was bad practice).

Itā€™s not been an issue so far because itā€™s been summer here, but now as autumn comes and we want to command the battery to charge from the grid during off-peak times I apparently need the installer password to do that with the integration.

My option now is to reset the installer password, and this webpage tells me how to do it:
https://support.huawei.com/enterprise/en/doc/EDOC1100164794/ac862877/resetting-password

however I donā€™t know whether this resets anything other than the installer password and network settings? Iā€™d hate it to reset my entire solar kit and have to get them out again to reset it all. I can deal with the IP addressing as thatā€™s something I do as a job, but Iā€™d not know any solar parameters if it gets to that. Can anyone tell me whether thatā€™s the case?

Thanks,
Mike.

What is your communication? Sdongle, modbus, wlan?

wlan bro ^^

Via the wlan bridge to access to 192.168.200.1 huawei adress?

Hello, in that case you can use the integration without to use a WLAN bridge to connect to the inverter wifi 192.168.200.1 adress?
Why it is mentionned nowhere ?