Spoofing your Raspberry Pi's mac address

Hi, I have HA installed on a Raspberry Pi using the HASSOS installation method. I have a second Raspberry Pi which I want to set up as a clone of the first so that in the event of a hardware failure, I can swap the second Pi for the first. One issue is that I have IP address assigned to the first Pi associated with it’s mac address and I would like the second Pi to have the saqme IP address when it is swapped in. This means I really need to spoof the mac address of the second Pi to be the same as the first. Is this possible in a Hassos install of HA?
If yes, any guidance on how to do it would be very much appreciated.
Thank You

Can you not just use a static IP set in HA?

2 Likes

As fleskefjes said, or, as an alternative, use an USB Ethernet adapter and swap this to your second Pi.

In my experience it is easier to do a full restore if something goes wrong than try to keep 2 systems up to date. Then just change the new device to the old IP.

Hardware very rarely fails unless its an SD card.

Thanks for the replies. My preferred option is to spoof the ethernet mac address on the second PI, as I have reserved the IP address in my router settings and have a port forward so I can access my HA from outside the house. Setting the static IP in the PI risks some other device grabbing that address and preventing the Pi from connecting to the network.
As for mantaining 2 copies of HA, I have SSDs on both Pis. I update one then just use an SSD duplicator to update the second one. Simples :smiley:

Yep I know its simple to copy an SSD, it just seems like a bit a faff just in case a bit of hardware fails. It will only take 30 mins or so to do a complete install and restore. I would much rather that than copy the SSD every week or so.

Arh
When I am away from home, I want a simple plug and play solution for my techno phobe other half to restore HA to a fully functional state :slight_smile:

Just set a static IP outside the DHCP scope.

2 Likes