Raspbian + Docker + Hass.io and static ip?


#1

I installed succesfully Hass.io to RaspberryPi 3B+:

sudo -i

apt-get update

apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq 
network-manager socat software-properties-common

curl -fsSL get.docker.com | sh

usermod -aG docker pi
    
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" 
| bash -s -- -m raspberrypi3

But problem is, after this Raspberrys mac address changes every time when Raspberry is rebooted, so I cannot set static IP for it in my router. So how to do it?

I know this is more Docker question, but I’m sure that here are many people who have similar setup.
I’m trying to learn both, Hass.io and Docker, so be gentle :slight_smile:


#2

As you are running on top of raspbian that would control the IP address of the host.

https://www.raspberrypi.org/forums/viewtopic.php?t=221060


#3

It’s not, because Docker doesn’t have anything to do with the IP address on your host. :wink:


#4

Is it normal behaviour that after I installed these packages MAC address (propably) changed, beacause it got a new ip from my routers dhcp?

apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq 
network-manager socat software-properties-common

Im trying to understand what is behind this.


#5

It is NETWORK-MANAGER causing it, but it’s not a problem


#6

Is network-manager necessary for this kind of setup?
I tried some other methods to setup static mac for wlan, but no success. Even macchanger didn’t work.
With google I found some others complaining same issues with Pi 3B+.

sudo apt-get remove network-manager

Fixes the problem, but does this affect necessary processes?


#7

No idea. I don’t use hassio.

I use home assistant in docker. :wink:


#8

It is not normal at all for a mac address to change. At least not on a non-mobile device. The whole purpose of a mac address is to hard code an identity of the hardware.


#9

Hardcoded stays same, but the mac visible to the network changes when network-manager is installed.
When I tested macchanger it identified macs as

Current MAC:   bb:bb:bb:bb:bb:bb (unknown)
Permanent MAC: aa:aa:aa:aa:aa:aa (Raspberry Pi Foundation)

So mac spoofing any other ways but random mac didnt work.


#10

This all changed in the last couple of years. It’s a network manager thing.