Integration Solar inverter huawei 2000L

No, it’s not.

I ordered an RS485-Wifi bridge “Elfin EW11A” (aliexpress, cost around 8€) , with external antenna and connected it today to the inverter (using RS485A1/B1). It works flawlessly up to now (few hours). I used the inverter USB dongle connector as the power source so that everything remains simple. This makes a very cheap, and apparently very reliable alternative to the Huawei wifi dongle.

After connecting the device to the inverter RS485/USB power, I just connected to the access point the EW11 presents by default. From the EW11 web interface, I just put the device in STA mode, connecting it to my wifi router (entered SSID and password), I set the serial baud-rate to 9600, set the serial protocol to modbus. And this is it. The default TCP port to use is 8899 and huawei solar just likes it (slave id 1).

2 Likes

@tschiex

This is exactly my planned setup. Would you mind to elaborate a bit more on how you specifically connected the EW11A bridge to the Sun2000? I am a newb coming to physical wiring and I am not sure how you managed to “use the inverter USB dongle connector as the power source”.

Of course.

The EW11 green connector has four entries:

  • +/- for power input (DC, the two central inputs of the connector)
  • A/B for RS485 communication (the two side inputs of the connector)

I directly wired the AB entries to the RS485A1/RS485B1 entries on the SUN2000L communication port (that’s pins 2 and 1 for my inverter, a SUN2000L-L1). A connects to A and B connects to B.

For the power, I used an old USB A to micro USB cable I had. I cut it and inside the shield protection (aluminium foil + braided copper wires + plastic film), I got 4 wires: red, black, green and white. The green and white are for USB communication, you do not need these. I got rid of the shield over 2 or 3 cm of cable, then cut the white and green cables at 3 and 6 mm length respectively (to avoid contact between these wires and other wires/shield). The black wire is the ground, the red wire is the +5V. You just have to connect these to respectively the - (minus) and + (plus) entries on the green connector. I advise to use solder/crimped terminal/thermoretractable protection, but it’s up to you.

Unscrew the dongle protection on the inverter, plug the USB A and this is it for the “wiring” side. The EW11A should boot (takes a few seconds) and advert an “EW11-xxxx” hotspot.

Connect to the hotspot with the device of your choice and go to http://10.10.100.254 on a web browser. Login and password are both “admin”.

  1. Go to the serial port settings and change the baud rate to 9600 (leave the rest unchanged: 8 bits, 1 stop bit, no parity). Change the protocol to “Modbus”. Press submit.
  2. Go to the Communication settings and check that you are using a “Tcp server” Protocol with a “Uart” Route (at the bottom). Submit.
  3. Go to system settings, change the password to a password of your choice. On the same page, change the wifi mode to STA, type the SSID of your wifi router in STS SSID and the wifi password as the STA KEY. I also changed the WAN DNS to 1.1.1.1 because the default one is a chinese DNS and I prefer to use closer DNS (1.1.1.1 is CloudFlare DNS, 8.8.8.8 if you prefer Google).
  4. Press submit

I had to reset the device (in “OTHERS”) before the STA mode was established. The device with its external antenna has better sensitivity than the Huawei inverter for me. Nice!

Then you have to find the IP address the device got from your Wifi router DHCP server. The device announces itself very clearly as “EW11” from “Shanghai High-Flying Electronics Technology Ltd”.

On Home assistant, install the Huawei solar integration, select Network, give the IP address you found above, the default port for the device is 8899, use 1 for the Slave Id.

I selected “elevated permissions” because I want to control my inverter but I’m not sure it makes sense as we are directly talking to the RS-485 port, much like the serial settings actually. Thijs/wlcrs will say if this makes sense.

By curiosity, I also tested the 19200 baud setting (in both the FusionSolar app and the EW11) and this works fine.

This has been working for more than 24 hours flawlessly.

Thijs/wlcrs, if you are interested, I can submit a PR for documenting this on the README.md on GitHub. Just tell me.

5 Likes

Thanks a lot! Your detailed instruction really helped me out! I really do think that others might stumble upon the same question, so I support your suggestion to document this in the readme.

This looks like a brilliant solution!
If possible, it would be really nice with a photo (or several) of the wiring. For us that have not looked inside the inverter, it would help when finding the correct place (maybe it is obvious when you look for it, but it does not hurt to be detailed here…)

1 Like

I’m really very happy with my setup. I still haven’t tried to use the “elevated permissions” stuff but this thing rocks. It’s fast. I need updates every 5" for stupid technical reasons, for a device that uses the inverter output and at 19200 bauds this works w/o any issue (possibly at 9600 too, didn’t try). It’s also not power hungry at all. I first powered it with a lab power supply and it used around 40 to 60mA on 5V, this is just 0.3W.

I thought about pictures of course, but I did the whole thing before Zapadee asked for info, with thermoretractable shielding, etc. Build to last :slight_smile: It will be hard for me to open it without having to redo all stuff. I will see what I can do using what remains of the USB cable, pictures from the inverter and images from the web, if I find time :slight_smile:

But then, it’s really easy. You don’t have to open the inverter. You just have to unplug the communication plug, open it, connect a small 2 wires cable to pins 1 and 2 (it will remain short, so a twisted pair is not needed). It’s just a matter of unscrewing, putting wires inside a hole and screwing back. And the USB female plug is directly accessible under a plastic cover that needs just to be unscrewed.

If you never played with your inverter, be careful, do this at night, with AC disconnected. It’s only very low voltage here (5v) but accident happens.

1 Like

You are very welcome to submit this information to the Wiki page! If it’s not too much trouble, then some detailed photos/screenshots of your setup would really complement your explanation. Even if it’s just your shielding in place: we could use it to overlay it with a diagram of the correct cabling + it shows some best practices.

