OH1 to OH2 migration - Z-Wave devices?

Hi there!

For over a a year and a half now I have a successful OH1 install running on a Raspberry.
The system runs most of the house, rollershutters, blackouts, gates, lights, hvac, etc etc, and is composed of a mix of several devices: several raspberry’s connected to relay boards, ESP8266’s, and finally a few z-wave devices.

I’ve setup a test raspberry with OH2, and I’d like to migrate my system. I have a few hundred lines of code with rules and items - I’m not just going to drop them on the new install, I’m going to make a fresh install and rewrite everything, as the OH1 was written while I was learning, so there is much to clean up.
Most items are no problem, as they are setup with MQTT.

My problem is with the ZWAVE devices. My question is, are the zwave network settings/pairings/node numbers saved in the USB pen? If I unplug the USB pen from the OH1 raspberry and plug it into the OH2 install, can I use all the same node designations, or will I have to pair up every device again and start fresh?


Pairings and node numbers are stored in the controller. Settings are stored on the device.

Yes - no problem in general. Some devices may have some issues as the way associations are configured has changed due to the MC association system that is now becoming common in ZWave, and this was not in the OH1 binding. If you find associations aren’t working, you may want to exclude/include the device.

1 Like

Yes they are. You should be able to migrate your zwave devices without a need to re-include them.

Read the migration tutorial and go for a step-by-step migration.
I suggest to start with an openHABian install and a rewrite of your rules.
You can use Karaf console to generate events as a ‘dry’ test to validate your rules to work.
Once you feel them to be ok, install the OH1 zwave binding on your new box with your old OH zwave config and migrate your devices. Finally generate the OH2 zwave config and exchange the binding (you can make this step this forth and back if required).

1 Like

One last bit of advice, start with at least OH version 2.4 M4 so you can pick up the latest zwave binding changes from Chris. If you start with OH 2.3 you will have to delete and recreate your Things when you migrate to 2.4. It also includes a lot of wonderful goodness like support for locks.

As you rewrite your Rules, have a look at the design pattern postings for ideas on how you can consolidate and refactor your Rules. The newish Member of Rule trigger and triggeringItem implicit variable will be particularly life changing in Rules

Good luck!

1 Like

I would like to ask a few questions here. Right now I use oh 1.7.x installed on a rpi2 and a few fibaro devices connected to an aeon gen5 stick and I plan to move to oh2 but I don’t know which is the best way to do this.

  1. What oh2 should I install? Should I try openHABian? Or should I follow the steps described in the migrating tutorial?
  2. Do I have to rewrite all my config (items, rules, sitemap) or oh 2 will recognize them all.
  3. Is there any simple tutorial to follow to get oh2 running because the one on the site looks to have a tons of explanation and you can easily can get lost in it since the beginning.
  4. What rpi software version works best with oh2 and what java version?
    Any advice will be appreciated

It depends on whether you want to upgrade on the same machine or you are preparing a separate machine. If you are preparing a separate machine go for openHABian. If not, the migration tutorial will probably be a better approach.

The necessary changes are covered in one of the middle sections of the migration tutorial. Initially you will have a few changes to make to Rules for sure. There might be some needed for Items or Sitemap to clear up warning and errors. But for the most part the changes are small and minor.

Eventually you will want to upgrade your bindings to the 2.x versions of the bindings at which point Things and Channels come into play which will require changes to your Items and potentially Rules as well. But get what you have now running on OH 2.x with the 1.x bindings first.

The migration tutorial is all there is as far as I know. It has a lot of explanation because there is a lot to explain. OH 2 is very different from OH 1 in many ways.

NOTE: The migration tutorial was written from OH 1.8 to 2.0. Since you are coming from 1.7 you may run into issues not covered.

Raspbian Jessey and Zulu Embedded Java 8 32-bit. These are what openHABian install.

… since you’re not going to 2.0 but likely to 2.4 right away, it also will include all the differences from 2.0 to 2.4. That’s not necessarily more changes in total but some might not be covered by the migration tutorial.

No, openHABian is Stretch based now. And if you move to/remain on a RPi, don’t mess with installing it yourself but go openHABian.

I knew that. I don’t know why I said Jessy.

Thanks, I was thinking to buy a new SD card for my rpy and to go with openHABian, at least this was one of the initial option but if I choose this way can I find this last version 2.4 openHABian on the site?
What about the network settings? Is there any tutorial with info about what exactly needs to be set on rpy? Right now I have some issues with network connection and I don’t understand why! Sometimes when I open the phone app it says the local is off and keep tries to connect remotely and sometimes it works without doing anything on the local network!
How about rpy 3b+ do you know if the integrated Wifi its ok? I’m thinking to by one to skip the Wifi adapter.
Thanks again for the reply.

You’re convalescent so you’re forgiven.

You can select which OH version to install via menu.
Just get the openHABian image and follow the install instructions. Check if your router properly assigns DHCP address and allows for connecting to the Inet. If you still have problems open a new thread please. Don’t forget to follow this as we can’t do 1:1 support on everything.

Not sure about WiFi, it’s said to work. But I’d recommend to use Ethernet anyway.

I should have said Wheezy. :smiley: :mask:

I find it works great as long as you are not using the on board BT at the same time.