Remove and re-join keeping IDs

Hello all,

I have to do some updates on some ZWave components, and for that i have to remove them.

They are mainly Fibaro components, so updates can be done only with components linked with Fibaro Center …

But, i already have configured them into HA, and used in automations.

Do i have a way to :

  • Remove them from HA (RPI)
  • Add them on Fibaro Center
  • Update them
  • Remove them from Fibaro Center
  • Add them on HA but KEEPING OLD IDs and everything as it was

Thanks for help.

If you’re talking about Node IDs assigned by the ZWave controller, No. Zwave treats every “Add Node” request as a new device and assigns the next available and previously unused Node number to the newly paired device. Only after the ZWave controller uses all 232 available Node IDs the first time will it start re-using previously used but currently unassigned Node IDs.

If you’re asking about HA assigning the same entity ID when connected, I believe as long as the device’s name in the ZWave controller does not change it should create a new entity with the old entity ID. The caveat is you have to delete the entity ID after you remove the ZWave node and restart HA, otherwise the new entity created when you pair the ZWave device again may have a number appended to it, ie. “_2

and if all else fails after you pair each node again go to the entity registry section of the configuration page and delete the old entity then rename the new entity to the old entity_id.

Yes, you need to exclude them and then re-include them. The node_IDs do not matter but the entity_name for the automations.

You can open the /config/.storage/core.entity_registry file and rename the new nodes to the old entity names. Then your automations will still work. One Fibaro device normally creates 3 to 20 entities. You can rename all of them in one go but make sure that you include one, rename it and then only add another one to not mix up devices. Also make sure that the old entities are removed.

Create a backup when fiddling with core.entity_registry

I don’t think that is necessary or even advisable since you can do exactly the same thing thru the configuration-> entity registry page and you don’t run the risk of messing up the formatting of the .storage file system.

I agree that it is the better method. However, you cannot (a) search for node-ids and (b) replace the name of multiple entries at one - especially when a ZWave device creates 18 entities.

You can use the Integrations panel, where all the nodes are grouped together with their entities. Makes renaming simple. Slower than editing a text file, but it’s safer and you don’t have to restart.

3 Likes

Ok, thanks for advices.

But i have quite 10 elemnts to do, i cannot do it massively …
For keeping each element to his location, i have to join and change name 1 by 1 …