Can I 'clone' a node for use as a spare?

I have an ESP32 based node that controls our Koi Pond. As it’s a critical piece of kit (critical for the fish health), I’ve put together a spare PCB and ESP32 flashed with the same firmware as the master.

In testing, the spare works fine as a stand-alone but does not communicate with HA. All entities show as unavailable.

I’m assuming that this has something to do with the IP address/MAC address of the spare ESP32.

Is there a way around this? I’d rather not have to add a newly discovered device and then change 50 entities from main_pump_2 to main_pump etc. in the event of having to use the spare.

Hope that makes sense and that there is a solution.

If you remove the integration for the Koi pond controller from home assistant before powering up the spare, the newly discovered entities should have the same entity ids.

Thank you Tom.

I was afraid that might be the answer.

I need to find a solution that does not require any HA changes as it may not be me that has to replace the PCB. I need it to just be a direct replacement.

Do you know how the device recognition is handled? Is it through the MAC address or IP address?

It should be possible to change the MAC address of the ESP32 if that is the case so that it is an exact clone, or is it more subtle than that?

If you code the ESP with a fixed IP address and all code between the two devices is identical then swapping out a dead one for the spare should not be noticed by HA.

I can do that but not in my router.

Will setting manual IP in ESPHome config achieve the same thing?

The original has a static IP set in the router.

Yes, set it in the ESPhome YAML for that node

1 Like

Thank you, @sparkydave, that fixed it.

I appreciate your time.

No worries mate