How to connect Home Assistant OS running on a Raspberry Pi to WiFi without an ethernet cable

Hello, I’m Vision. I have been a Home Assistant user for some time, but a proper, clean setup has always eluded me because of one hardware constraint: Ethernet.

The standard Home Assistant OS installation on a Raspberry Pi relies heavily on Ethernet for initial configuration. Unfortunately, my home environment made this impossible; my router lacks available Ethernet ports, and Wi-Fi extenders failed to bridge the gap. As a result, I had to rely on workarounds like virtual machines or hosting HAOS on a separate computer. For over two years, I have tried to properly deploy HAOS on a Raspberry Pi using a MacBook, failing at every turn—until today.

How to set up HAOS on Raspberry Pi without Ethernet (macOS)

[1] Installation

Follow the official Home Assistant installation guide for Raspberry Pi here up until step seven.

[2] Connecting to Wi-Fi

1. After Installation, remove the SD card from your Mac, then reinsert it.
2. Open the “Terminal” app.
3. Type diskutil list, then find the SD card with hassos-boot.
4. Type sudo diskutil mount <DISK> (e.g. sudo diskutil mount disk4s1).
5. Type mkdir -p /Volumes/hassos-boot/CONFIG/network.
6. Replace YOUR WIFI NAME and WIFI PASSWORD with your actual Wi-Fi name and password.

cat > /Volumes/hassos-boot/CONFIG/network/my-network << 'EOF'
[connection]
id=my-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=YOUR WIFI NAME

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

[ipv4]
method=auto

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

7. macOS sometimes leaves invisible ‘._’ files that can confuse Linux; remove them by typing

dot_clean /Volumes/hassos-boot

8. Make sure your files are in the correct location.

cat /Volumes/hassos-boot/CONFIG/network/my-network

You should see the long "cat > /Volumes... ...EOF" thing from earlier with your actual Wi-Fi name and password. If you don’t see anything, or the YOUR WIFI NAME and YOUR PASSWORD placeholders are there instead of your actual Wi-Fi credentials, see {*1}.
9. Eject the disk.

diskutil eject <DISK>

(e.g. diskutil eject disk4)
10. Insert the SD Card into your Raspberry Pi and wait a few minutes for it to boot up.

[3] Accessing Home Assistant

After you configure Wi-Fi, follow the instructions below to access your dashboard.

Open http://homeassistant.local. If it loads, you have successfully set up your Home Assistant instance!
— If it doesn’t load, try http://homeassistant.local:8123. If it still doesn’t load, you may need to access Home Assistant via its direct IP address.
To find your Raspberry Pi’s IP address, type the following in Terminal.

for ip in 192.168.1.{2..254}; do (nc -z -w 1 $ip 8123 2>/dev/null && echo "$ip is running something on 8123") & done; wait

Look for a line saying X.X.X.X is running something on 8123. That “X.X.X.X” is your Raspberry Pi’s IP address; type http://X.X.X.X into your browser and see if Home Assistant comes up. Replace the Xs with the actual IP address.
—— Congratulations on setting up Home Assistant ——

{*1} If you do not see anything, restart from [1] Installation. If you see the placeholders instead of your actual credentials, type sudo nano /Volumes/hassos-boot/CONFIG/network/my-network, use arrow keys to move around and do Control + X, Y, then Enter to save.

———————————————————————————————
If you have any questions, please DM me on Discord or Home Assistant Community.

This sounded very familiar, so I dug way back, over 7 years ago now…

Hello @CaptTom,

I am a bit confused by what you are saying, but to set up WiFi on your RPi 3+, you’ll need to follow the steps above. No YouTube video shows how to do it correctly because they are outdated; therefore, the guide I made is the only place to find WiFi setup instructions.
If you use Windows or Linux, you may find a newer tutorial.

If you already have a wired connection, you can enable WiFi using the steps below:
1. Open your Home Assistant dashboard.
2. Open Settings
3. Press System
4. Press Network
5. Find where it says “Configure network interfaces” and press on the “WiFi” dropdown.
6. Press “Search Networks”
7. Press on your WiFi network, choose from Open, WPA, or WPA-PSK.
8. Enter your WiFi password, then press Save.
You may now remove the Ethernet cable, and your RPi should stay connected!

