What causes "replacement"?

What causes this and how can I avoid it?

A couple of times now, the device list has changed unexpectedly, to show an extra device, with the same serial number as an existing device, but with the name changed to “Replacement for XXXXX” (or similar) where XXXXX is the ID of the other device. The previous device is offline, the “replacement” is online.

I’m not sure why this is happening, but it has two undesirable effects: Firstly, my carefully chosen name is gone :slight_smile: and secondly now I’m paying for one more device.

My response in both cases has been to delete the old one and rename the new one. However, I’d like to know why it is happening so that I can avoid doing whatever I did!

I have moved cards between devices, have rebooted devices locally, and have changed devices from Ethernet to wifi and back, sometimes more than one of those things at once. However, there have been no new Pis, no new cards, and no rewrite of any cards. Because I have not been paying attention properly, I am unsure exactly when the “replacements” appeared relative to those actions.

Regards, K.

For the device “replacement” logic to become active, these things need to happen:

  • A device is configured to self-register with the service using a device connect key. This is a small file on the SD card that contains information that allows the info-beamer backend to assign a device to your account automatically instead of requiring you to enter an 8-digit PIN during installation.
  • A device reset itself and reinitialized the SD card with a new device identity. This happens when:
    • you delete the device from your account (device detail page > Manage > Delete)
    • you swap SD cards between devices.

Once these preconditions met, such a device will contact the backend to see how it should be registered. If it provides a device connect key for self-registration the device is added to the account. The backend then also checks if a device with the same Pi serial number already exists within the account. If that’s the case, the newly added device gets the “Replacement device for ” name and is automatically assigned the same setup.

This is meant to help when you replace SD cards: Use device connect key registration, swap out the card of an already existing device and it will self-register and play the same setup as with the old SD card.

I’m pretty sure this is caused by you moving SD cards between devices. This causes them to reinitialize again as the device identity (stored on the SD card) is bound to the Pi hardware and moving cards changed that. Does that help?

That certainly does help. Thanks!

I’ve turned the question and your response into an FAQ. Feel free to delete it if you don’t think it should be there.

Thanks. Looks good to me!