I began working on this integration especially to achieve dynamic control of the battery, and did some tests with setting the maximum discharge power between 0 (= no discharge allowed) and 2500 (=the maximum discharge power).

While this works to dynamically use the battery, I discovered that the inverter does not shut down even if the maximum discharge power is set to 0. This means that the “DC to AC” circuitry stays active and continues to draw more than 120W from the battery at any time!

My conclusion: it does not make financial sense to try and dynamically set the battery charge/discharge power with my 5kWh battery due to the high losses.

1 Like

Pictures below:

Zoom on the wifi adapter screw terminal with connection to the USB wires and inverter COM port:

Location of the USB 4G/FE plug and COM port. My inverter is installed in a safe location, protected from rain,… If this is not your case, the USB plus will need waterproof protection. I could suggest to use the existing cap, cut to let the USB plug traverse it, using silicone or hot glue for a tight seal.

The device itself:

3 Likes

Thank you! That is the most important part for me! I guess that is the same even when I have a battery attached?
I have ordered one of those, so I will try when it arrives. My wifi-router solution works ok, but hopefully this will be a lot more stable.
I don’t think I will bother with taking the power from the USB-port. I have some spare power-supplies in a box somewhere. I still want to have the dongle connected to the USB-port.

This is interesting, and I know that you have talked about this before. I am curious of how you concluded that this causes losses?
I can see that even if I put the charge power to 0, it does charge the battery a little bit. Looks like a couple of percent, so that matches your 120W number.
I kind of thought that it might be the other way around, so that it actually discharges that amount even if we put 0. But I am not sure how to know which way it is. How have you been able to measure that we actually have a loss?

I live in Sweden, and if you are being charged an hourly rate (different prices every hour), I definitely think that you can save money by managing the battery (even if we have losses). The prices are insanely different here. The highest price today is 22 times higher than the lowest…

Excellent: I’ve compiled your explanation and photos into a new entry in the Wiki:

To be fair: by looking up the screenshots below I notice that I had the wrong numbers in my head. It’s closer to 60W. I did these tests in February, and made the following conclusions then:
I calculated the loss by keeping the discharge level at 0 for a whole night and noticing that the SoC kept dropping: from 71% to 63% over 6 hours, or 1.33% per hour.

Even stranger: during this time, the Battery Discharge rose from 0.06kWh to 0.47kWh while the Daily Yield rose from 1.90kWh to 2.14kWh. Meaning that the inverter reports a loss of 62% if these numbers are correct. An open question is whether those 0.24kWh were really injected into the AC-side of the inverter, of that they are just lost somewhere past the measuring point of the inverter :man_shrugging:

Note that all of this is to be expected when the inverter runs at < 5% of it’s maximum capacity: the constant losses to keep the transformer electronics operating start playing an important role at that point :frowning:

Well. Thank you Thijs. Excellent compilation with nice additions (static IP,…)!
Just noted a typo (from my original text, my bad) where STS is used instead of STA.

I’m happy to learn that elevated permission will work w/o any password.

I haven’t received my LUNA battery yet, but like Fredrik, I have large changes in electricity tariffs: my production is injected for free, my minimal tariff is 8 cents/kWh but the maximum one is around 60 cents/kWh. So battery control will be appreciated, even if it has some fixed losses.

Yes, I think I have seen the same behaviour. My not-thinking-too-much-about-it idea was that it used this for something. In the same manner as when charging. Even with 0 as charging power, it charges the battery just a bit. So I thought, that it does not really want the battery to be totally idle. It either wants to charge or discharge it.

This is a bit strange, yes. Or maybe it does not really measure this. Speculating, maybe it uses the battery for the inverter electronics, but fail to measure that part.
I guess the question really is if we are losing more power when having it at 0 charge(or discharge) than if we keep it at 2500 (or something else). Or if we just see it more clearly then. I don’t know. The only way would be if we knew exactly how much energy we are using, and to see if the battery power “disappears” somewhere.
But in my case, since the prices are so different, I ignore this. Even without losses, it is better to move charging and discharging to the best hours. It is just a few hours that I delay charging and discharging, so I am not really worried about the losses. I guess you would not want to keep the charging and discharging power at 0 for several days, but I never want that anyways…

1 Like

Well, I can confirm that battery controls work. I have a (rather messy by now) python script that fetches the tariffs for the near future and finds max and min prices and try to optimise the charging and discharging (by setting these configuration parameters in home assistant). I also uses the Solar Forecast to try to know when the solar power is not enough to feed the house (at night, or very bad weather). So I think I save some money by doing this…

Please let me know if this works. Someone else has already reported that the serial connection was very unstable while the SDongle was connected: it kept disconnecting. One theory of mine is that the SDongle and RS485A1/B1 pins are connected via the same path to the rest of the inverter hardware, causing interference when trying to use them both at the same time. But I’d like some more reports from people before I add a warning to the Wiki.

Fixed.

Ok, interesting. We’ll see, when I get the parts (and find time to install it). But I’ll let you know!
A little bit sad if we can not use this together with the SDongle/FusionSolar… But that is of course nothing we can fix.

@peaceduck Please excuse me if I miss something, but since the inverter is AP+STA capable, it can connect to your router w/o having a Wifi dongle (when commissioning the device, you just have to set the router AP/password in the communication settings using FusionSolar connected to the inverter AP). I don’t have a dongle and FusionSolar statistics/interface works perfectly fine for me using this.

So, now that the RS485 port is directly accessible using the modbus RTU/TCPwifi bridge, I don’t see the added value of a dongle (except if its a 4G dongle of course, that does not even require Wifi). Hopefully, you could get rid of this dongle and use the USB power without losing FusionSolar and with maximized simplicity.