Eclipse Designer -- Unable to "see" any PaperUI-created things/items

In the hopes of this not becoming another 41-minute flame-fest read like Help, I’m ready to give up let me start by saying that I’m not a Linux noob and work with professional IDEs on a regular basis, including those customized for both for context, as well as language.

TL;DR Following Eclipse Designer installation instructions is not providing visibility of existing Things and Items. Editing Things and Items in the PaperUI is painfully slow due to UX flow. How can edit existing Things and Items in the Eclipse Designer?

I have OpenHAB 2.0.0-1 up and running successfully with the Lutron bindings installed on a Raspberry Pi.

Using the PaperUI I have added the Lutron SmartBridgePRO, the Caseta dimmers, and the Pico remotes that have been physically installed at this time.

I am aware of HowTo: Manage OpenHab 2 configurations which indicates that the configuration information is stored in Karaf, or at least was, as reading down the posts the information is identified as obsolete. further indicates that using the Karaf console cannot around half of the types of configuration listed in the table, including; sitemaps, transformations, persistence, and rules. Further, indicates that the backing store has changed since that post.

I have downloaded (yesterday) as described on unzipped it, dealt with the fact that it is not signed, and launched it. (Mac OS X 10.11.6)

The instructions continue and illustrate

  • Click on the small folder icon at the top right of the configuration window
  • Navigate to your openHAB configuration folder (containing items, rules, …)

There are two configuration locations that I can identify on the Linux system, based on information of backing up the OpenHAB configuration, /var/lib/openhab2 (active) and /etc/openhab2 (skeleton only). /etc/openhab2 is the only one that has the indicated file structure. Opening that as described in the designer instructions does not reveal any of the created devices. Even though /var/lib/openhab2 does not contain the proper directory structure, I have tried opening it and various of its subdirectories as it does “active” data.

In no cases have I seen anything that looks even remotely like the configured Things and Items.

Manually editing Eclipse-specific JSON dumps of some internal database seems error-prone at best, especially as there is no schema with index and FK constraints as one would expect from a relational database.

How can I configure and use Eclipse Designer or other robust tools (use of human-readable instance names, as well as at least syntax and preferably logical checking) to manage existing Things and Items, as well as the remainder of object types, such as Sitemaps, Rules, Groups, and the like?

Unfortunately, you cannot use the Eclipse SmartHome Designer (ESHD) to edit openHAB 2 Things and/or Items (and their links to channels) if you have used PaperUI to create them, since this info are saved in the JsonDB Storage (which is not an RDBMS… that would be too heavy)

ESHD works with the configuration files in your OPENHAB_CONF folder (e.g. /etc/openhab2/ in Linux apt based installation).

There is no editor (currently) for JsonDB files which store configuration data for Things, Items and Links.
You can manually edit them but it’s not easy… you are right. By the way, the doc entry for JsonDB has been updated and will be further enhanced soon:

Regarding ESHD: I recommend to use release 0.80. There are some issues (can’t find the link atm) with the snapshot 0.90 release. (I know… the docs recommend the nightly snapshots build)

I am planning to post an update to that thread (how to manage the confs) which will include some additional info on JsonDB and other stuff. I tackled only a small part at that time (configurations for bindings).

Since you are an advanced user of computing systems: you could switch to manually defined Things & Items and then use ESHD to work with them.
I do this (with the exception of Z-Wave Things) and I mainly use ESHD to verify syntax for all my OH2 stuff (things, items, sitemaps & rules)

Just to provide a bit more detail and some insight for how we got to where we are and where we are going…

If you do it in PaperUI you can’t touch it in ESHD. If you do it in ESHD, you can see it in PaperUI but you cannot modify it there.

Many people, myself included, use PaperUI to manage automatically discovered Things only and all Items, Rules, etc are managed in the text files configurations using ESHD.

The /var/lib/openhab2/userdata folder is Karaf’s “working” directory. Changes made using the UIs as well as persistence data stores and runtime configuration (e.g. logging config) end up here. Parsed versions of the stuff in the conf directory end up here as well.

The text based config, the stuff that ESHD deals with, reside in /etc/openhab2. This is the only directory ESHD can deal with.

Those instructions should be updated to make it more clear that the /etc/openhab2 or <openHAB2 Home>/conf folder for manual install is what is meant.

Now for where is all of this going. PaperUI is in the process of undergoing rapid development. The intent seems clear that eventually it is intended to be fully feature complete so one need never mess with the text files or ESHD if they do not want to. Clearly PaperUI has a ways to go in this regard but if you had seen it only three months ago you would see how far it has come.

That being said, PaperUI is not required. Theoretically one can do all the configuration and management of everything using the text based files (I say “theoretically” because the syntax to manually define Things for zwave are not documented but even in those cases you can manage the automatically discovered Things in the Karaf console).

This means that the main focus of the developers appears to be on improving the functionality and capabilities of PaperUI and ESHD is not getting a lot of attention. Couple that with the eventual goal to do away with ESHD in favor of a web based editor suite and the continued development of the Experimental Rules lead me to believe that we will probably need to plan on limping along with this bifurcated config approach and a slightly broken IDE until all of these things mature.

This is a time of transition for OH and there are a lot of things that are transitioning.

Right now, ESHD is the only game in town. Use the 0.8 version for now. @ThomDietrich, clearly that issue has not been fixed yet and it seems like it might be awhile. Perhaps removal of that line recommending using the nightlies should be removed until that issue gets fixed.

There is no tool that will test logic. ESDH does check syntax and, assuming you are using text file defined Items, it is Item aware (so if you have a typo in your Item name in a Rule it will detect that).

Finally I’ll leave you with a warning. The Rules DSL is challenging for a lot of developers to get their head around. In particular, the Rules DSL is very unsuited for developing in an OO or procedural style. It doesn’t provide easy ways to set up data structures. And it unfortunately does not provide meaningful errors in many cases. When you start working with Rules I recommend stepping back and looking for another way to code something if it feels like the language is fighting you. Look at the Design Pattern postings for some good canonical approaches to solve some common problems. And hopefully soon the JSR233 Binding will finish migrating to OH2 which will let you code Rules using Jython or JavaScript.

Personally, despite its flaws, I find the Rules DSL to be particularly well suited for home automation and when one leverages all parts of OH in the Rules (store state in Items, use Groups for data structures, Expire Binding, and Persistence) one can make very short and clear rules.

1 Like

Thanks for the quick reply!

I know I’ll certainly benefit from clearer documentation about what works and what doesn’t. Both are equally important, in my opinion.

When you do update HowTo: Manage OpenHab 2 configurations, if there is a way that you or an admin can update the lead post to indicate that the good information initially presented is no longer current, that would be helpful.

1 Like

Done :wink: