Integration Solar inverter huawei 2000L

Can the login-and-write branch also be installed by just copying the files from the login-and-write branch on github into the custom_components/huawei_solar folder in my HA installation and then restarting HA + reinstalling the integration?

Yes. It doesnā€™t matter how you get the correct files in the correct place. But I donā€™t think GitHub letā€™s you download a whole branch easily. I just offered the easiest way.

1 Like

I readed MODBUS TCP Guide - Huawei Enterprise Support Community
and updated sdongle to: V100R001C00SPC124 and inverter V100R001C00SPC140. After that I turned on mbus tcp. Error:
2022-01-31 22:11:39 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Connecting to 192.168.8.122:502.

2022-01-31 22:11:39 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Connecting.

2022-01-31 22:11:39 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Client connected to modbus server

2022-01-31 22:11:39 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol made connection.

2022-01-31 22:11:39 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Connected to 192.168.8.122:502.

2022-01-31 22:11:40 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 43006

2022-01-31 22:11:40 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x1 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1

2022-01-31 22:11:40 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 1

2022-01-31 22:11:43 INFO (MainThread) [backoff] Backing off _do_read(ā€¦) for 2.0s (asyncio.exceptions.TimeoutError)

2022-01-31 22:11:43 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 1 tries

2022-01-31 22:11:45 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x2 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1

2022-01-31 22:11:45 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 2

2022-01-31 22:11:48 INFO (MainThread) [backoff] Backing off _do_read(ā€¦) for 2.0s (asyncio.exceptions.TimeoutError)

2022-01-31 22:11:48 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 2 tries

2022-01-31 22:11:50 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x3 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1

2022-01-31 22:11:50 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 3

2022-01-31 22:11:53 INFO (MainThread) [backoff] Backing off _do_read(ā€¦) for 2.0s (asyncio.exceptions.TimeoutError)

2022-01-31 22:11:53 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 3 tries

2022-01-31 22:11:55 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x4 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1

2022-01-31 22:11:55 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 4

2022-01-31 22:11:58 INFO (MainThread) [backoff] Backing off _do_read(ā€¦) for 2.0s (asyncio.exceptions.TimeoutError)

2022-01-31 22:11:58 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 4 tries

2022-01-31 22:12:00 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x5 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1

2022-01-31 22:12:00 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 5

2022-01-31 22:12:03 ERROR (MainThread) [backoff] Giving up _do_read(ā€¦) after 5 tries (asyncio.exceptions.TimeoutError)

Ok Itā€™s working now I updated MBUS on inverter

Hi Fistacho,

I have the exact same problem an log items. The difference is the firmware version of the sDongel. mine is: V100R001C00SPC127.

What version of the MBUS in the inverter do you have? I updated to V100R001C00SPC300 but it still doesnā€™t work.

Gr. EJ

Ok Itā€™s working now. I set the Slave Id to 1, then it worked.

Hi all. I will install Sun2000 6ktl this spring. I have 3 questions to point in the right direction:

  1. This component (Issues Ā· Emilv2/huawei_solar Ā· GitHub) is the main way to integrate it in homeassistant?
  2. S dongle is needed in order to connect it to that integration?
  3. It is suggested to get also the Huawei Smart power sensor or it is quite unuseful?

Thank you

  1. I think GitHub - wlcrs/huawei_solar at develop will be better and @wlcrs is trying to integrate it with HA out of box without installing custom component.
  2. You donā€™t need Sdongle, you can read data connecting to internal invetrer AP.
  3. It depends if you need it, with smart meter you can block exporting energy to grid or set limit. Iā€™m using smart meter only for statistics but I donā€™t regret extra money spent on this.
1 Like

Hi

Hoping i could get some help with this, i had the integration working until yesterday.
Now im getting this when i try to add the inverter.

2022-02-02 13:12:15 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Connecting to 192.168.0.109:502.
2022-02-02 13:12:15 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Connecting.
2022-02-02 13:12:15 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Client connected to modbus server
2022-02-02 13:12:15 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol made connection.
2022-02-02 13:12:15 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Connected to 192.168.0.109:502.
2022-02-02 13:12:16 DEBUG (MainThread) [huawei_solar.huawei_solar] Reading register 43006
2022-02-02 13:12:16 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x1 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1
2022-02-02 13:12:16 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 1
2022-02-02 13:12:19 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-02-02 13:12:19 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 1 tries
2022-02-02 13:12:21 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x2 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1
2022-02-02 13:12:21 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 2
2022-02-02 13:12:24 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-02-02 13:12:24 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 2 tries
2022-02-02 13:12:26 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x3 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1
2022-02-02 13:12:26 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 3
2022-02-02 13:12:29 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-02-02 13:12:29 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 3 tries
2022-02-02 13:12:31 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x4 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1
2022-02-02 13:12:31 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 4
2022-02-02 13:12:34 INFO (MainThread) [backoff] Backing off _do_read(...) for 2.0s (asyncio.exceptions.TimeoutError)
2022-02-02 13:12:34 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off reading for 2.0 seconds after 4 tries
2022-02-02 13:12:36 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] send: 0x0 0x5 0x0 0x0 0x0 0x6 0x0 0x3 0xa7 0xfe 0x0 0x1
2022-02-02 13:12:36 DEBUG (MainThread) [pymodbus.transaction] Adding transaction 5
2022-02-02 13:12:39 ERROR (MainThread) [backoff] Giving up _do_read(...) after 5 tries (asyncio.exceptions.TimeoutError)

