Import items, rules, etc from 1.* installs?

Why is this NOT a thing? I realize some people have just the right combination of devices and OH2 is just fine for them but I don’t have time to deal with filing bugs and jumping through hoops when my items are so EASY to configure in 1.8. So why not have an import function? Something in OH2 you can point to existing items, rules, sitemaps, bindings and ask what you would like to import and have configured. It would obviously make the transition a lot smoother. Like where do you even start with adding Insteon and mqtt items in 2.0 series?! And I heard the icons folder is a lot deeper than it needs to be too. Is there a reason for this? Why can’t icons be closer to the root folder like OH1? webapps/images - gee, that was easy! EVERY DAY in IRC (#openhab on freenode) people share their 2.0 pains yet get things running as intended in 1.*.

So, base question - why NOT an import function?

The simple answer is because no one implemented one.

It sounds like a great idea but implementing something like that comes down to priorities and getting the interest from one of the developers to implement something like that. OH is an open source project developed with volunteer time. Consequently the developers work on what they want and there really isn’t any way to tell them “no, fixing that bug is not as important as an import function so you should work on that instead.”

Also, such an import function is destined to become deprecated so the drive to build something that is rather complex that will become obsolete in less time than it takes to build it is not that strong. Building that sort of thing takes WAY more work to get right than most people realize.

Well, since both are 1.9 SNAPSHOT bindings you do it exactly the same as you have always done it as described on the wiki. On native 2.0 bindings work with Things and Channels. And if you look, there are not too many 2.0 bindings. Most, including these two, are exactly the same as the OH 1.x bindings.

You can add all the custom icons you want to the icons folder in your configurations folder (e.g /etc/openhab2/icons) which is way better than /user/share/openhab/webapps/images. So why does it matter if the rest of the default icons, which you shouldn’t be changing anyway, are buried somewhere in the runtime folders?

I do agree though, there are other files that are buried in places where they shouldn’t be right now (e.g. logging configuration) but there are issues to move those to a more sane location.

I’ve not been on the IRC channel so I can make no comments on what people are having problems with. But on this forum the problems can be boiled down to:

  • Assuming PaperUI and or Habmin should/could be used for everything
  • Not understanding that the 1.9 version bindings are the exact same bindings as we use in OH 1.x and the Items for these bindings are used exactly the same way as they are in OH 1.x
  • Not reading the migration docs and realizing that a number of classes have moved so imports and fully qualified class names that refer to org.openhab.core.* classes need to be modified in rules by removing the imports (they are included by default) and removing the package name elsewhere.
  • Not realizing that anything you do through the admin UIs are saved in a DB.
1 Like