I’ve been trying to set a static IP on my Raspberry Pi install of Hass.io so that I can use the PiHole add-on.
I’ve tried many times and followed a number of guides/threads on here with no luck. The basic steps seem straightforward and yet I haven’t had any success.
Here are the steps I’m doing at a high level:
Formatting a USB stick with FAT32 and the name “CONFIG”. I have tried a couple of sticks with no luck.
Creating a folder on the usb stick called “network”.
Creating a file in the network folder called “my-network” or “resin-sample” (depending on which guide/thread you read. The file has no extension.
Populating the file with something similar to what I have below. What exactly is included depends on the instructions. What I have included below is my latest attempt. The UUID was generated via UUID Generator (https://www.uuidgenerator.net/) and i’ve tried a few. I have also made sure the encoding is ANSI and the end of line is Unix in case that matters.
I put the USB stick into the RPi and reboot the Pi. I have also attempted to power down the Pi then put in the USB stick. I have also tried several different USB ports including ones that currently have a stick in them (an Aeotec Zstick and a Zigbee2Mqtt stick).
After reboot I go to Hass.io > System and check the logs. No references to importing from a USB or any other references to network configuration changes. I have never seen an “Import From USB” button in that page that is references in many places. When the USB stick is present the “Hardware” list does include a reference under “disk” so it looks like the USB stick is detected.
Any idea why this isn’t working for me? Is there an issues you can see with what I’ve tried above? I assume I must be missing something stupidly simple.
Not a dumb question at all. I just double checked and the drive is named “CONFIG”, folder is “network”, and file name was lower case name as well (either “my-network” or “resin-sample”).
File name should not matter. I’m always using my-network. Shutdown the Pi, insert the stick and reboot. Afterwards shut down the Pi again and remove the stick. That should do the trick since I did not see any errors in your steps 1 to 5. I’ve never checked the logs (your 6th step).
One thing I’m wondering about is if there’s some kind of issue with my base Hass.io install. I keep seeing references to a “Load from USB” button I’ve never seen. Also I seem to be missing other info on the system screen that others have - for example my “Host system” section is blank.
Maybe it is easier to backup your config and start fresh. You could put the file directly on the SD in that case and completely drop the USB stick part (\CONFIG\network\my-network).
Why not? Just check the contents of the backup before formatting the device to make sure that feature still works and did not break too. Better safe than sorry
I must have missed something important here. Why don’t you just set a static IP from the router based on the MAC address? That’s what I do, that’s what I have done all the time…
Reserving the IP on the router isn’t the same as setting a static IP on the device.
For most cases it works fine, but because the Pi is going to be the DNS server for the network (PiHole) it has to know what it’s IP is without going to the router for it.
I’m not sure on the details that make that the case, but it is.
As for an update to my issue - seems like there was an issue with my Hassio install. After a fresh install I’m seeing the “Import from USB” option. Haven’t had a chance to do the import yet, so I’ll report back when I’ve done that.
Looks like it worked. Got this message in the log “[hassio.hassos] Syncing configuration from USB with HassOS.”.
When I was doing some digging around I found some references to “null” values in the system tab (and the hassio CLI) that indicated that this may have been caused by the fact that I installed Hass.io before HassOS (pre 0.74). Seems the only way to solve it is to start fresh with a new install of Hass.io. (This is the thread I found.)
So in case anyone else is having this issue… after doing the fresh install everything looks correct on the System tab. I have the “Import from USB” option now, and the network configuration was imported successfully. I’m not sure how to verify that the static IP is working, but I’ll just go ahead and setup PiHole again and see if it works correctly now.
Yep, you had resinOS. I can tell by the screenshot. A side effect of that is that you cannot set a hostname. Possibly related to why you couldn’t set a static IP as well. Basically Hassio is talking to something that isn’t there.
Hi all, new to HA. I was trying to set a static IP for my HA which is running in a VB in a Win Laptop. I was following the simple instructions provided here https://github.com/home-assistant/operating-system/blob/39babd53685d352c3f4a6d7d8fabe43e27ccc88d/Documentation/network.md. I think I have messed up something and tried to reset the changes that didn’t go well as-well. Now when I run “nmcli con show” I don’t see “HassOS default” anymore. I see “Wired connection 1”. and I can not browse HA any more. Any help any one? Thanks.