I want to share what I found out regarding monitoring Huawei SUN2000 inverter using a Modbus/TCP method during my half-year journey with this inverter.
Let’s start with some basics first:
The inverter has internal WiFi access point built-in on its mother board. The main purpose for this is surely the initial configuration by an installer.
My inverter also comes with a bundled USB dongle called SDongleA-05 / WLAN-FE:
Main purpose of this dongle is to connect to Huawei’s FusionSolar cloud service and feed the data using internet connection. It is handling an ethernet cable connection or a WiFi to your home router.
Monitoring the device
The FusionSolar cloud service is not bad, but I was hoping to connect to the device itself to be able to collect live parameters and plot it on Grafana (even when FusionSolar is offline).
Hopefully the inverter has the ability to expose the data using a Modbus protocol. There are three choices I am aware of:
- Dedicated RS-485 connection from the inverter
- Internal WiFi
- USB dongle (WiFi/Ethernet)
I have the ethernet cable routed to my inverter mounting place so a natural way of connecting it was using a dongle. Initially the dongle was not exposing the Modbus/TCP port, I had to upgrade a firmware. After the upgrade the 502 TCP port was open for communication (note: you need to explicitly enable this port on newest inverter/dongle firmware combinations).
Finally I was able to monitor my device using this #3 method.
More I was using the dongle, the more I was annoyed about the quality of the measurements. First of all reading a complete set of parameters took even roughly 20 seconds!
Mainly the reading was errorless, but overall when looking at a whole day, I noticed some significant error rate, especially in the early morning. Looking at the logs the following was not unusual picture:
Overall, I was not happy with all this. I was even thinking that maybe the inverter itself is the one to blame (doing some daily tasks).
Additionally when there was a upgrade time of a FusionSolar infrastructure and a downtime for the service, the dongle has even more problems:
I think it is configured that when there is no connection it is automatically rebooting itself in some specified time-intervals (probably to recover connection). I don’t need to say that every such a reboot is a gap in data collection 🙁
After some longer period testing new inverter and dongle firmware versions and waiting for Huawei to eventually fix this… I finally get tired of looking at the errors and returned to the roots: using a #2 method: connecting using internal WiFi (note: the inverter is currently using a new port 6607 instead of 502).
Despite the additional hardware (access point) near the inverter I am really impressed for new connection method comparing the old one. First of all the complete set of parameters are read in roughly 5 seconds instead of 20!
I think that the following graph is self-explanatory:
Moreover – my error log is totally clear!!! I have no lags/retries when reading the inverter data during whole day.
If you have a choice and want fast, stable and reliable TCP Modbus connection to the inverter use method #2 (internal WiFi).
As the RS-485 (method #1) is the industry standard, I believe it is also fast and reliable (but I don’t have a chance to test it myself yet).
If you are OK with the timings and don’t want to mess with additional WiFi client configuration – use an USB Dongle, but keep in mind that it is not the best, fast and reliable Modbus connection available. I think this is because the Dongle was designed with FusionSolar in mind and the Modbus is just an added feature (sadly with Huawei’s low priority).
I think you can speed up your reading frequency even more if you read multiple registers per modbus-request, instead of going through them one by one. I’ve implemented this in the huawei-solar Python library: https://gitlab.com/Emilv2/huawei-solar/-/blob/develop/src/huawei_solar/huawei_solar.py#L148 .
Oh, really great tip, thank you 🙂
I’ll consider this…
I am having already two older Huawei inverters up and running and using method #1 to monitor the data.
The inverter is connected to a Raspberry Pi with a USB-RS485 converter. On the raspberry, I am running telegraf to read the modbus data to an influx database (1 second interval).
Finally, I present the data in some Grafana dashboards. This method is working really well without any outages since almost a year.
However, for my new PV plant I got a new Huawei inverter, including the same smart dongle as you have. My initial plan was to use modbus TCP with the smart dongle. But after reading your experiences, I will stick with my old monitoring-setup. Thanks for saving me a lot of trouble!
Thanks for your feedback 🙂
So we now have the confirmation that the RS-485 is also OK.
Are you able to share your setup and config? and perhaps the grafana dashboard export as I’m also looking to set up the same config.
I assume you are asking @juergen, right?
I am not using home assistant.
Hello Jürgen can you please share the instruction, how did you managed to create a communication to the Huawei inverter? Which pins did you used on inverter for RS485? I can’t create a communication to RPI. I use a USB to RS485 converter with RPI. Regards Waldemar
I would like to get in touch with you to receive some clarification about my diffulties setting some parameters to my Axpert VII-5000 programmatically (via USB following the RS-232 protocol).
In the specific if I send the command: “PBDV52.0” I do not receive (ACK or (NAK but the same command I sent… do you know why?
Thanks in advance
No idea 🙁
Moreover I don’t own the Axpert VII and I don’t know this protocol – sorry – you need to ask elsewhere…
I have the same setup as you (Huawei SUN2000 inverter + SDongleA-05, and just using the ethernet connection atm). I just enabled ModBus on the inverter but I am not seeing any open ports.
Did you have to make an additional change to open port 502 (or 6607)?
Does the dongle have its own IP which I need to connect to, or do I use the inverter’s IP?
Do you mind sharing you current firmware version of the dongle, and how you upgraded it?
Thanks in advance for any help or tips.
1. Yes the article is linked in this blog post. I mean this: https://forum.huawei.com/enterprise/en/modbus-tcp-guide/thread/789585-100027
2. Yes the dongle has its own IP (no matter if it is connected via Wifi/LAN). Inverter IP is a different thing (different IP) because internal WiFi is a DHCP-Server, while dongle is DHCP-client (if IP is not configured manually).
3. My current firmware:
I am using fusion solar for upgrade: https://skyboo.net/2021/09/how-to-do-a-firmware-upgrade-using-fusionsolar/
If you don’t have the installer account you can do it manually using a zip-file from the FusionSolar app for your smartphone.
Thanks you, I spent 1 week fighting with the inverter until I read the magic number 6607.
You are great!
Thanks for your great guides ….
Soon I will apply the choice you recommended, regarding this I wanted to ask you what was your hardware configuration to use Home assistant ….. you use a raspberry, or an X86 solution.
My intention would be to use a mini-itx X86 which, however, does not have a Wi-Fi connection and I was wondering if a normal usb-wifi key was sufficient and compatible
Hi. I am not using home assistant. I am using hard (https://github.com/manio/hard). It is running on raspberry pi.
Any wifi should be ok for you… 🙂
Hi Manio … thank you very much for your guidance.
I wanted to ask you what type of hardware you use for inverter monitoring, and the type of connection you use for reading data from the inverter.
sorry for the double post …. the second question can be safely deleted ..
OK, I’m fighting with this thing now for 2 days. I get no internet connection. I have to connect myself via the SUN2000 WLAN. Once this is done I connect via the fusion solar app. The app says that I’m not connected to the management system. As user the router settings are not shown in the app. Therefore I can’t access my Wifi. As installer I can change the inverters’ own WLAN password, but can’t connect the my personal Wifi.
Nevertheless the app shows me, once connected via the SUN2000 Wifi, the current production of my PV. But to see this, I have to stand right in front of the inverter to see my production.
My question: How can I connect my inverter with the internet in order to see from all over the world my production? Do I need an dongle?
I’m really pissed off, that this is kinda rocket science….
From what I understand you are probably only looking at current production (directly connected to inverter). Yes, you need a dongle if you want a fusion solar web management (visible from all over the world).
I Manio. I have a similar problem of Marc. But I have already the dongle connected to the inverter. The strange thing is that the first time I have installed the inverter, it was connected to the communication system, but after few minutes the dongle started to blink green and red and it was impossible to reconnect the inverter with the communication system. When I try, the system tells “Connetc the dongle”, but the dongle is already connected. It could depend on the parameters settings of the modem? I need to open any port on the modem? The dongle is cable-connected to the modem.
No idea what is wrong – I think you have to ask for help on forum or just directly the huawei support. Or you may also try to reset the inverter and/or dongle to default settings and try again (if you are advanced enough).
My wifi network seems to be polluted by the Sun2000 internal wifi.
Did you experiment the same issue ?
Greate post. I have the same installation you have, and I managed to get data from the inverter remotely via Modbus TCP/IP. My concern is regarding security because right now, I had to do a router port forwarding to be able to access the inverter from the outside. Did you managed to solve this kind of security issues?
This just depends on your network configuration. It should not be any problem if you properly separate it from the world. Network configuration is rather out of scope of this post. Just search internet how to properly configure firewall, VLANs etc…
Or if you need to access the data from the internet then you need to consider some VPN/SSH tunnel/whatever …
Hi, Has anyone ever encountered timeout issues with the USB dongle? Port 502 is opened for me to communicate with the dongle but for the life of me no communication happens. Every request times out.
I’m on a SUN2000-10KTL-M1 (SUN2000MA) with a sDonglea-05 running latest firmware (150 for Inverter 133 for dongle).
The dongle has a strong signal.
Ola, tenho um sun2000-10ktl-m1 com um sdonglea-05
Não consigo comunicar
A senha mudou
Alguem pode ajudar
hi, sorry for probably a trivial question, but a newbie here. is it possible to use sun-2000’s internal wifi module to connect to an external router network so i can use the solarfusion app anywhere i want or do i need the dongle for that? ty in advance
also if its not possible, why is that so?
From what I know: internal wifi is only for configuring the inverter (eg via fusionsolar app – but only from phone) or modbus (via TCP). If you want “truly” fusionsolar, I mean: real cloud service, then you need a dongle for this.