Hassio instalaltion Wifi configuration

Unless I’m reading something wrong here, you should be looking for the boot partition, not the folder. (If writing the my-network file to the SD card directly). Mounting read-only is done by certain distributions when auto mounting file systems, there’s probably a reason for it but in this case it’s fine to remount in read+write mode.

Have a go at finding the Hass.io boot partition (using fdisk), mounting it in read+write mode (which is standard if you manually mount I believe) and creating the folder CONFIG/network on that boot partition. It shouldn’t take you much over 20 minutes if you’re new to it all. You have to learn at some point, might as well be now. Double check you are working with the SD card and not a local drive and there isn’t much to go wrong.

Also, you probably already found out, but Linux and its filesystems are case-sensitive.

If you want, can you paste the output of sudo fdisk -l /dev/sdcardpointer (substitute the actual device name of the SD card of course) so someone can reply with the correct mount command.

It was the boot partition I was trying to access (there are 8 but only 4 show up, pls see screenshot)

I found them with GParted at first but thanks to your tip have used fdisk:

Screenshot%20from%202019-01-23%2019-25-35

sdc1 is visible in windows (and writeable), should I put the CONFIG/network/my-network file in there?

With regards to the uuid, should I also generate a new 1 when I flash the SD (again!)?

Your wisdom is greatly appreciated.

Thanks

Hi again,
I used the partition identifier and it returned the following:
kevin@kevins-linux:~$ mount -v | grep “^/” | awk ‘{print "\nPartition identifier: " $1 "\n Mountpoint: " $3}’

Partition identifier: /dev/sdb2
 Mountpoint: /

Partition identifier: /var/lib/snapd/snaps/gnome-calculator_180.snap
 Mountpoint: /snap/gnome-calculator/180

Partition identifier: /var/lib/snapd/snaps/gnome-logs_37.snap
 Mountpoint: /snap/gnome-logs/37

Partition identifier: /var/lib/snapd/snaps/gtk-common-themes_818.snap
 Mountpoint: /snap/gtk-common-themes/818

Partition identifier: /var/lib/snapd/snaps/gnome-calculator_260.snap
 Mountpoint: /snap/gnome-calculator/260

Partition identifier: /var/lib/snapd/snaps/gnome-system-monitor_57.snap
 Mountpoint: /snap/gnome-system-monitor/57

Partition identifier: /var/lib/snapd/snaps/gnome-logs_45.snap
 Mountpoint: /snap/gnome-logs/45

Partition identifier: /var/lib/snapd/snaps/gnome-3-26-1604_74.snap
 Mountpoint: /snap/gnome-3-26-1604/74

Partition identifier: /var/lib/snapd/snaps/core_6130.snap
 Mountpoint: /snap/core/6130

Partition identifier: /var/lib/snapd/snaps/gnome-characters_139.snap
 Mountpoint: /snap/gnome-characters/139

Partition identifier: /var/lib/snapd/snaps/canonical-livepatch_54.snap
 Mountpoint: /snap/canonical-livepatch/54

Partition identifier: /var/lib/snapd/snaps/gnome-3-26-1604_70.snap
 Mountpoint: /snap/gnome-3-26-1604/70

Partition identifier: /var/lib/snapd/snaps/gnome-characters_103.snap
 Mountpoint: /snap/gnome-characters/103

Partition identifier: /var/lib/snapd/snaps/gnome-system-monitor_51.snap
 Mountpoint: /snap/gnome-system-monitor/51

Partition identifier: /var/lib/snapd/snaps/gtk-common-themes_319.snap
 Mountpoint: /snap/gtk-common-themes/319

Partition identifier: /var/lib/snapd/snaps/core_4917.snap
 Mountpoint: /snap/core/4917

Partition identifier: /dev/sdc3
 Mountpoint: /media/kevin/disk

Partition identifier: /dev/sdc2
 Mountpoint: /media/kevin/hassos-kernel

Partition identifier: /dev/sdc7
 Mountpoint: /media/kevin/hassos-overlay

Partition identifier: /dev/sdc8
 Mountpoint: /media/kevin/hassos-data
kevin@kevins-linux:~$ 
kevin@kevins-linux:~$ (source)

I can’t see sdc1 as that is the fat16 partition (hassos-boot) which is the only 1 visible in windows. In there I tried creating a CONFIG/network/my-network file also with config/network/my-network. I tried CONFIG/network/hassos-network (also lower case) as that is the id in the second line of the file.
All failed.
I am not sure which of the remaining 7 of the 8 partitions I should enter the CONFIG into to achieve a WiFi connection.
I have also tried the USB stick again with the various formats of the file, no joy.

Could it have anything to do with the UUID? I’m not sure.

Any thoughts will be most welcome,

Thanks

Okay all, I’m a bloody idiot! I’ve spent the past few days tearing my hair out over this WiFi setup and have just realised that the speck of dirt on my screen by the file “network” was actually ’ and thanks to the small view on my display, I didn’t see my mistake!

Only on a different folder view in linux was I able to realise the error of my ways.

The Pi ZeroW is ticking along nicely now and downloading what it needs, phew!

Many thanks and apologies to @wutr for all the help. It looks like I’m off to a real rocky start with home assistant but on the plus side it can only get better! (I hope!)

Thanks again all, sure it won’t be the last question I have but hopefully the rest won’t be so schoolboy error orientated!

Glad you got it fixed (you are not the only one who has done that I’m sure)!

