Migration from 1.8.x to 2.0 - My Feedback and Issues


I work on my migration from 1.8.1 to 2.0 since a couple of days. But I found to many problems at the moment.

  • No JavaScript support for Rules like in OH1, no progress?
  • No build-in authentication as in openhab 1- needs reverse proxy :frowning:
  • Values not correct formatted on updates
  • Must I change old rules to use new item names with new 2.0 bindings (no items file used?) ?!
  • Mixed mode with old items, rules and new discovered items possible !?

At them moment I only use the 1.9 versions of the bindings. This works like OH1.

I would like to know I do things wrong or what the current status is. Feedback also welcome…

JavaScript is only supported through the JSR233 binding. There is an Experimental Rules addon you can install after enabling Experimental sources in PaperUI. I think that supports JavaScript.

I also think that the JSR233 binding can be installed using the openHAB compatibility layer, but am not sure it completely works.

Watch the following issue on GitHub for progress on enabling authentication. Alternatively yes, use a reverse proxy or my.openhab.

I thought that bug was fixed in the latest build. I haven’t see that error yet.

If you use the 1.9 bindings in OH 2, you can use your existing Items files and Rules almost as is (you may need to remove some imports in your rules files). I am successfully doing this and have documented the procedure here:

Its a work in progress though.


1 Like

Not yet, I am still working on it, see https://github.com/eclipse/smarthome/pull/2030.

Ok, thank you for you excellent answers. The JSR 223 topic is my absolute favorite, so I’m interested to write my rules in JavaScript. But to start with the 1.9 binding on a new version is not optimal even if it works.

There is currently no documentation or examples to the new experimental rules engine ?!?

You should then follow https://github.com/eclipse/smarthome/pull/1783

Only what is there at Eclipse SmartHome, but this is rather developer, not user docu:

Not really. There are plenty of 1.9 bindings, all of which are undergoing continued development. I suspect that many OH 1.9 bindings will never have a 2.0 native binding created. So just because it is a 1.9 binding, by itself, would not be a good reason to avoid a binding. There could be other reasons of course.

Yes, but the jsr 223 binding will be replaced with the new rule engine. In this case it makes no sense to me to start with the old binding. I will wait until a stable release with java script is available.