Raspberry Pi with LAN and Wi-Fi breaks Internet access - Huawei Solar Integration

Hi everyone,

I’m using a Raspberry Pi to communicate with my Huawei solar inverter via Modbus over Wi-Fi (The Huawei Solar integration). The inverter’s Wi-Fi network is separate from my main home network. At the same time, my Raspberry Pi is connected to the internet via Ethernet.

Here’s the issue I’m facing:

When the Pi is connected only to the LAN, the internet works fine.
But when I also connect it to the inverter’s Wi-Fi to receive Modbus data, the Pi loses internet access, and I’m unable to control devices that need internet, like my smart plug. But it only removes the connection outside of my home network. Everything which is locally managed is still working.

This definitely has something to with network routing, but I am a complete noob with that.
I also searched the internet but could not get it to work.

Is there a way to keep both networks functioning at once—Modbus on Wi-Fi and internet on LAN?

Any advice on routing settings or other solutions would be much appreciated!

Thanks in advance.

Hi MrAhmalo,

Pretty much doesn’t work that way. Your PI is not a router.

The solar thing needs to be in the same network subnet (address range) as the PI, and both need to be getting their dhcp and routing and such from a router.

Without special setup the pi only uses the wire OR rhw wifi, not both at the same time.

So I need to connect the Inverter to my main WLAN Network? Because that would not work. I can only read the data from the Inverters WLAN, right?

Why??

Do you have a wireless connection on your LAN?
You would need that to do this.

So how could I fix this issue then?

As said earlier HA is not a router, but I understand that some of those solar gear form their own network and that makes them a bitch to implement in HA.
Best bet is to use static IPs and then set no gateway on the WiFi connection, if HA allows this. Networkwise it is a valid setup when no gateway is given.

I now solved it easily by using the Raspberry Pi Network Manager. Now, both connections are working perfectly. Previously, it didn’t work because I was using the old wpa_supplicant and similar configurations.

This is how I did it. t was easier than I thought! If your device supports it, just use Network Manager. It’s so much better than using wpa_supplicant. Hopefully, this helps someone in the future.

Manage Wi-Fi Connections with nmcli (NetworkManager)

If you want to view, connect to, or set up Wi-Fi networks on your Raspberry Pi using nmcli, follow these steps:

1. View Saved Networks

To see a list of all saved networks, open your terminal and enter:

nmcli connection show

2. Connect to a Saved Network

If the network has been previously saved and you want to connect, use the following command.

nmcli connection up <NetworkName>

If the credentials are saved, you will connect automatically.

3. Add a New Wi-Fi Connection

If the network isn’t saved, you can set it up with the SSID and password.

nmcli device wifi connect <SSID> password <Password>

This command will save the network, allowing you to connect automatically in the future.