Possible to transfer Zwave Things from one openhab to another? (same zwave stick)

Hi all,
I have a Raspberry Pi running OH2, with an Aeotec Z-Stick 5.

I also have a stronger server now, running ubuntu. I was experimenting with OH3 running inside a docker container. I got to the point where I can run the container, have it access the Zwave stick, and get the Zwave binding online.

Now I would like to add Things that are in my house.

In all honesty, I don’t know that much about Zwave, so I have no clue if the stick stored the IDs of all devices internally, or if they are only known inside OH.

So my first hope was that stuff would automatically appear in the inbox of my OH3 instance, and I would have an easy life. I should have known better ;-). Nothing appears auto magically. I am sure for good reasons.

It would be quite a challenge to get physical access to all Zwave modules in my house, so I am still hoping there is another way.

Is there anybody who could give me some pointers / best practices / suggestions how to best approach this?

  1. where are Things stored? I guess in an internal database inside OH?
  2. can I access this database, and export / transform this to the database inside OH3?
  3. Can I do something physically with my Zwave stick to get “already known things” inside OH3.

Best regards, Bas

Did you run the Zwave scan (via the add Things in the UI)? That should find the devices. Exception is if you have securely included devices such as locks which I believe you need to copy the security key for.

Also, why not go to OH4 instead of OH3?

As noted by @jswim788 the nodes are on the zstick. When you scan they should get added to OH. (may need a restart or two and wake the battery devices) One tip might be to copy the XMLs in var/lib/openhab/zwave (userdata/zwave) to your new installation. Also when you manually configure your zstick, some find it helpful to set the UID to that found on your old XML’s. Example network_d2818a75__node_3.xml UID = d2818a75

Of course, all the channel links and items will need to be recreated unless you backed them up and restored (however, not sure that is even possible with OH2, it’s been too long.

Also agree you should go to 4.1. The container includes Java 17, so I don’t think there is anything special needed. Anyway with docker it is quick to try and switch back.

Ah, it worked for at least a couple of minutes ;-). I managed to add a couple of zwave nodes as you suggested, but now the zwave stick remains in error. Googling that seems to be quite a horrible hunt for a solution.

And I thought OH3 was the new thing. At least, it was a couple of years ago when I didn’t dare to upgrade the PI to OH3 haha. Now it is indeed latest, which is 4.1.2

So this question is solved, it’s not hard to include devices on a new OH environment.
But I need to figure out why the bloody thing won’t get online anymore.

Thx both for the clarifications and suggestions!

Your openhab.log file is the place to check next. Should give some clues.

Fixed, works like a charm. Thx again

PS: I did something funny too to break things.
I had some issues sharing /dev/ttyACM0 with docker. So at some point, I caused ubuntu to re-iterate USB device and it came up with /dev/ACM1.

One of my attempts to fix it was sudo chmod 777 /dev/ttyACM0
Note the wrong index. It should’ve been 1, but I missed that.

This results in something I didn’t realize, but now a directory is created with all permissions with the name /dev/ttyACM0.

When I now replug the Z stick, ubuntu mounts /dev/ttyACM0 to the stick. Openhab tries to use that “file” but fails.

So after simply deleting /dev/ttyACM0 and reinsert the stick, OH can read the file again and all problems are solved.

I wonder if similar problems also were the case in the many many posts I have seen over the last hours regarding OH showing the Zstick as offline :slight_smile: