Integration Solar inverter huawei 2000L

Probably it’s because you have now 2 dhcp servers active on 192.168.1.x : Home and Inverter.
And your home router is also found on 192.168.1.1 ?
Unplug your homenetwork from the socket and try again.

The home router is 192.168.1.254
The repeater is .1.1 (dhcp disabled)
The inverter. 1.100

Can the internal inverter WiFi be a client?

Yes, that’s how its connecting to the portal in my setup

“The repeater is .1.1 (dhcp disabled)”

The app is trying to connect to 1.1 …

Quick update from my side: I now managed to setup Openwrt so that I can connect to the inverter via the TP-Link router using python with the following commands:

>>> inverter = huawei_solar.HuaweiSolar('192.168.178.30',6607)
>>> inverter.get("model_name")

The inverter does report back the inverter name. So far so good. However, I cannot setup the HA component using the IP and port from above. When I enter the data into the configuration window and hit “submit” then I get the following message:

The log shows the following error message:

Does anyone have an idea why I can connect to the inverter in python but the component fails?

Quick follow-up: I think connecting directly to the inverter via its internal Wifi doesn’t work with cascaded inverters. With the direct connection to the inverter, one can only read data from this specific inverter and not from a cascaded one. That would require a separate connection (and of course a modified integration which could support multiple IPs)…

2nd follow-up: It is indeed as described above. With the direct connection to the inverter Wifi I can use the integration only with slave id 0 and get data only from this specific inverter. It is not possible to read data from the cascaded inverter. So I would need a second router to connect to the second inverter Wifi directly… What a mess…

I use the qrcode… And it says it’s impossible to connect…

Do do I change it on app? Reinstall it?
Thanks for your help

The qrcode points to the default setup. Try to manually connect : pick your inverter from the list and/or manually connect your phone to the inverter AP
(make sure you unplug that repeater first)

Does anyone has experience with file transfer over modbus tcp ?
I believe it should be possible to download the log file from the inverter this way. (and maybe the portal gets the historical data in that way)

I found this reply on the web about it :

Guys, if you’re having trouble with connection to internal wifi - make sure which inverter firmware you are using. Depending on this the port would be 502 or 6607 !
Also check if you changed the slave ID for connection. It differ for inverter/dongle !!!

Yes, I am using both at the same time:

  • internal wifi for my local monitoring (bonus: it is working even when huawei cloud is not available)
  • the dongle is sending the data to the FusionSolar

It doesn’t interfere with each other. You can use both and it doesn’t harm.
Btw: I could also use the dongle (instead of internal wifi) for collecting data, but as I said earlier - this is not reliable connection
I’ve reported this problem to huawei here: https://forum.huawei.com/enterprise/en/is-it-possible-to-make-usb-dongle-tcp-modbus-as-fast-reliable-as-rs-485/thread/822261-100027

I am not 100% sure but I’d suggest that your router act as a DHCP client for the inverter network segment. I know that the inverter doesn’t respond to me (even with valid IP) if prior to this an address was not requested from SUN2000’s DHCP server.

Yes - I would recommend that you are using Modbus TCP port either from internal wifi or dongle. Not both at the same time. The dongle can be connected but only for feeding FusionSolar.
Make sure that you have the iptables rules correctly set.

How (by which) inverter connection it is working without dongle? I am saying FusionSolar, not HomeAssistant.

You can also try to “Forget” the network if you are using android.

Ok, but you first need to know in which registers are that archived data/file (if this is possible with modbus). Then also a structure of this file. I am not sure if modbus is used for this. AFAIK the dongle is using it’s own protocol to talk to the inverter (it’s directly connected via USB). It can then retrieve the data and upload it to the FusionSolar.

1 Like

With the dongle in my hand (not used), HA is retrieving data from the inverter and the portal is showing data/connected… I’m not kidding
The inverter gets an IP address from my home network and HA is connected to its AP

Was it a fresh data? Was it changing?

image

Its been online sinds I allowed it to be when I made my first post about it this morning

image

That’s why I believe it can be retreived using modbus, because my dongle isn’t inserted…

No idea! Maybe you have some other devices in your setup which are feeding the FusionSolar… I don’t get it :slight_smile:

Nope, definetly.

It also tries to connect sometimes with this mac address :

image

Thanks for the input. My problem (as stated in my post above) however is, that I have two cascaded inverters. Connecting to the Wifi of one of my inverters, I can only read data from the inverter to which I’m connected directly as well as the power meter and the battery which is connected to this inverter. It is not possible to read data from the (second) cascaded inverter.

What I have done now is, I setup two instances of the HA integration. One reads data via the router directly connected to the inverter Wifi of my first (master) inverter. Here I get the data for this inverter, the battery and the power meter. And then I setup a second instance which connects to the dongle and only reads the data from the second inverter. Not ideal, but when only reading the data of a single inverter, the dongle can handle it much better than reading the data from 2 inverters, the battery and the power meter all together. I get no connection dropouts anymore and the data is much more reliable.

If I wanted to read data only via the inverter Wifis, then I would need a second router connecting to the Wifi of my second inverter and then I could read the data from both inverters without the dongle using 2 separate routers. Maybe I’m going to give this a try later. For now, the combination of the dongle and the direct connection is working fine.

1 Like

Hi @ffm777. How did you solve the problem “Reading from the inverter failed.”?

I am stuck at that for days. The IP is correct, the port is open, but, the exchanged data seems to be incorrect…

Thanks!

Hi Bert, I highly doubt that Modbus-TCP would be used to communicate between the inverter and the Huawei FusionSolar Cloud. Modbus-TCP is typically used for very local applications, but is not suitable for communicating over the web.

They will most probably just use a custom HTTP-endpoint to which the inverters upload their data with a proprietary, private data format. I don’t think your investigation in this direction will lead you anywhere.

Either use the OpenAPI endpoint to fetch the historical data from the Huawei Cloud, or investigate if you can download the data via the “Device Commissioning” part of the FusionSolar app. If that is the case, then we can do some packet inspection to find the correct Modbus-commands to download the information.

Well, I reply myself…

I uninstalled the Huawei Solar Integration, restarted HA, installed it again and it worked :slight_smile:

1 Like

This is exactly what I had in mind

I upgraded the dongle to SPC127 and the modbus works perfectly on Wifi dongle. I used Huawei Solar Integration 0.5.1