Setting a Static IP on Hassio (HassOS)

Hey guys… here’s hoping someone can help me on this.

I’m running Hassio 0.75.2 on HassOS 1.9 (RPi3). My router is a TP-Link Archer C7 which does not support NAT Loopback. As a consequence I can’t connect to HA using my public domain from my LAN. Remotely everything works fine. So, in order to solve this I installed PiHole. I should set my DNS on DHCP on the router pointing to the RPi3’s IP, but I can’t, since my RPi3 is getting the IP via DCHP (reserved).

So… first I set a ARP binding on my router, pointing my RPI’s MAC to the desired IP. Then I followed the HassOS documentation to try and set the same IP (static) with no luck. Formatted the USB pen, created the network folder and a my-network file inside it with all the needed specifications:

[connection]
id=hassos-network
uuid=d55162b4-6152-4310-9312-8f4c54d86afa
type=802-3-ethernet

[ipv4]
method=manual
address1=192.168.10.10/24,192.168.10.1
dns=8.8.8.8;8.8.4.4;

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

After I connected the pen to the RPi3, I went to the Hassio control pannel -> System -> Import from USB. Here’s what my system log shows after that:

18-08-09 09:12:00 INFO (MainThread) [hassio.hassos] Sync config from USB on HassOS.
18-08-09 09:12:00 INFO (MainThread) [hassio.host.services] Restart local service hassos-config.service
18-08-09 09:12:00 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.RestartUnit on /org/freedesktop/systemd1

When HA comes back online… it’s still on the same IP (DHCP). :persevere: Also… as far as I understand, I should have a “NetworkManager” folder under my etc/ with new network config file, but there’s nothing there, not even the folder.

What am I doing wrong??

Thanks in advance!

1 Like

for me
i set it up from the router to give static ip to RPI by mac address

Nothing that I can see. You named the USB drive CONFIG didn’t you? I just did this two days ago, and it took me 3 tries at importing before it actually worked… (Import, reboot. No, wrong IP address, try again…) Not sure why this method is being used instead of the simpler method that Resin OS used, where you could just edit a file before firing up your Pi. I even tried having the USB drive in the Pi on startup when I couldn’t get the import method to work. It was also unsuccessful. I’d keep trying, because it will probably work for you eventually.

2 Likes

Hey… it worked!!! After like 10 tries or so. I kept thinking I was doing something wrong and so I didn’t insist much on it. It’s really weird… and annoying! :face_with_raised_eyebrow:

Thanks mate!! :+1:

Yeah, it’s a bit strange! I’m glad it finally worked for you.

I have the same problem. I tried Import - reboot nearly 20 times without success. No “NetworkManager” folder on /etc I’m using HASSOS on a Rapsberry Pi 3 B+.
Is there any other way??

Did you find a way to fix this

No, unfortunately not.
I tried it a few times a day. I really do not know where the problem is. :frowning:

@kolossboss I finally fixed it… there was error in my config file. While pasting uuid i accidentally removed the word “uuid=”

:weary:
good to hear set. I think my config is correct, but still not working…

Try to follow this thread…

Additional troubleshooting steps - from what I’ve read there is an issue with that network configure example.

Separating the network IP/range and the router(gateway) address - it should be a semi-colon, not a comma. e.g.:

[ipv4]
method=manual
address=192.168.xxx.yyy/24**;**192.168.xxx.aaa
dns=192.168.xxx.aaa;8.8.4.4;

Additionally - if that doesn’t work, there’s the solution of popping the network information into a file called “system-connections” instead of “my-network”

USB - last thing to check is the thing formatted appropriately (FAT32, NTFS, EXT3)

I’m not sure if the USB port it took to get it working made a difference… but it was the bottom right port and it worked getting it onto Wi-FI (and later Ethernet after plugging in the cable) & static IP address. :slight_smile:

All of these steps worked after hitting the import, then rebooting with the USB stick in the Pi. Hopefully this will save someone the hours it has taken me to get it working.

1 Like

Thank you @Bergals… I’ve been mucking about trying to get a static IP onto my hass.io instance for a few days now. It seems that almost all the documentation/examples for importing the network configuration via USB separate the IP address and gateway with a “,” when as you point out it needs a “;”.

1 Like