Ethernet + WiFi at the same time

Hi,
I have Home Assistant running on a Raspberry Pi 4. I have two routers, the first is used to connect local devices and the second has internet access.
I would like to connect router one through ethernet and router two through WiFi to give internet access to Home Assistant.
If possible, how can I set this up?

Thanks

1 Like

I do not know if Home Assistant OS can handle it, but a normal Linux can.
The issue is more if you can handle it.
Managing a multihomed device can be somewhat challenging and it sounds like you want to deny internet access to some of your devices, but are you sure they do not require internet access now and then?

The question is really what you are trying to achieve with this setup, because there might be other and better ways to solve it.

Interested in answers here and not to hijack the OP but would love to have a fallback wifi in case main router goes down.

You need to first consider if you can actually still run and if it makes sense to do so with your main router down.

How much gets disconnected when the main router is turned off?
Usually its not just HA that gets disconnected from the internet, but alot of the sensors might go down too.
How much will actually then be available on a fallback wifi?

Building redundancy into network setups is not easy.
You will have to decide how much and which parts of your network that have to be copied for redundancy.
Will it be a few central parts that then can fail or will it be the entire network?
Once that is decided, then you need to look into of to manage the redundancy, so it will kick in when needed.
Some devices have features for this while others do not and sometimes the features the different devices have do not work together.

But the question is really what you are trying to gain with the redudancy,.
Is it that all or some parts just keep running?
Or is it just to get a way to do a task, like restarting the router again?

this is really OS/network topic only. How services use network is only depending on OS setup. 2 networks on raspberry is not a problem, definitely when ip ranges are proper set.
I had use wifi to connect to a PV monitoring box local ssid without internet and ethernet connected to rest of network. This just works maybe by the simplicity, but the basic setup and advanced options are based on the same routing logic on OS level.

Not completely true.
HA and integrations need to bind the services to the right interfaces when running multihomed.
The problem usually arises when programs on the multihomed device needs to inititate connections to devices on one of the networks, because which network is it. This is especially true for some of the discovery features.

For me anyway…I run HA on a dedicated NUC so the ability for multiple ethernet & wifi (or even maybe an additional USB adapter) i guess is dependant on the HA OS as to whether its possible or not!

But to answer the question regarding what I want to achieve:
My system is mainly made up of zigbee so I would like to think that 90% of my setup would continue to run but I would firstly like to know that the internet connection has dropped and have the ability for HA to still alert me of this and maybe even reboot the router via a zigbee plug.

I have often wondered if its possible to have ethernet and wifi or even a USB dongle for simple text alerts for example.

Of course you can have multiple network connections.
That is actually how routers work and routers are just computers too, where many actually are running Linux under the surface.

What you want is maybe not that special to make, because you only want to use the extra network connection for a few things.
The next question is then how does HA contact you without internet connection?
Only viable options seems to be a local only solution and that means no DNS lookups too, so if you run your HA setup on your device with only the internal IP, then you are a long way already.
Of course if everything is interconnected on a network switch built into your router, then that might die with the router, but a good stable network in front of it instead solves that problem and a its not that expensive.