Guide: Connecting Pi with Home Assistant OS to wifi (or other networking changes)

Tags: #<Tag:0x00007f326cb6f440> #<Tag:0x00007f326cb6f300>

tried to follow strictly this guide
https://www.juanmtech.com/home-assistant-hassos-beginners-guide/
HA seems to connect to wifi


but impossible to acces UI

then if i plug the cable, i gain immediately acces to the UI… it’s totally crazy

Because I want to.

Creating a text file called my-network in the path /CONFIG/network that had to be created in the hassos-boot partition. Case sensitive. The file and path disappears on boot but will work. At least it did for me.

Look at this:

Thanks, but that’s not an option. I got it to work though :slight_smile:

already done, creates a wifi connexion but UI is unreachable through it. if you unplug thewire you cannot acces anymore to the HA.

is this could be linked to this ?

EDIT : seems to be linked to internal adress !

restarted the whole procedure according to the docs :

with BOTH wire and wifi connection, then i input the wifi IP adress in the internal adress, reboot the pi, disconnected the wire after booting and ssems to work.

however if i reboot witout cable direct connexion to wifi is impossible, you hae to plug the wire to establish the conexion and then you can remove it and it works with wifi only …

image

It seems there should be a bug somwhere that causes the need for cable to establish wifi access to the UI

Glad that you got it to work somehow :slight_smile: Please don’t follow Youtube tutorials, some guide you found on google or anything else that is not from the official documentation! Most of these guides are outdated because HA evolves so quickly. Always stick to the official documentation.

Did you try defining only the WiFi connection? You’re anyway only use the WiFi connection afterwards, so no need to define the wired also, right?

Wow, great reasoning…
Why do you WANT to be on WiFi if a wired connection is available?

there seem to be some bug in the network config. If i delete the wired one and then reboot it’s impossbile to connect back with wifi.

Tried to connect from the android App and same strange problem, impossible to connect if the wire is unplugged, even if i can access the UI with wifi from the computer tha is on the same network . Plug it and the wifi connection with the phone works …

a this stage i think it’s not a misconfiguration from me, but a real issue with the connection settings.

Becourse the place where I have the wire is not the place where I want to place the RP eventualy.
It’s the only place to install becourse WIFI does not work (yet)

Ok here’s some further informations

I reinstalled the pi with raspbian buster, doing similar wifi config trick in the root of SD to get immediately access to the wifi without having to plug wire. … and the result is the same ! In the router one can see the pi acting like he was swinging MACs from wifi to wireand vice-versa, constantly changing IP or having same IP fot the two mac.

Got to go through raspi-config to set correctly the wifi and now it works !

Installed HA on docker directly and now everythig works

Ok, then why do you want to have the Pi in this location where no wire is available? Why not leave it where it is currently for testing?

Do you have some ZigBee/Z-Wave dongle attached to the Pi and it needs to be in this location for this specific reason?

I haven’t had any issues. SSL or no SSL, it shouldn’t matter. Did you shut down and pull the card? That’s how I did it. The my-network file only needs the WiFi configuration.

[connection]
id=my-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
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

new reboot command:

ha ho reboot

I am using HassOS 0.110.3 on a Rasp 3B, followed the guide and it works very well.
I would like to know how can I set two ipv4 dns (primary and secondary).
Thanks

I also have the same problem as Sebbe encountered. I too have a “!” in my wifi password, but using ’ instead of " does not help :frowning:

I still get
Error: Connection activation failed: (7) Secrets were required, but not provided.

The odd thing is that I followed this guide 6 months ago, using the same password, and it worked back then. (Had to make a fresh install of HA inbetween)

1 Like

I have the same problem, I got ! charters in my wifi password and it will not allow the password to be accepted. not with the ’ character arond it or with a combination of ’ an ".

Is there anyone that knows if there is a file in the system after you have booted up hass.io that you cold edit ex. /etc/NetoworkManager/system-connection/my-network that I can edit with the same info as when you make an image SD and do an file /config/network/my-network. and then reboot to take wifi settings?

This whole post is an alternative to that. :slightly_smiling_face:

What you are referring to is the original method. The file you put on your CONFIG/network/the-file-on-your-USB-stick is the same file which gets imported to /etc/NetworkManager/system-connections/the-file-on-your-USB-stick

Using ' works for me when I create a password which contains !

image

ok, after a bit.
deleteing th con and connecting again did the trick
There must be something that went wrong the first times.

nmcli con delete “Grillnet”

and i made a variable of my pass
psw=‘Area5!**********!****3

and then added with
nmcli device wifi connect “Grillnet” password “$psw”

and it worked.

thanks everyone for making the community a eazyer place to find info.
Have a nice summer all. take care and be safe.

1 Like

I had some similar problem I think with a % in my wifi password. I tried all here except yours with the variable, I created the file which would have been imported from USB directly in folder /etc/NetworkManager/system-connection and rebootet. The connection was then defined but not coming up and I already suspected it is the password.

“nmcli connection show” was showing up the wifi setup not being connected to any device ("–").
“nmcli device connect wlan0” gave me the feedback I needed:

Passwords or encryption keys are required to access the wireless network blablubb.
Warning: password for ‘802-11-wireless-security.psk’ not given in ‘passwd-file’ and nmcli cannot ask without ‘–ask’ option.
Error: Connection activation failed: (7) Secrets were required, but not provided.

Guess what: I ran the same command again with this option and then it asks interactively for the password and here it accepts the special signs. Now it is up! :slight_smile:

1 Like