Connecting to 2 different IP subnets

Hi,

My HA install uses its LAN connection to connect to 192.168.1.1 network. What would it take to use its WIFI configuration to connect to the IP 192.168.0.90 ?

I am using a raspbery pi 4 OS setup.

Thanks, RIch

Home assistant isn’t a router.

Buy a router.

We get this sort of question a lot on the forum ,but rarely do the users asking the question have the knowledge about protocols to pull it off.

IoT use a lot of different protocols and some of these are not routable and not able to be multihomed, which especially goes for many of the auto-discovery protocols.

All it takes is to configure the second interface in Settings | System | Network.

HA will not act as a router, it becomes a dual-homed host. Thus it doesn’t route packets from one network to the other and doesn’t need to.

Note that there are rare times when the system restarts that the wifi interface won’t connect, this sometimes means it forgets the config but it’s trivial and I have experienced this maybe 2 times in 50 restarts.

As Tom has stated - sometimes it’s better to have an internal router that will route the packets between networks, but to do this well is arguably more difficult that creating two completely seperate networks and dual-homing.

1 Like

HA will be a router.
It is just not routing at the layer 2 or 3, but it still is a router.

Ah - no. It is working at layer 7 - simply sending packets to applications on whatever interface it likes. If it doesn’t forward packets at layer 3, it’s not a router.

1 Like

A router is not limited to layer 2 or 3.
The network router device has narrowed peoples view on what a router is, but. Arouter is just a device that moves data from one network to another.
Since HA will be available on both networks and the same data is available and both pushed and pulled, then it will per definition be a router.
HA is not made to be a router and therefore it will be a cause to issues.

So copying data from my work laptop to my home computer am I also a router?
But seriously:

A router is a device that connects two or more packet-switched networks or subnetworks. It serves two primary functions: managing traffic between these networks by forwarding data packets to their intended IP addresses, and allowing multiple devices to use the same Internet connection.
In order to direct packets effectively, a router uses an internal routing table — a list of paths to various network destinations. The router reads a packet’s header to determine where it is going, then consults the routing table to figure out the most efficient path to that destination. It then forwards the packet to the next network in the path.

So even if in theory HA could pass information between networks, it is using for this some automations or integrations, it is not on the data packet level, not using IP addresses to forward data, nor using routing tables.

You have found the description for “the device” called a router, not the definition of a router.

Here is CISCO definition of the router:

Routers guide and direct network data, using packets that contain various kinds of data—such as files, communications, and simple transmissions like web interactions.
The data packets have several layers, or sections, one of which carries identifying information such as sender, data type, size, and most importantly, the destination IP (Internet protocol) address. The router reads this layer, prioritizes the data, and chooses the best route to use for each transmission.

So it clearly links routing functionality to specific layer of OSI model, and not something that is implemented in HA.

If you search long enough you can find something like:

In the context of manufacturing, “routing” refers tthe sequence of operations or steps needed to transform raw materials into a finished product. It’s essentially the production flow, outlining the tasks that must be completed in a specific order. A “material routing” or “material assignment” within that process refers to determining which raw materials are needed and in what quantities for each operation or subassembly.

What is your definition in context of networking?

Cisco is also explaining the device.
It is a network hardware company.

Try to use the theory on a higher level.

This is where HA also becomes a router.

General-purpose computers also forward packets and perform routing, although they have no specially optimized hardware for the task.

This is what you often find when you just search for router.

Routing, in a narrower sense of the term, often refers to IP routing and is contrasted with bridging.

This whole discussion is academic. Do not use HA to route between two Ethernet networks. Use a dedicated router.

2 Likes

My HA Raspberry Pi LAN connection is Ethernet to 192.168.1.1 and I want the same Raspberry PI’s WIFI to connect to device 192.168.0.90 which is a home generator.

Rich F

Then, for the third time, you need to buy a router.

When I read the original post, I do not see any request for routing between the two networks.

I think the OP just wants two network interfaces active so that HA can talk to a device in another network.

@flowersrj - please explain exactly what you are trying to do.

Why does a home generator have its own IP address in a different subnet? Is it alone in the world with that IP or do you have a seperate network? You really need to explain the context.

I assume it is its own website using WIFI. It has no ethernet connecter just a 6 inch antenna.

The generator instruction manual says its IP is 192.168.0,90 with a simple password. It is not changeable according to the installer.

So what it probably has is a captive portal where you first have to use a phone or computer to connect to its WIFI access point.

When that happens your computer gets an IP address in the 192.168.0.x space.

And then you can look up the website.

Try this first and see if there isn’t a setting where you can tell the generator which Wifi network to connect to and the wifi password.

I do not think you will have much luck having HA to connect to this access point via its Wifi.

Can you link to the instruction manual?

I only have a hardcopy of manual. I have connected thru my cell phone to schedule run tests monthly. I tried HA network settings to connect via WIFI but no luck. My desktop computer has no WIFI adapter. If you scan for champion generator someone in the past has connected

Rich F

Unless that generator can be configured to be a wifi client instead of access point it will probably be a challenge.

I did a Google search for Champion Generator and Home Assistant and this old Reddit popped up

I cannot help you further. But surely your home assistant does not need to be a router. The problem is if a HA instance can connect to a portal like the generator.

https://www.reddit.com/r/homeassistant/comments/wt9j8s/monitoring_a_champion_home_standby_generator/