I am replacing my z-wave stick and was wondering if there is an easy way to just change the ID on all my things rather than re-adding all my things and items?
For example my old z-wave stick was defined as zwave:device:12345 but the new one shows up as zwave:device:67890.
I imagine shutdown openhab and modify the jsondb would be a good place to do this? Not sure if this would work.
Finally now that I am pretty comfortable with how OH works I see the benefits of defining everything in thing and item files. Is there an easy way to convert my existing config into these files? I have roughly 40 devices so it’s a bit of work to do it all manually.
You don’t need to delete things if you replace the controller to have the new one have the same homeID as the old one. And even if so, it’s rather easy using autodiscovery.
The much more difficult part is if you controller’s homeID is changing (i.e. when you can’t restore the old controller’s config to the new HW so it has a different homeID) because in that case you have to ex- and newly include all devices with the new controller (that will store that controller’s ID on devices).
You shouldn’t have needed to create a new controller Thing. You should have shutdown OH, pulled out the old stick, performed backup of old stick, restored backup to new stick, plug in new stick to the same physical USB port, restarted OH, and everything should have resumed as normal. I guess this is assuming you had manually created the old controller Thing.
I’m surprised you don’t have duplicated device Things now too. Did you delete the old controller Thing? If so, delete the new controller Thing, and manually create a new one. When it is being created, specify the previous Thing ID that you used. You could also shutdown OH and search/replace in the Thing json db, but that can be dangerous.
Items files make sense, but less and less. The REST API, and therefore the Paper UI, are still very limited in what can be manipulated in managed Items. Thing files don’t provide much benefit, and comes with a major negative… your devices cannot be configured through the UI. I recommend to stay with managed Things.
Ok yes I already deleted the old thing so I will do as you state and delete the new and recreate manually. Now I want to say I tried that earlier but then another USB zwave device keeps popping up in my inbox.
Also thanks for the input on the thing / item files. Makes sense so I will stay with the paperui stuff.