Currently I have two pi’s. One running HA and another one running Pihole, because installing the pihole addon doesn’t work (see link above).
@frenck told me that the addon won’t work without issues if I don’t setup a static ip and dns. Before I had a dhcp reservation on my router, and I thought this was the same as a static ip.
I think it wasn’t neccesary (I already knew this way), but I reinstalled has on my sd card bootting it the frist time with a configurated stick (CONFIG/network folder).
After that unplugged my pihole-pi and pointed the dns-filed of my router to the hassio device ip.
It still doesn’t work. Any help appreciated. These are the questions I have so far:
How can I proof that it used the settings from the usb stick and I have a static ip?
Can I keep the address reservation in my router or do I have to delete that?
I read the topic on github, so lets get a bit in depth of what is happening:
Both frenck and me (theBrozilla, don’t ask) told you about reserved and static ip address, those are two different things.
Assigning an address consists of four steps in dhcp:
DISCOVER (a device with no address asks dhcp server for an address)
OFFER (dhcp server offers an available address from the pool)
REQUEST (a device requests an address to be assigned to it)
ACKNOWLEDGE (dhcp server confirms address is assigned to a device
Reserved address means dhcp server will take an address, put it to the side and only give it to a specific device. So a device will send DISCOVER, dhcp will look if there is a reserved address. If there is, it will send OFFER with reserved address to device. If not, it will take an address from the pool and send an OFFER with it to the device. Device will send REQUEST, and dhcp will finally ACKNOWLEDGE.
Static address means device will skip skip first two steps. It will immediately send REQUEST for an address it wants. If that address is available, dhcp will acknowledge. Problem here is if you didn’t reserve that address directly on dhcp, another device might take it.
Reboot your host (not just home assistant) and check the router. If your rpi now has that random address from rpi configuration, you made it. Reserve that address on the router and that should be it.
The thing is I should already have have both, because I have the reservation (that I had for months now) and I set up the static IP as shown in the docs.
Is there a way to keep the ip I currently have? Switching to another one might cause other issues.
I’m not sure about the /24 do I have to adapt this value for my network too?
After booting with this file the device got the new IP XXXX:110 so not 199
Did you remove reserved address from router?
Is your router address 192.168.0.140 and your desired rpi address 192.168.0.199?
You don’t need to shutdown or unplug rpi for this action.
Go to hass.io -> system. Click hardware and check under disks. There shouldn’t be any.
Put usb in rpi.
Refresh page. Go to hass.io -> system again. Click hardware and check if there are any new disks. If yes, go to next step.
yes, my setup looks like this. I have a router/modem from my provider and I also have some apple routers.
At first I had a double nat network . Currently I moved the the modem/router to the “applenetwork”. So the 192.168.0.140 is the gateway (provider modem) and my apple time capsule does the dhcp reservation (192.168.0.1).
Did you remove reserved address from router?
Yes I did that, and because of the pi got another ip but not 199 (not already taken).
I can confirm that there isn’t anything
after putting the usb stick in, I get this
disk:
* /dev/sda
* /dev/sda1
looks fine
19-01-17 18:39:50 INFO (MainThread) [hassio.hassos] Syncing configuration from USB with HassOS.
19-01-17 18:39:50 INFO (MainThread) [hassio.host.services] Restart local service hassos-config.service
19-01-17 18:39:50 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.RestartUnit on /org/freedesktop/systemd1
Stick should be formatted as fat32, stick name must be CONFIG when you are formatting.
On empty stick, you should add folder network.
Inside that folder create a file my-network.
Does your dhcp have 192.168.0.199 in its range at all? Some dhcps don’t have range of the subnet in their pool by default, mine for example is 192.168.1.2-192.168.1.99, subnet 255.255.255.0 when on factory settings.
yes, I did it exaclty like that since the first try.
I will try it again with your settings.
After deleting the dhcp reservation the ha device gehts ip around 100-130.
So know I set the static ip to the one I want in the end, if it gets that ip after rebooting it should be fine.
Thr default dhcp range of my router is XXXXXX:100-200
The next thing I’ll try is to set the wifi settings I had before I switched to ethernet.
This would proof that it loads the file.
EDIT: Ok, so I also fail to load the wifi settings. As I said I already used this file before and I didn’t change it. I also use the same usb stick.
So the issue seems to be that the rpi doesn’t load the file, although the lines above show that the usb stick is mounted.
Any further suggestions.
My next try would be to use another stick.
I found the issue. After copying the UUID I changed it randomly. Doing this I did not notice that it has something to do with the hexadecimal system and used random keys.
So I also had letters like k in it.
Hopefully now the pihole addon will work as expected.