Hi Thijs,

Yesterday I managed to get it to work with the SDongle.
I would also like to see the data of all optimizers, can this be activated? I canā€™t find if and how to activate this.
According to sensor.optimizers_online, all 18 were online today.

Can you help me, or am I looking for something that isnā€™t there?

While the integration was able to setup the initial connection to the Huawei Inverter, it did not respond to any queries in time. This is probably caused by using the wrong slave ID (typically 0 or 1, try both or ask your installer if unsure).

Hi Erikjan, the optimizer data is not easily accessible like the other fields that I query. I need to implement some kind of custom ā€œdownloadā€-protocol over Modbus to get to that information (they confusingly call it ā€œUploadā€ in their documentation because it uploads data from the inverter to the client I guess?)

Itā€™s on my todo-list, but I want to polish the existing features first before I implement anything new.

FYI: the optimizer data is only refreshed every 5 minutes. If I get around to implementing this feature, it wonā€™t be realtime like the rest of the data fields.

Hi Thijs,

Thanks for your reply and confirmation that Iā€™m looking for something that isnā€™t there at all.

It would be great if it is added in the future, Iā€™ll wait patiently :wink:

Thanks for the good job!

Thanks for the tip, i have tried ID from 0 to 16 now.
Sadly only the same in the log :frowning:
Anything else i can test? Or anything i need to do in the inverter or dongle settings?

2022-02-02 20:24:12 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Waiting 100 ms before next connection attempt.
2022-02-02 20:24:12 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Connecting.
2022-02-02 20:24:12 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Client connected to modbus server
2022-02-02 20:24:12 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol made connection.
2022-02-02 20:24:12 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Connected to 192.168.0.109:502.
2022-02-02 20:24:12 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Client disconnected from modbus server: None
2022-02-02 20:24:12 INFO (MainThread) [pymodbus.client.asynchronous.async_io] Protocol lost connection.
2022-02-02 20:24:12 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Waiting 100 ms before next connection attempt.
2022-02-02 20:24:12 DEBUG (MainThread) [pymodbus.client.asynchronous.async_io] Connecting

I got it working :slight_smile:
Removed the integration from HACS, and reinstalled it, used Slave ID 1, and it worked. Thank you!

1 Like

i just saw that there is an update available for the integration in HACS. Does this update already include the login and write features?

No, I just added some info to the readme, which triggered a false update notification. Iā€™ll switch to proper releases with version numbers for the next update.

1 Like

After the last update of wlcrs integration broke my connection to the inverter, I have been trying to get it back up and running. In the previous version I was connecting to the smart dongle IP 192.168.1.x on port 502, with the latest integration update that no longer worked and after troubleshooting I found it started working again after connecting to the internal AP 192.168.200.1 on port 6607. Did Huawei change something on the inverter side or was it a change in the integration that required a different port and AP device to be used?

I am trying to use the Utility Meter functionality to get the daily grid consumption and grid exported values instead of running totals. Iā€™m using the following my configuration.yaml and have added the daily grid consumption sensor to my energy dashboard, but when I go to add the daily grid exported sensor, it isnt in the list to select it, and doesnt appear to have been created as I cannot see it as an entity. Can anyone suggest why this might be? Thanks!

utility_meter:
  daily_energy_imported:
    source: sensor.grid_consumption
    name: daily grid consumption
    cycle: daily
  daily_energy_exported:    
    source: sensor.grid_exported
    name: daily grid exported
    cycle: daily

The integration will happily talk to the inverter on any port it answers on. It was Huawei that chose to change to port :frowning:

wrt the utility meters: are you creating them solely for the Energy dashboard? That is entirely unneccessary as HA will automatically detect how to interpret sensor.grid_exported and sensor.grid_consumption. You can also find the daily values there without having to add utility_meter entities yourself. I donā€™t see an obvious error in your YAML, does the log give any clues on why it canā€™t create the second utility meter?