Connect to Huwaei SUN2000 inverter using fiber modem

So to summarize, I did this. Note Huawei inverter is on another subnet that is

  1. Flash Openwrt on the router
  2. Setup your router as a dumb AP.
  3. Connect it to your ISP router via ethernet. This will change the IP to something in the router’s subnet range. e.g if your ISP’s router Ip is then your OpenWrt's router IP will be (anything in between to
  4. Connect to your Huwaei Sun2000 inverter’s wifi as a client via 2.4Ghz radio.

Step 2
This step is unique for each user, depending on your ISP modem/ router.
Set up a static route in ISP router/modem/
On F@st 5366

  1. Open (again depending on your Isp router Ip address)
  2. follow these instructions to open the static route page. Route - SAGEMCOM Swan F5366s User Manual [Page 19] | ManualsLib
  3. enter the following setting
  4. IP address (in your case
  5. Gateway IP address (whatever your OpenWRT router Ip address is)
  6. Interface IP_BR_LAN (in my case it was br0)
  7. Subnet mask (if there is a field for subnet mask)
  8. Save and reboot both your ISP modem/router and OpenWrt router.
    This will complete step 2.

Step 3

  1. Download and install the latest Winscp from WinSCP:: Official Site:: Download
  2. Run WinScp
  3. select Scp as protocol.
  • login with your OpenWrt’s ssh credentials e.g
  • accept the terms etc etc
  1. You will be presented with these windows with OpenWRT folders.double click on three dots icons

    you will be presented with
  2. Navigate to the first file by double-clicking etc and then config. Here you will find all the three files “network” “wireless” and “firewall”
  3. double click on the “network” and copy-paste the following code at the end of the files. remember to set defaultroute '0" as mentioned in the GitHub wiki.
config interface 'wlan'
        option proto 'dhcp'
        option defaultroute '0'

7. repeat the process with “wireless” files by adding the following code to the end of the wireless file. changing according to your inverter’s AP’s Name and BSSID

config wifi-iface 'wifinet0'
        option key 'Changeme'
        option ssid 'SUN2000-HV0123456789'
        option device 'radio0'
        option mode 'sta'
        option bssid '94:25:33:12:34:56'
        option encryption 'psk2'
        option network 'wlan'
  1. Add the following code to the “firewall” file.
config zone
        option input 'ACCEPT'
        option name 'sun'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        option network 'wlan'

config forwarding
        option dest 'sun'
        option src 'lan'

config forwarding
        option dest 'lan'
        option src 'sun'
  1. save everything and restart your OpenWrt router.

Step 4
Firewall rules for the port forwarding

  1. Network -- Firewall -- Port forwarding
  2. Setup first rules as follows
  • Name: Preroute
  • Protocol: TCP
  • Source zone: Lan
  • External port: 6607
  • Destination zone : sun(wlan)
  • Internal IP: Select from dropdown:
  1. Uncheck NAT loopback from advanced setting tab

  2. Add second rule as following

  • Name : Post route
  • Protocol TCP
  • Outbound zone Sun(wlan)
  • Destination address select from dropdown
  • Destination port: 6607
  • Action: SNAT (there is some debate on this issue but you can use this)
  • Rewrite IP address: select from dropdown (OpenWrt router IP in Huwai inverter subnet)

Step five

  1. Verify connectivity, Before continuing with the setup of the integration, you should test whether you can ping the inverter on You can use one of the SSH/Terminal add-ons of HA, or use a terminal in the VSCode add-on.
  2. successful connection will look like this

Install Wlcrs integration.

  1. Connect Home Assistant to the WiFi Access Point of your Huawei inverter.
  2. Install this integration with HACS, or copy the contents of this repository into the custom_components/huawei_solar directory
  3. Restart HA
  4. Start the configuration flow:
  • Start Config Flow
  • Or: Go to Configuration -> Integrations and click the + Add Integration. Select Huawei Solar from the list
  1. Choose whether you want to connect via serial or network connection. In this case we will choose network

  2. Enter the IP address of your inverter ( The slave id is typically 0. You should only check the Advanced: elevate permissions checkbox if you intend to dynamically change your battery settings.

  3. When using the elevate permissions feature, you might be asked to enter the credentials to the installer account in the next step. These are the credentials used to connect to the inverter in the "Device Commissioning" section of the FusionSolar App. The default password is 00000a..

1 Like