openHAB 3.0 Milestone 2 discussion

You then have a Java / Gentoo question, not an openHAB specific one.

The openHAB solution would be to use Docker, a VM solution, or an OS supported by Java 11.Java 11 is the current LTS release but not even the current release.

No, my question is how to make OH3 use an extracted JVM somewhere in the filesystem.

I believe that would depend on the underlying filesystem but I am no Java expert. If Java 11 is not supported on that OS then your options are either a Docker container or a virtual machine.

Maybe GrallVM is supported by Gentoo. You can use it too.

Apparently, as expected the Gentoo wiki has the answer.


This is not a Gentoo question. If I want to have Java 8 as system vm, it should be possible to run a Java application with a JDK 11 that is extracted somewhere. At least, this is possible with every other Java application and there should be no need for docker etc.
I am sure, that it is also possible with OH3, I just need to know how.
Normally, it is enough to set JAVA_HOME accordingly. If not, then change PATH also. But both were not enough for OH3.

OK, so I hacked runtime/bin/inc and runtime/bin/setenv to not do special Gentoo handling and now my JAVA_HOME, that I wrote into setenv and inc is being used and I can see jdk11 in the process list.

After startup, I point the browser to the UI port, create an admin user and then the screen is just grey.
When I restart and try again, I now have to login as admin but the result is the same. Grey page. No errors in openhab.log, but in the browser console:

app.js:9 POST 500 (Server Error)

Response body:

{\"error\":{\"message\":\"Cookie is malformed : secure\",\"http-code\":500,\"exception\":{\"class\":\"java.lang.IllegalArgumentException\",\"message\":\"Cookie is malformed : secure\",\"localized-message\":\"Cookie is malformed : secure\"}}}


2020-11-20 15:49:08.684 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-11-20 15:49:09.560 [INFO ] [org.openhab.ui.internal.UIService   ] - Started UI on port 8091
2020-11-20 15:49:09.795 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel

This is a fresh installation from ZIP, not an upgrade of OH2.

Edit 2:
After deleting all cookies for this server:port, I can log in and do the setup. I guess, there is some bug with the first time installation/setup.

Maybe very trivial question… ::

In OH3, how to change a String item? I’m struggling to enter text.
e.g. Go to items, create a new String item, I save it, and it will apear in the list.
The value of it is indicated as “NULL”. I want to change this, so my simple expectation is that I can click the value and can type the string… unfortunately that does not work. (note: the item is not marked Read-only).

I have not set any special stuff (like widgets etc) but also did not see directly an obvious one use.

What is the right flow to do this? Do we need to set something specific ? (note I see same for String channels from bindings… this is just a way to reproduce the question)

Note: in OH2 paperUI, I just cleck the text and start editing… my assumption was similar behaviour in OH3 mainUI

Especially if this is repeatable please file an issue at the openhab-webuis repo so it gets fixed.

You’ve several options but for OH 3 perhaps the best option I documented at OH 3 Examples: How to boot strap the state of an Item. Other options include:

  • a System started rule to update the Item
  • setting the state through the Karaf console
  • setting the state through the REST API
1 Like

How do I update a manually (ZIP extract) installed OH2 installation to OH3M2? What do I give as parameter to the update script? Something like 3.0.0.M2?

so after upgrading to openHAB 3.0 none of my regular GPIO Items are working anymore, these are all Contacts and have state NULL.
OneWire still works though.
GPIO is a v1 binding so I assume it’s no longer in openHAB 3.0 but I can’t seem to find any info on this topic here or on GitHub.

No v1 bindings work with OH3. That was an early design decision.The addon status is tracked here.

The solution is to run them on OH2 and use the remoteopenhab binding to connect the OH2 Items to OH3. Use the latest snapshot of OH3 though. There were connection bugs in earlier OH3 versions.

EDIT: Apparently there was a start on a v2 binding for GPIO but there are merge issues. PR is here.

Thanks for the info and links, much appreciated!
I’ll look into setting up an openHAB instance for my GPIO items for now.
Good to know an updated binding is in the works though!

Basically when using remoteopenhab the OH2 Items show up as channels on the server bridge in OH3. You can then create OH3 Items linked to those channels.

1 Like

You mean the “Control” page in Paper UI? I don’t know where this is in OH3.

That was replaced in OH2 by using wither the Basic UI or HABPanel. That area of the Paper UI has been deprecated & not updated for a long time.

In OH3 the Pages section of the Main UI is meant to replace the Basic UI but the Basic UI & HABPAnel are still available in OH3.

I question that such is possible. A string item created as described above is not linked to a channel and therefore does not show up in the control section of PaperUI.

1 Like

Have not tried the creation of an item, but for sure this is possible in the control page of paperUI for thing channels

You can only manually add Things that are defined in the binding. For instance I could add a different Sun Thing from astro. I could not add a new constellation thing because that is not defined in the binding.

I do my real UIs with HABPanel. Control is a bit ugly and buggy, but very useful for quickly trying new things or items without creating an UI or writing rules or using the REST API.

1 Like

I thought that looked complex so I have not done that.

The same author developed the new Main UI. I really need to learn that now. Perhaps HABPanel later.