Sacrifice Demo
2819-dev

First rule of networking devices:

NEVER PUT SERVERS ON WIFI. I extend that also to printers.

A lot of people’s wireless game is not that strong and you are asking for a lot of frustration if you put Home Assistant, any server or any printer on WiFi.

My Home Assistant is on WiFi, and it’s been working fine for over two years. What do you mean by “…you are asking for a lot of frustration if you put Home Assistant, any server, or any printer on WiFi”.

Not many people have a great WiFi setup in their home. My rule as a network engineer/architect/manager for a fortune 500 company is that if it stays put and has an Ethernet jack, it gets wired. The only time I ever allow WiFi is if it has no other way or if it is mobile.

Oh, but If you have good WiFi than this is fine… My upload and download speed is around 50 Mbps for the network that my Home Assistant is running on and it works completely fine.

I use an ethernet cable from the Rpi 4 into a TP WR902 extender.

I try to put any control ‘stuff’ on Zigbee but have some ESP32 devices which could only connect by wifi. Depending on their location, I joined them to the wifi from the TP WR902 if the signal was good enough. That way, if the wifi link to the main router struggled or the router had an issue, it didn’t matter.

Something a bit more powerful wifi wise, would be better than the WR902, but it’s worked ok for me.

I’ve been running HA over WiFi for over seven years now. Never had any pain or frustration (except initially setting it up, which wasn’t documented very well back then, either.)

I also had a long career in IT, and I always shared that “wired is always better” philosophy. It’s not wrong. But sometimes “better” doesn’t matter. If it works reliably, isn’t that good enough? Un-learning some of the old rules I learned in the 1990s has been an ongoing process for me. I like to think I’ve made some progress.

Agreed. Wired may be better, but sometimes it doesn’t matter.

Sacrifice Demo
2819-dev

As long at your WIFI is roughly comparable to your internet speed, you have reasonable coverage and your not introducing too much latency, what do most people really need for a home WIFI setup?

Sure it’s not going to have the same throughput as a commercial system, but most of the time home WIFI is only servicing 2 or 3 users…

There are two good reasons behind this rule:

  • You eliminate significant complexity by hardwiring something.
  • Except for contention at the switch/backbone you are not really competing for resources (as you would be for wireless bandwidth).

However a network connection is only as strong as it’s weakest link, none of the local devices my HA talks to are wired - most are via Zigbee although I do have 3 WIFI devices, all of them (Zigbee & WIFI) have no option to be wired they must all be accessed over RF. Most of the time when I access the HA GUI I do that via WIFI as well.

To be clear if your HA has an ethernet drop right next to it, then its fine to hardwire it, but a rule that may be unarguable for a large company is largely irrelevant** for home assistant setup where it’s mostly wireless anyway.

** - In a typical home, the delta (in available functionality) between just the WIFI going down and the whole IP network going down is fairly small.


In a home context …
Is hardwiring better: Usually yes.
For most people will they notice the difference: Probably not / not often.

For most people, WiFi speed or reliability shouldn’t be an issue.

This topic is a guide on how to connect your RPi to WiFi, not whether it will function properly on WiFi… (I’m not saying to stop this discussion though)

There’s a lot more to wifi characterisation than just speed and signal strength. Latency, jitter, interference, airtime & device density, etc…

You will always be better off with a wired connection. If you can then do.

Yes, that is the entire discussion. But for most people, it won’t be noticeable.

Either way, this guide can help anyone who wants WiFi (which many people do).

I disagree and what is more it will be difficult to determine if any issues they have are due to their system configuration or their network connection method. Better not to introduce that extra complication if possible.

Mmmmm… Either way, this is just a guide for those who do want to connect their RPi to WiFi.

I have an idea, but looking for a good recipe for apple pie first. Do you know of any?

Running frigate for 8 cameras can bake a raspberry pi.

This is a good point. The real answer (to both the question of whether to use a RPi and whether to use WiFi) is “It depends.”

You need to consider the expected demand. Demand on the processor, the memory, and the network adapter for whatever features you plan to use. Streaming audio or video, AI, or lots of add-on apps can factor into the decision. This is why I push back against hard-and-fast rules like “never do that.”

Now about that apple pie recipe…