logo elektroda
logo elektroda
X
logo elektroda

Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility

cegreg 29772 66
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 20195461
    migod
    Level 21  
    Hi,

    if someone else was struggling with this problem:
    1.new firmware have by default, modbus on wifi is turned off, so after each update the problem will come back
    2. a person with administrator privileges must connect to the inverter wifi network (SUN ***) and activate Modbus TCP in the inverter menu, it is not possible via the website. The FusionSolar application is used for configuration

    Full path:
    JA > Przekaz do instalacji > Konfiguracja komunikacji > Ustawienia parametrow klucza sprzetowego > Modbus TCP
    

    3.The default password for the installer account is 00000a (5 zeros + a), but for me it was changed by the company and lost
    4. For some time now, the min. Passwords up to 8 characters long

    Greetings, migod
  • ADVERTISEMENT
  • #32 20221566
    chkerim
    Level 3  
    Do you need to have / log in to the installer account to upgrade the firmware version?
    I understand that everything is done from the phone? Do the firmware files need to be downloaded in advance?
  • #33 20315377
    yunnanpl
    Level 2  
    Hello,
    I will try to add my 3 cents quickly, as I read and read data from the inverter in different ways.
    I have a SUN2000 4.6KTL L1, most likely with a smart dongle for Wifi (or maybe built-in wifi?).
    The inverter was sending all data to the Fusionolar portal from the beginning, connecting through my Wifi network
    However, downloading data from the portal is too slow for me (update every 2-3 minutes or something), besides, I don't like too many clouds, so I wanted to take this data directly (using pymodbus and throw it into homeassistant).

    First, I connected normally using the IP address (which the inverter got from my network), on port 502.
    This solution generally worked and I tried to keep modbus connected all the time, but the inverter sometimes disconnected and had a few minutes breaks.

    After installing a LUNA battery and a smartmeter connected with a modbus cable, it completely stopped working. That is, the inverter continues to connect to my wifi network and send data to the Fusionolar portal, but port 502 is closed, and there is no possibility to download data. I read somewhere that it's because the smartmeter "consumes" the modbus port that was previously available over IP (I'm not sure if it makes sense, but there is no connection, and nothing has changed). It is equally likely that the installer updated the firmware and the modbus port was closed.

    However, I have read that by connecting to the inverter's wifi (SUN2000-HVxxxxxx and password Changeme) it is still possible to extract this data.
    So I did, but at first it did not want to work ... until it turned out that apart from the fact that there is of course a different IP (the one that the inverter gives itself, because now it works as an access point) (the inverter's IP is now 192.168.200.1) but also the access port is different, now it is 6607.

    So connecting to the inverter WIFI with a separate wifi connection, and connecting pymodbus to address 192.168.200.1 on port 6607 works !!!
    Problem #52: Now, as before, I tried to keep the wifi connection and the modbus connection all the time... unfortunately, by keeping the modbus connection, it blocks the inverter from sending data to fusionsolar (so they are out of date and there are warnings).
    Similarly, when pymodbus is connected, the application on the phone will not connect either.
    Solution: Wifi is constantly connected, but the modbus connection is established only when needed, every 30 seconds, and then immediately disconnected (downloading data is not all 5 seconds). In this way, in the fusion solar portal, everything also appears beautifully, and I have fresh data every 30-40 seconds.

    
    ip_inverter="192.168.200.1"
    portnr=6607
    client = ModbusClient(ip_inverter, port=portnr, unit_id=0)
    client.connect()
    time.sleep(1)
    


    What is important for me is unit_id=0, and one second of sleep after connecting, because if it is not there, there are very often problems with reading registers.

    If I manage everything somehow, and someone is interested, I will post my script on github, because I have autodiscovery to homeassistant and sending mqtt.

    EDIT 1: I don't have access to the installer account at all... So I can't dig too much.

    EDIT 2: An alternative is the Modbus-ESP32 adapter on the cable, which means that all adventures with firmwares, wifi, etc. are out.
    Maybe even additionally, you can save some registers in the inverter via cable modbus (which is unlikely to be possible via wifi).
  • #34 20315411
    lizak1983
    Level 15  
    Isn't it easier to use a ready-made add-on for Home assistant - https://github.com/wlcrs/huawei_solar
    I use modbus tcp, i.e. to the built-in inverter ap and I've never had problems with sending to fusionsolar.
  • ADVERTISEMENT
  • #35 20315780
    chkerim
    Level 3  
    192.168.200.1 to port 6607
    This is an address from a different subnet (probably the inverter) than the LAN in which the Smart-dongle is visible.
    This means that the reading client (Modbus master) must also be in this subnet. If we want to do it, for example, from a laptop, we need to connect to the AP of the inverter, the matter gets complicated when we need access to resources from the LAN at the same time.
  • #36 20316959
    yunnanpl
    Level 2  
    @lizak1983 : Well ... this component really rocks. Mine had been working pretty well for 2 years, so I wasn't even looking for anything new. Which doesn't change the fact that I just switched to https://github.com/wlcrs/huawei_solar, so thanks a lot (I had to update HASS, which is usually associated with adventures for me).
    Let's say that about 2 years ago there was only this https://github.com/Emilv2/huawei_solar, because https://github.com/wlcrs/huawei_solar hasn't been created yet, so I was forced to build something of my own.

    However, I hope that someone will find my description useful, as I struggled with pymodbus a bit. As for sending data to Fusion Solar, since I disconnect the modbus connection (to give the inverter the ability to send data), there is no problem anymore.

    @chkerim: Indeed, sometimes it can be a problem. This IP is from the AP of the inverter (I think that's what I wrote earlier). I added a second wifi USB dongle after the case.
    The connection is much more stable than how the inverter connects to my grid. The normal home network is wired (or on another network card), so there are no problems (i.e., the home server is in two networks at the same time, the home network and the inverter network).
    The downside is that the inverter and the computer we want to read it must be at a reasonable distance for the wifi to be enough.
    The plus is that I don't have a wifi smart dongle, I only use this connection what is (at least that's what my fusionsolar says).

    P.S. @lizak1983 : Basically, your advice probably solved my other problem. I wanted the inverter to charge the batteries with grid current at night, as electricity is cheap (see tibber.de), but I didn't know how to approach it. It seems that this component can not only read data, but also control the inverter !!!
    Now I just have to force out the login and password for the installer account and voila :)
  • #37 20322594
    tradilus
    Level 5  
    [
    Quote:
    quote="yunnanpl"]Hello,
    I will try to add my 3 cents quickly, as I read and read data from the inverter in different ways.

    So connecting to the inverter WIFI with a separate wifi connection, and connecting pymodbus to address 192.168.200.1 on port 6607 works!!!
    Problem #52: Now, as before, I tried to keep the wifi connection and the modbus connection all the time... unfortunately, by keeping the modbus connection, it blocks the inverter from sending data to fusionsolar (so they are out of date and there are warnings).
    Similarly, when pymodbus is connected, the application on the phone will not connect either.
    Solution: Wifi is constantly connected, but the modbus connection is established only when needed, every 30 seconds and then immediately disconnected (downloading data is not all 5 seconds). In this way, in the fusion solar portal, everything also appears beautifully, and I have fresh data every 30-40 seconds.


    Interesting thread, and the problem appears in many places. I also have a problem with the connection via Modbus.
    My system is:
    SUN2000-8KTL-M1 (firmware V100R001C00SPC148) SDongle (firmware V100R001C00SPC130)
    SUN2000-3KTL-M1 inverter (firmware V100R001C00SPC148) - connected to the above in cascade
    SmartMeter
    Battery Luna 2000 (firmware V100R002C00SPC116)

    I asked a question on the Huawei service how to connect to wi-fi and received the following answer:

    "You cannot use modbus via wifi and still be able to have the inverter connected to fusionsolar so using an ethernet cable is recommended.
    You have to disable DHCP and put a static ip for the inverter and due to this you will not be able to connect the inverter to fusionsolar anymore."


    I asked for specifics and came a short proposal and 2 attachments
    "You must take the dongle out, connect ethernet cable to dongle from the router and plug the dongle back in then follow the attached procedures"

    I will be checking it soon (in the attachments it is described how to check if the right port is open using the ModbusPoll 64 app, but only when a new modem comes in for direct connection as a mesh system (because the system is outside the house) but I would still prefer to be able to connect via wifi (which seems to be blocking the FusionSolar App.) For now, I asked how to try to connect via wi-fi anyway and I'm waiting patiently...

    I will be very grateful for comments and ideas in this thread!

    // tradilus
  • #38 20322651
    lizak1983
    Level 15  
    As I mentioned earlier, I use https://github.com/wlcrs/huawei_solar to download data to Home assistant. My firmware version in the smart dongle has the ending 123. I just connected to this dongle (it was enough to enter the IP of the inverter in the network and the port and slave 1 in my case) to check if fusionsolar is really blocked and for me data is downloaded to Home Assistant and data in the cloud is updated. I have a SUN2000-8KTL-M0 + SmartMeter.
    In the case of a connection to a smart dongle, the slave id is usually equal to 1, and with a cascade connection of inverters, you additionally add the slave id of the others.
    I do not know how it is with the newer firmware in the smart dongle, but you definitely need to unlock communication via modbus tcp in the inverter settings.
  • #39 20322691
    tradilus
    Level 5  
    How did you sleep? Cable or wifi?
    The whole problem for me is from the beginning with HA and Huawei Solar, because when trying to connect via Wi-Fi, I enter the IP of the dongle and try channel 502 and 6607, changing the slave to 0, 1, 2 and even 3 and nothing happens. Usually at channel 502 there is "Connection to inverter failed", and at channel 6607 there is no error at all.

    Quote:
    I do not know how it is with the newer firmware in the smart dongle, but you definitely need to unlock communication via modbus tcp in the inverter settings.


    I did it (I have the installer password for both inverters) and unlocked as "Unrestricted".
  • #40 20322702
    lizak1983
    Level 15  
    I connected via WiFi to the smart dongle, for me it is 502 because I have older firmware, rather it will be 6607 for you. Have you checked what slave ID you have in the inverters in the settings? It may have been higher than 3.
  • ADVERTISEMENT
  • #41 20322709
    tradilus
    Level 5  
    lizak1983 wrote:
    I connected via WiFi to the smart dongle, for me it is 502 because I have older firmware, it will rather be 6607 for you. Have you checked what slave ID you have in the inverters in the settings? It may have been higher than 3.


    I understand that you connect via Huawei Solar integration via Home Assistant? That's right?
    I honestly admit that I do not know how to check what slave ID I have in the inverters. How?
  • #43 20322750
    tradilus
    Level 5  
    Well well! Another jigsaw puzzle - thanks! I'll try to check in the evening and if necessary, I'll describe what happened.
  • #44 20324076
    tradilus
    Level 5  
    tradilus wrote:
    Well well! Another jigsaw puzzle - thanks! I'll try to check in the evening and if necessary, I'll describe what happened.


    Unfortunately, it failed despite the fact that I am connected to the router with a cable, I can see the IP of the inverter, the ping responds without a problem. The ModbusPoll program, after entering the data according to the support proposal, gives the message "Write error" and "Read error". Huawei-Solar on HomeAssistant cannot be started.

    I already know what the slave of the controller is - it is the same number as the COM number in the RS 485_1 communication settings (in the menu where there is a Modbus and Baud rate selection) - it is described in the files from the support, which I sent above.

    So I wrote again to Huawei asking what's next...
  • #45 20324085
    lizak1983
    Level 15  
    The easiest way is to change the dongle's firmware to the one with the ending 123 and there are no restrictions regarding the connection via modbus.
  • #46 20324148
    tradilus
    Level 5  
    lizak1983 wrote:
    The easiest way is to change the dongle's firmware to the one with the ending 123 and there are no restrictions regarding the connection via modbus.


    All in all, I can give it a try. Does anyone have a link to this firmware version of the dongle?
  • #48 20325768
    tradilus
    Level 5  
    lizak1983 wrote:
    Here you are. After turning on the inverter, there is an additional network from the smart dongle for a few minutes, we connect to it, not to the network from the inverter and update there.


    Thanks for the file! I'll have it just in case, for now the service responded to my whining by sending a set of Modbus commands, and when I found out that the problem was that I couldn't read via Modbus Poll because there was a read/write error, they told me now

    "Please provide log files from the inverter and dongle."

    I got two files with instructions on how to dump these logs and I will do it tomorrow. I upload the files as a curiosity, because I have not seen them anywhere else.
  • #49 20335442
    yunnanpl
    Level 2  
    @tradilus As for blocking Fusion Solar, with a direct connection to the inverter's wifi and collecting data from modbus (ip 192.168.200.1 port 6607), Huawei is only partially right (I'm not talking here about connecting via smart dongle via wifi or cable, or about the connection that the inverter establishes with my grid). The only requirement for Fusion Solar to be up-to-date is that you have to disconnect from modbus regularly (which is not a problem at all as with collections of less than 5 seconds, you can easily have data every 20-30 seconds). There is even no need to disconnect from the inverter's wifi network (which wouldn't be a problem either).
    I've been using this solution for 2 years with no problems, and since Fusion Solar is updated every few minutes, the 1 minute delay was unnoticeable.

    Now I just ran wlcrs-huawei_solar for home assistant, using the inverter's wifi connection without a smart dongle. Problems with Fusion solar have reappeared, so this module keeps the connection all the time. This may be a requirement of this module as the data provided is very up-to-date.

    Modbus ID numbers may be different. An additional advantage of wlcrs-huawei_solar is that it actually pulls data from the inverter, battery and smart meter (which probably have different ID addresses and different data registers).
    I suspect the more devices, the more numbers.

    P.S. Now I'm struggling with wlcrs-huawei_solar, and at the moment I'm not able to recalculate the data in such a way that I have the same as what I have in Fusion Solar (then I can basically ignore fusion solar). For example, Total Yield subtracts what goes into the battery ... so it's not the total yield from the photovoltaics, but actually what went through the inverter to the house (and not what was left in the battery). I will fight ;) but it looks good, especially with this new Energy panel in Home Assistant.
  • #50 20335505
    tradilus
    Level 5  
    yunnanpl wrote:
    @tradilus As for blocking Fusion Solar, with a direct connection to the inverter's wifi and collecting data from modbus (ip 192.168.200.1 port 6607), Huawei is only partially right (I'm not talking here about connecting via a smart dongle via wifi or cable, or about the connection that the inverter establishes with my grid).


    Yes, but to understand why certain things happen, you need a little background information. Please write what your system looks like, because the problem may not lie in the inverter, but in the way of communication via LAN. How do you connect to the inverter's wifi and use HomeAssistant at the same time? How does it look in practice?

    In my case it is like this:
    LAN - 2 Asus routers forming a Mesh, one of them the main one in the house (ASUS1) and one in the guest house (ASUS2). With ASUS1, RaspPi with HomeAssistant is attached, and with the second ASUS2, this inverter is attached with a cable via a dongle. I'm sitting at the computer in the room and I see the IP of the dongle, the IP of the inverter (edit: I probably see the IP of the same device, i.e. the dongle, but one IP is for connecting wifi and the other via ethernet).

    COMPUTER
    + wifi
    + wifi
    ASUS1---ethernet---RaspPi (HomeAssistant)
    + wifi
    + wifi
    ASUS2 ---ethernet--- DONGLE+INVERTER

    Added after 2 [minutes]:

    lizak1983 wrote:
    You're welcome. After turning on the inverter, there is an additional network from the smart dongle for a few minutes, we connect to it, not to the network from the inverter and update there.


    Some news

    The Huawei service gave me some instructions, but they are chaotic and do not help. But lately it even seems like:

    - HuaweiSolar on HA sometimes works (it used to not work at all)
    - interestingly, the possibility of installing HuaweiSolar in HA appeared when I modified the home network to see the NAS (which was not visible after changing the router, for the curious, according to the instructions from this page https://kb.synology.com/pl-pl/DSM/tutorial /What_can_I_do_if_my_Synology_NAS_does_not_show_up_in_Network_in_Windows_File_Explorer),
    - it doesn't matter which dongle firmware version is installed (I checked 123, now I have 130 and there are no big differences)
    - connecting HuaweiSolar to HA causes the ModbusRead node with NodeRed not to connect to port 502, and when NodeRed is connected, for example, the Modbus control program (ModbusPoll or ModbusQuodMaster) does not connect, most likely only one thing can be connected to port 502 in same time
    - port 6607 is not responding at all as if it was wrong
    - reading attempts from Modbus show "0" (I sent screenshots to the service and they replied that they were analyzing)
  • #51 20384042
    tradilus
    Level 5  
    I'll be back for a while with a supplement.

    Well, everything has been working for several days without problems. I managed to run the HuaweiSolar integration in HomeAssistant, and the solution was to disable the "p1reader ESPHome" integration in HA used to support the device for recording data from the electric meter (https://www.zuidwijk.com/product/slimmmelezer-plus/). Nice toy, but it probably collided in HA with HuaweiSolar, because it reads the same data on imports, exports, currents, voltages of individual phases, etc.

    Summary (in my case)
    - HuaweiSolar integration requires uninterrupted access to the Modbus of the inverter for operation (even NodeRed in HA using Modbus port 502 may interfere with access)
    - the Modbus port should be made available by changing the parameters in the inverter connected to the dongle (appropriate firmware versions are required)
    - to change these parameters in the inverter, you must have access to the installer or ask the installer
    - LAN connection should be via Ethernet cable via dongle
    - in my case, the integration of HuaweiSolar did not require the installer's password, but maybe it's a deviation from the norm

    So much for my experience...
  • #52 20604526
    danandi
    Level 1  
    Hi everybody,
    Does anyone have the Modbus TCP table addresses for SUN2000-6KTL-M1 inverter? I can't find it and I need to read some registers.
    I've checked my IP port on 502 and is opened... so basically the reading should work but I can't find any official document on their website with the modbus addresses.
    Thank you.
  • #54 20624388
    gmacko
    Level 15  
    Something must have screwed up with the dongle or the inverter, because about a week ago the inverter stopped seeing the dongle, but surprisingly the dongle is visible through the router and the inverter sends data to the FusionSolar server.
    The problem is that Home Assistant integration can't call the dongle via MODBUS.
    I don't know what to do with it. It is impossible to upload the software to the dongle because the inverter cannot see it and cannot manage it. No dongle setting parameters are visible to SUN2000 apps.

    Is there any way to hard reset this dongle, some factory reset?

    Should I report directly to Huawei or through the installation company?

    Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility

    I read here that people report similar problems that they can't enable MODBUS in the dongle, but I don't have any dongle settings at all, even if I wanted to connect it to a new router network, I don't have these options.
    https://forum.huawei.com/enterprise/en/sun200.../thread/667239114606526464-667213868771979264

    UPDATE1:
    It's very strange, through the website I was able to reset and update the dongle to the previous v130 firmware. and everything reported as done, but the inverter still does not see this dongle in the USB port. However, the dongle itself works and connects, but you can't call it via MODBUS.
    I already took it out, restarted the inverter, put it back in. Nothing changes.

    Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility

    Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility
    Huawei SUN2000-6KTL-M1 Inverter: Modbus TCP & RS485-LAN Converter Compatibility
  • #55 20627179
    gmacko
    Level 15  

    Why is the service telling me that I shouldn't use the SUN2000 app to connect to the Fusion Solar inverter only?
    Nowhere in Fusion Solar is there an option to set the Dongle connection to WIFI and there are no RS485 communication settings. Am I missing something?
  • #56 20627211
    marcinszumilo
    Level 9  

    For me, on SUN2000-KTL8-M1, Modbus TCP works, but it is very slow, and I have pings at 600ms.
    Is it slow for you too? This already RTU is much faster - at least it should be.
    I'll switch to RTU soon and write if it made sense.
  • #57 20627925
    gmacko
    Level 15  

    But I'm a dummy.
    I was using the SUN2000 app, but it was installed directly on a smartphone, and you had to select the "device commissioning" options from Fusion Solar.
    I reset the inverter password, connected via Fusion Solar and communication via MODBUS started.
  • ADVERTISEMENT
  • #58 21006953
    arko995
    Level 11  

    Hi, I have two SUN2000 inverters connected in an RS-485 loop. I have a Smart Dongle WLAN-FE connected to one of them. I want to poll the set via Modbus TCP using an Ethernet cable. I cannot enable DHCP in the router, nor can I use the option to force the address based on the Dongle's MAC address - I have to set the Dongle address permanently. I'm trying to set a static IP address in the Dongle via Fusion Solar, but communication hangs 90% of the time (I've tried several times). Has anyone faced a similar problem and managed to solve it? At the request of the Huawei service, I updated the Dongle firmware to the highest currently available version, but it did not help.
    I will add that when connecting the laptop to the Dongle via WI-FI, Modbus communication works properly.

    There is conflicting information on the Internet - does anyone of you ask SUN-2000 via Modbus RTU when connecting to the RS loop?
  • #59 21007026
    gmacko
    Level 15  
    Well, maybe you can change the router for PLN 150 and connect a normal one and set the IP addresses you want.
  • #60 21007038
    arko995
    Level 11  

    Not my network and not my requirements. Is it possible to set a permanent IP address on the Ethernet interface in the Dongle?

Topic summary

The discussion revolves around the compatibility of the Huawei SUN2000-6KTL-M1 inverter with Modbus TCP and RS485-LAN converters. Users report issues with establishing Modbus TCP communication, particularly when using the Smart Dongle. Key solutions include ensuring the Smart Dongle firmware is updated (versions 120 or higher), configuring the correct slave address, and verifying network settings. Users have successfully connected via LAN but faced challenges with WiFi connections. The importance of enabling Modbus TCP in the inverter settings and the need for proper IP configurations are emphasized. Some users also share experiences with different firmware versions affecting communication stability and suggest using specific Python libraries for data retrieval.
Summary generated by the language model.
ADVERTISEMENT