openHAB 3.0 Milestone 2 discussion

Working now after

[01:24:56] openhabian@openHABianDevice:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up openhab (3.0.0~M2-1) ...

[openHAB] openHAB was not running so will not start after upgrade.
[openHAB] Please use the command:
            sudo /bin/systemctl start openhab.service

Setting up openhab-addons (3.0.0~M2-1) ...
Updating FireMotD available updates count ... 
[01:25:29] openhabian@openHABianDevice:~$ sudo systemctl status openhab.service
● openhab.service - openHAB instance, reachable at http://openHABianDevice:8080
   Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/openhab.service.d
   Active: active (running) since Tue 2020-11-03 01:16:16 CET; 9min ago
 Main PID: 2968 (java)
    Tasks: 171 (limit: 4915)
   CGroup: /system.slice/openhab.service
           └─2968 /usr/bin/java -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userd
Nov 03 01:14:16 openHABianDevice systemd[1]: Starting openHAB instance, reachable at http://openHABianDevice:8080...

In the past I’ve noticed that when running an Action Script directly (e.g. by triggering a Rule using the play button or running the rule from another rule) that some things are missing from the context. The mode impactful missing thing is access to the Actions. For example:

var Log = Java.type("org.openhab.core.model.script.actions.Log");
Log.logError("Experiments", "This is an OH error log");
Log.logWarn("Experiments", "This is an OH warn log");
Log.logInfo("Experiments", "This is an OH info log");
Log.logDebug("Experiments", "This is an OH debug log");

This run just fine when the rule i triggered by an Item event. But if it’s triggered by pressing play or triggering it from another rule I get a Class not found exception on org.openhab.core.model.script.actions.Log.

Is this also the case with these scripts? If so it’s a pretty significant limitation and need to be mentioned. If not than “woohoo!” :smiley:

@denominator There is an open issue on this. My finding ist that this error only occurs if OH3 is running when trying to upgrade. If oh3 is stopped the upgrade process works fine.


@Kai can you please add my new remoteopenhab binding as new binding in the release notes?

Good point, we had missed to tag that PR with the milestone when merging. I have added it manually to the release notes now.
@Lolodomo May I ask you in return to do a small PR to fix the table in the docs? Thanks :slight_smile:


I noticed the Z-Wave Thing documentation there is not current. We just checked and the new documentation is in the binding repo. The old docs reference the old database site.


Yes, unfortunately - they are just rules so they suffer from the same problems. This is probably fixable and should be addressed. The “log” block in Blockly is translated to code that instantiates what you call a “native logger” (from org.slf4j.LoggerFactory, which works) in openHAB 3.0 my getting started notes: Rules - by the way, your notes were helpful as a reference.

1 Like

first of all, thank you for that awesome Milestone! It’s fantastic. I am playing around with the new version and have one question. Is it or will it be possible to import existing thing and item files?

Thank you for your work and help!


It’s already possible to import existing Item files.


After clicking the + icon on the Items page select “Add Items from Textual Definition” and you can paste the contents of a .items file there and it will load them into JSONDB. NOTE: You then will need to remove the .items file. You don’t want OH to have the same Item defined in both places.

There is no equivalent for .things files (yet?). But for that case you would probably want to rediscover the Things anyway.

1 Like

Thank You, for items thats fantastic, but for my knx thing file it is a desaster… I have to manual add every knx device and the channels withe the adresses… Is there no other possibility for things than readding them by the UI?

You can keep on using the .things files you already have. Support for .things and .items files don’t go away.

Thank you Rich, I know it, but I thought that a managment in the internal database is better.
An other question is, how can I take a look with frontail in the oh log?

Install openHABian or install and configure Frontail manually and then point your browser to where Frontail is running. Frontail isn’t actually a part of openHAB. It’s a separate service.


One thing you could try is request http://oh2:8080/rest/things on your openHAB 2 instance. This will dump every thing in JSON format. It’s ugly but you can pretty-print it for instance with, so you can identify individual things more easily - it’s an array of objects like


You have to extract every one of those objects, and in OH3 you can go to Developer Tools (on the left), API Explorer, expand “things” then the green “POST /things” entry. On the right click on Try it out, and paste the things you extracted from above under “thing data”, overwriting the example. Then click on the Execute button. This should add the thing to the internal DB.
I’m not guaranteeing this will work 100% but you can try with one thing and see how it goes.
If you know a scripting language like Python it wouldn’t even be too hard to write a program with a simple loop to do all this for you.

The .things syntax is a little more convoluted than the .items syntax (it’s also far less documented) so writing a Nearley grammar for it so to parse them into JS objects is even more of an headache. It’s also not a flat list, there are blocks and so on. For reference the grammar for the .items syntax is here: There’s also one for sitemaps here:
If anyone wants to give it a shot, though, that would be awesome :slight_smile:


Since Blockly is integrated… will NodeRed also be part of OH3 in the future?

Thank you very much for the remoteopenhab binding. For me and many others (I guess) a “game-changer” :grinning:!

Next to OH2 compatibility this will bring us solutions for multiple locations and when dealing with range limitations of wireless protocols. Auto discovery of multiple OH servers and items on these works fine.

Really appreciate it!!

To do that you would need encrypted communications. This binding is unencrypted http only.

Agree, but at least my use cases concern multiple locations on the same LAN. Multiple LAN’s can be tied together using VPN connections if necessary.


i have an Issue with the Main UI.
When i connect to openhab via myopenhab or via nginx reverse proxy from outside my Network.
I don’t see item states, only a “-” if work inside my LAN i see the itemstates in MainUI.

im working on Docker with OH 3 M2

I am very excited about M2 of openhab3 and make my progress with the setup. During this I have recognized some points to imptove the ease of use.

  1. The possibilitiy to change the hierachy inside the semantic model afterwards, during the conception this is very important I think (drag and drop)
  2. The possibilty to easily copy items, channels and thing names. (like in paper ui)
  3. Display of the columns inside a script (impotant for the analyses of a failure)
  4. The possibilty to change the size of the script editor

Thank you very much to all the programmers for this nice piece of software!!!


I have been away too long from the cutting edge in terms of deploying snapshot builds; Is there a way to trigger an update of the openhab-core bundles in the karaf runtime?