huawei_solar: [Bug]: Periodic Dropping of a slave inverter

Describe the issue

Periodically my slave 3 drops off. I have 1 master (0[dongle], 6[master],2[slave],3[slave]). I’m running b7 of this integration

Could it be a wiring issue?

Bescribe your Huawei Solar Setup

Inverter Type: 6KL1-1 Inverter Firmware version: 125 SDongle present: yes Power meter present: single phase Battery: LUNA2000 10kWh x 3 (2 on each inverter) Battery Firmware version: 130 afaik

How do you connect to the inverter?

Via the SDongle, wireless connection

Upload your Diagnostics File

config_entry-huawei_solar-e7dae940ac3400b9f936d9adb24424b7.json.txt

Upload your relevant debug logs

Logger: custom_components.huawei_solar
Source: helpers/update_coordinator.py:168
Integration: Huawei Solar
First occurred: 6 January 2023 at 08:11:11 (289 occurrences)
Last logged: 11:55:24

    Error fetching TA2270270016_data_update_coordinator data: Could not update TA2270270016 values: Modbus client is not connected to the inverter.
    Error fetching TA2270269658_data_update_coordinator data: Could not update TA2270269658 values: Got error while reading from register 32064 with length 52: Exception Response(131, 3, IllegalAddress)
    Timeout fetching TA2270269658_data_update_coordinator data
    Timeout fetching TA2270270016_data_update_coordinator data
    Timeout fetching 102180067169_data_update_coordinator data


### Please confirm the following:

- [X] The problem is still present in the latest release of this integration.
- [X] I did not find an existing issue describing this problem.
- [X] I did upload the diagnostics-file that I could retrieve from  the 'Devices & Services Page'
- [X] I increased the logging configuration, restarted HA, and have copied all relevant log lines from the 'Full Logs' into the textarea.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 93 (68 by maintainers)

Most upvoted comments

I think the problem is located at Huawei side. Linux embedded at inverter is unable to properly close something (could be sockets but there are no established or time-wait sockets at homeasssitant side, so I think could be files) when there are connection failures (micro-shorts) and this provokes that onboard software is unable to connect with FusionSolar cloud due to out of filedescriptors (also used for TCP sockets).

Two ways to recover.

  • Stop huawei_solar for a pair of minutes (this way all filedescriptors are liberated)
  • Restart inverter.

By curiosity, when nobody is at home, this problem is much less frequent (for example, on my holidays season). My hypothesis is that in this case there are much less interference and so much less errors and so not many open files. Stopping huawei_solar integration sometimes is not enough and as soon as integration is enabled, connection is lost again.

Sometimes huawei_solar is not working but yes FusionSolar. Sometimes FusionSolar is not working but yes huawei_solar. And sometimes none of them. If you only maintain FusionSolar, everything works properly.

In my case, I’ve a mesh wifi. Inverter regular wifi interface is connected to this wifi. And I’ve a LAN to Wifi bridge in order to connect to Inverter hotspot to access modbus used by integration. So, same problem with two different interfaces in different wifi networks… problem must be at inverter side. And before an specific version (SPC107 or so, i dont remember) everything was working properly, both huawei_solar and fusionsolar.

John, you’ve gone above and beyond. I have no suggestions left on what else you (or I) could do.

Your conclusion is not really satisfactory, but it is the correct one I guess 😕

I deem it highly likely that this can indeed solve the intermittent connection drops. It makes economic sense to put a processor in the SDongleA is just powerful enough to feed the data of a few inverters to the cloud, but not much else. I guess they didn’t take into account a 3rd party doing a lot of querying as well.

It’s very likely that this will be the outcome of this issue: there is a tradeoff between stability of the connection between integration and the SDongleA vs it also uploading to the FusionSolar cloud.

However, it’s up to you if you’re OK with losing access to the FusionSolar cloud features.

Are you connected to solar fusion cloud? I think that the issue is double data stream. If i disconnect my inverter from cloud the integration works well.

The inverters do connect to the solar fusion cloud and need to for redundancy, firmware updates etc.

“Double data stream” is confirmed as an issue or is this a hypothesis?

This is what i, and some friends, have notice. If you disconnect your inverter from wlan and cloud the integration works well. I think that the inverter have resources for only one stream.

At the Moment i am working at a data web scraper from solar fusion panel.

@wlcrs have modified manifest.json and restarted HA.

I’ll report back in a few days.

Side note: I replaced a PoE switch on my network today, it’s unlikely that it will have any impact but it’s worth noting.

After upgrade to 1.2.6b6, Fusionsolar keeps disconnecting. So, didn’t work, unfortunately.

My current configuration is:

  • AP in client mode connected to Huawei inverter wifi. Port NATting applied. 4 meters away from inverter, no obstacles.
  • AP connected via ethernet to local LAN. So, working like a ethernet to wifi router.

So, should not be related with connectivity issues.

My theory is some kind of bug at inverter side that keeps TCP connections in a NON-CLOSE status that eventually affects both huawei_solar and fusionsolar connectivity.

Please try with 2 seconds. With two seconds is working for me.

Thank you for your clear reporting.

Can you enable debug logging for a while on this integration (available in the same menu where you fetched the diagnostics file). Once the problem has presented itself you can disable it again and upload the resulting file.

note that I’m getting Connection refused, not authentication failed but I’ll try admin/admin

I tried using the example automation but that didn’t work.

Make sure that the target entity_id exists. The naming of entities has changed due to HA policy changes, so it depends on when you first installed the integration. You can use the Developer Tools -> Services to make a valid automation action:

image

You’ll need to add an entity from every inverter that you have

After clicking on YAML Mode you will receive the yaml code to use:

image