WiFi and Ethernet together

I’ve installed 1.13 on a Raspberry Pi 3 connected to my network via ethernet. This is all working.

I’ve got a number of devices that I want to be controlled by HA. For a number of reasons, these devices are on a different wireless network to the one the Pi is connected to via ethernet.

So, what I want to be able to do is to have the Pi connected to “Router A” via ethernet which will allow me to connect to the UI via other devices, but connected to “Router B” via wifi at the same time for accessing the devices.

Searching around, I’ve not found anything that answers this question or shows how to do it. All the Network Manager scripts I can find just have wifi or just have ethernet and I can’t see any documentation that explains (or even hints) that what I want to do is possible. I did wonder if just configuring the wifi (using the config USB drive) would leave the ethernet connection alone so it would “just work”, but I would like to know before wasting time fiddling around.

Thanks!

1 Like

Are network A and B not connected?

No, they aren’t connected. It’s not feasible to do so at the moment either.

Stackexchange

Superuser

these may help

edit: If you have 2 separate networks and you just need to connect them and you already have 2 routers (1 for each) you could easily do this with powerline adapters. Not the best thing I know, but it will work. My house is impossible to pull for wired networking so I had to go this route for my network.

It is certainly possible. network manager is pretty well documented on the net.

Thanks forsquirel, the links you sent were for general linux networking which I don’t think applies to hassio as it uses Network Manager which seems to do its own thing.

I’m not trying to connect the two networks together - I just need hassio to be able to see both networks. Nothing on router A needs to see anything on router B and likewise the other way round. But devices on router A need to be able to see the hassio server.

1 Like

@nickrout - do you have any links for this? I’ve searched around and everything I’ve found just explains about configuring one at a time. There’s nothing I can see that describes connecting both at once.

Last night I tried adding the wifi but then that disabled the ethernet.

You need to set up your wifi network on a different subnet to your wired. Say 192.168.1.xxx for wired and 192.168.2.xxx for wifi. I also assumeyou have DHCP set up on at least your wired network.

I think something like this:

[connection]
id=hassos-network
uuid=d55162b4-6152-4310-9312-8f4c54d86afa #you should probably generate fresh uuids for each connection, mine are from the examples in the hassos docos.
type=802-3-ethernet

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Which should get you on your wired network with DHCP etc, just like the default.

Then you need to add the wireless with a static address I think, although DHCP may also work.

[connection]
id=wifi #obviously a different id to the wired
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3 #you should probably generate fresh uuids for each connection, mine are from the examples in the hassos docos.
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY

[ipv4]
method=manual
address=192.168.2.111/24,192.168.2.1
dns=8.8.8.8;8.8.4.4;
# adjust the above to match your wireless network.

# I am omitting the ipv6 shit, I don't have the foggiest about that

Now the one thing I am not sure about is the routing. Obviously you want routing set up so the 192.168.2.x traffic goes out the wifi interface, and 192.168.1.x and any other traffic goes out the wired interface. ie that should be your default route. Take a look at this doc: https://developer.gnome.org/NetworkManager/stable/nm-settings.html

I have to say, NM may be very flexible, but man they made it all complicated. Makes me long for

ifconfig eth0 up

Ah, so you can just create multiple network files or just have multiple values in the one file? That might be the thing I was missing when I was reading around about this - all of the examples only had one entry. That would probably also explain why my ethernet fell off when I added the wifi last night.

I’ll have a read through that and do some more searching around now I’ve got some more terms to search for. Hopefully I’ll be able to sort it. If not, I’ll just have to try changing the hardware (which is going to cause its own set of problems…).

I have to agree with you - the usual configuration stuff would’ve been so much easier - it’s something that’s already just there!

Thanks for the help.

You can just keep adding to the one file.

Just wondering if you guys got this working? Having been trying with a tagged VLAN port but hassio seems to connects and then drop-out. This VLAN is working fine via a separate SSD on my UNIFI-AP-PRO and MikroTik switch & router.

Thanks
Chris

1 Like

If you are using the Hassio HassOs image I doubt it supports a trunk with a tagged VLan. It is designed as a basic hypervisor for Hassio. You would be more likely to get this working with a Linux OS. You can still install Hassio on Linux.

Thanks so much for the reply! I think you could be right. Maybe time to re-host in VM or other option.

Hi i have followed nickrout recomendations. i have created 2 files inside network folder of usb stick, one for ethenet and 1 for wifi. At the ethernet port i dont need routing becouse there were only one mqtt gateway to comunicate with some mysensors nodes.
image

my-network file

[connection]
id=my-network
uuid=f1fffbbe-899c-4708-bbe9-0d25f13b048c
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=++++++++++++++++++++++
# Uncomment below if your SSID is not broadcasted
hidden=true

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=++++++++++++++++++++

[ipv4]
method=manual
address=10.0.0.121/24,10.0.0.2
dns=8.8.8.8;8.8.4.4;

[ipv6]
addr-gen-mode=stable-privacy
method=auto

mysensors file

[connection]
id=mysensors
uuid=b0167dfb-111e-4db0-91c6-6180cde724d6
type=802-3-ethernet

[ipv4]
method=manual
address=10.1.1.120/24

both connections are working!!

3 Likes

good evening, can you explain me the procedure to follow, I have some defects in english: /

I saw this old message and wanted to know how to change from wifi to wired? Do I just modify the network file on my USB and just reboot the RPI and it will pull in the new configuration on boot!

I think so.

Thanks, I have asked this question on the discord as well as in several threads and it seems no one is sure ( at least no one has answered). I think so also, but it would be nice if this was documented. I’m sure I am not the only one that wants to switch from one type of connection to another. I would think there would be a file on the Home Assistant that would hold this information and you could modify this?

If you ssh into hassos take look under /etc

Can you see it from Samba?