Huawei SUN2000: why using a USB dongle for monitoring is not a good idea

Intro

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:

  1. Dedicated RS-485 connection from the inverter
  2. Internal WiFi
  3. 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.

Problems

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).

Results

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.

Conclusion

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).

Comments

  1. 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!

    1. 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.

    2. 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

  2. Hello Manio,
    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

    1. No idea 🙁
      Moreover I don’t own the Axpert VII and I don’t know this protocol – sorry – you need to ask elsewhere…

  3. Hi,

    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. 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:
      Inverter: V100R001C00SPC141
      Dongle: V100R001C00SPC127
      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.

  4. Hello Manio

    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

  5. 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.

  6. 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….

    Thanks!

    1. Hi
      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).

      1. 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.

        1. 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).

  7. Hello,
    My wifi network seems to be polluted by the Sun2000 internal wifi.
    Did you experiment the same issue ?
    Thanks

  8. Hello Manio,

    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?

    1. Hi João,
      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 …

  9. 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.

    1. Ola, tenho um sun2000-10ktl-m1 com um sdonglea-05
      Não consigo comunicar
      A senha mudou
      Alguem pode ajudar
      Obrigado

  10. 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

    1. 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.

  11. Hi,
    First off, thank you for your guide as well as the one on DD-WRT for port forwarding.
    My setup includes 2 SUN2000-10KTL-M1 inverters, a SUN2000 battery, and one (damn) SDongleA-05 dongle.
    I retrieve the data from the inverters (master on register 16 and slave on register 1, I’m not sure why it was set up this way) via Modbus-TCP through this dongle… and it’s absolutely not reliable!!

    I’m considering switching to a more robust solution, but having 2 inverters, I would therefore need to set up 2 routers.
    The 2 routers would be connected as a Wifi client on each inverter’s Wifi hotspot, and then I would need to forward the ports of these 2 routers onto my LAN… It’s a bit twisted, but I don’t really see how else to do it…
    Do you see another solution? Thank you.

  12. Hey Manio,

    Many thanks for sharing your nice HARD Rust code, I love it ! 🙂
    Playing around with you sun2000 part and hitting some issues indeed (on both the Dongle/Ethernet and the WiFI :/ ). It actually reads quite a lot, the Device model, the version, port protocol (P1.15-D5.0), SW version (V100R001C00SPC153), the C10/11 country code (EU/BE) which is correct, state_1/2/3… but then the registers reading always gives timeout :/
    Any idea ? I don’t believe I am hitting the same limitation you describe here above..but maybe it rings a bell ?
    I extended your HARD code for adding a new worker, reading the Belgian (ORES) SmartMeter for data collection in InfluxDB, it works nice.

    Thank you,

    Kind regards,
    BEn

    1. Hi Ben,
      Thank you very much, I am glad that this code is used not only in my specific case 🙂
      About your question, unfortunately I have no idea why the register reading is a problem. I didn’t get this kind of problems. It’s true that I sometimes have register read errors but it is a rare thing since I switched to internal AP.

      Just two tips:
      1. Isn’t it related with the “elevated permission”?
      Look eg here: https://community.home-assistant.io/t/integration-solar-inverter-huawei-2000l/132350/1938
      2. Amreo also forked my project, you can see his changes and probably inspire yourself:
      https://github.com/amreo/hard-sun2000-influxdb-datalogger

  13. Thanks for this post. How did you remove the dongle from the setup ? I physically removed it but it’s still seen by the system even after a reboot. Can we join the sun2000 to home wifi ? If yes I don’t see the value of the dongle…

    1. I didn’t. I still use it “as a backup” to the fusionsolar. You can join to the internal AP or using RS-485 and monitor the device yourself – you don’t need a dongle then.

      1. Ok thanks but I’m not able to join my wifi network because there is the dongle configuration instead in the quick setup… How did you achieve that ?

        Thanks !

          1. @Manio
            I Reader that with a sun2000L the internal wifi can be configured as client which would means that no bridge is needed. Do you have experience with that?

  14. Hello,

    How did you remove the Wifi dongle from the system ? I physically removed it and it’s still seen but offline… How to unconfigure it ?

    Thanks

  15. @Manio, I’m waking up an old thread here. Do you still connect through the internal AP? I’m trying to get a connection, but can only connect through the dongle, and I experience a very slow connection.

    1. Yes, I am still using this internal AP connection. Dongle is too slow and not reliable for me, while RS-485 cannot be used because dongle is utilizing the port internally.

Leave a Reply

Your email address will not be published. Required fields are marked *