For people who are still struggling to do it via Linux:

hassos-boot is visible in Windows because it’s FAT. Windows doesn’t show anything it doesn’t support.
On Linux (and in your case Ubuntu?) It doesn’t automount 4 out of 8 paritions on the SD card. Why, I don’t know, there is probably an explanation, but to fix it you have to mount hassos-boot (which in your case is /dev/sdc) as FAT as follows (you may have to create a directory for the mountpoint):

sudo mount -t vfat /dev/sdc1 /media/kevin/hassos-boot

Also, I mentioned using fdisk before, but I suggest using lsblk --fs instead to find out which device/partition to mount (which in this case was /dev/sdc1).

1 Like

@wutr
I’m having the same problem as everyone here: hassio doesn’t connect to wifi
I’ve spent hours going through the various threads on here but to no good.

I’m on a mac running mojave v10.14.2

Here are my steps:

  • downloaded the 32 bit image from the official page, and flashed it to an sd card.
  • like the documentation says, I formatted a usb stick (using the exFAT file system I think).
  • created the file CONFIG/network/my-network

[connection]
id=my-network
uuid=76b9c56b-a627-4228-b528-22f0ea965e93
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=<my_ssid>

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=<my_psk>

[ipv4]
method=auto

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

After hooking up the SD card and usb stick and running the pi it repeats the log “wlan0: link is not ready”, and I also can’t find the connection when viewing my router; so it’s not connecting (hassio.local:8123 doesn’t work either). Am I missing something obvious?

The usb name is CONFIG, correct? It isn’t a directory on the usb?

As @cogneato mentioned, the procedure for using a USB drive differs slightly from creating the file directly on the SD card.

If using a USB drive: name it CONFIG (partition label) and create a folder on that partition called network and the my-network file within there.

If using the SD card you wrote the hass.io image to: create the folder CONFIG on the boot parititon and within it a network folder and my-network file.

As before, it’s case-sensitive.

2 Likes

Then you haven’t read the instructions properly!

My mistake, the USB drive is actually named CONFIG as the instructions specify. I formatted it with the mac disk utility and renamed it by right clicking the menu item and changing it there. I’ll check if this actually renamed the partition label, which may be where the issue lies if it didn’t!

Hi again,
The name of the USB itself is CONFIG, so that’s a dead end…

Is there a way to use the hassio logs to debug? It would be nice to know whether it couldn’t find my config file or couldn’t read it.

ssh into hassos (not the home-assistant instance) and the file is, I believe,

/etc/NetworkManager/system-connections/default

Alternatively connect your pi to a monitor and keyboard and log in there.

PS Why TF anyone wants to run something like HA on wifi is beyond me. When you get it going it runs your life and your house. Reduce points of failure!

2 Likes

Good point @nickrout, but in my situation I don’t always have direct access to the router.

My pi is hooked up to a monitor which is how I’m able to view logs, and it doesn’t look like it’s accepting input. How would I be able to log in manually? Also how can I ssh into hassos if my pi isn’t connecting to the wifi, and what would the username / password be if I was connected via ethernet?

To log in from attached monitor/keyboard: press enter on the keyboard. You should get a prompt

Welcome to Hassos
hassos login:

login with root, no password required. You should now be at the hassos shell with

hassio>

as the prompt. To get a root shell type

login

As for networking, are you telling me you have no wired ethernet at all in your home?

2 Likes

the prompt I’m getting is actually HassOS>, don’t know if that makes a difference or not

when I try the login command it can’t find it, that command doesn’t appear under ‘help’ either

I’m trying an additional approach of attempting to mount my sd cards boot partition and add the CONFIG folder there are you described.

diskutil list

produces

/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *32.0 GB disk2
1: Microsoft Reserved 33.6 MB disk2s1
2: Linux Filesystem 25.2 MB disk2s2
3: Linux Filesystem 268.4 MB disk2s3
4: Linux Filesystem 25.2 MB disk2s4
5: Linux Filesystem 268.4 MB disk2s5
6: Linux Filesystem 8.4 MB disk2s6
7: Linux Filesystem 100.7 MB disk2s7
8: Linux Filesystem 31.3 GB disk2s8

I wasn’t able to tell which is the boot partition so I guessed /dev/disk2s1 since it’s the first and mounded it via:

sudo mount -t msdos /dev/disk2s1 /mnt/windows/

I then added my my-network file from before at the path CONFIG/network/my-network

and it worked!
thank you @wutr @nickrout and everybody who responded. I’m glad to finally be able to get started on this

1 Like

AU190 - SUCCESS today after 2 days of trying to install Hassio on RPI

I was using note pad but to no avail, tried many options and permitations of code etc, etc.

However in the end cam across your post, i installed note pad ++ and did as you say change coding to ANSI and line edging to UNIX.

Came on-line almost immediate with HASSIO loading in progress viewed through my web browser pointed to my IP and port :8123

Thanks for showing the way…

set static IP using your router and router settings it is easier.

It’s not a matter of wired vs. wireless. I 100% agree that wired is the way to go for a reliable connection. The RaspberryPi 3 has the great feature of ethernet and wifi. Maybe someone would like to run HA on ethernet but have wifi sensors on a different network. There are dozens of network variations out there done for very legitimate reasons. Hassio’s network configuration is a total nightmare for accommodating these.

1 Like

I take your point but hassos is not designed as a router. If you want to run a pi as a router I suggest it would probably be best to get a second one :slight_smile: