openHAB 3.0 Milestone 2 discussion

Eee what?
Is not in OH2?
Yes it is:)

1 Like

It is since 30 minutes in OH3 - snapshot #2019 and above.
Syntax is identical to OH1, see https://github.com/openhab/openhab-core/issues/1620

10 Likes

Typo

1 Like

OK I saw it was integrated but did not know the status of the snapshot. I searches next.openhab.org for docs and saw none though.

Thatā€™s another PR on my todo list - to add the documentation in the docs repoā€¦

3 Likes

Or you could go directly to snapshot #2020 and use the UI editor :wink:

7 Likes

Release M3 already :yum:

I just pulled from Docker and got 2019 :frowning:

It works with text items. I tested with 2 different ones.

Trying to make OH3 use Java 11 on Linux, but it keeps using the system vm (which is still 8).
start.sh:

#!/bin/sh
export OPENHAB_HTTP_PORT=8091
export OPENHAB_HTTPS_PORT=8054
export JAVA_HOME=/opt/openjdk-bin-11.0.9_p11
export PATH=/opt/openjdk-bin-11.0.9_p11/bin:$PATH

echo Launching the openHAB runtime...

DIRNAME=`dirname "$0"`
exec "${DIRNAME}/runtime/bin/karaf" "${@}"

When I set the same env vars on the command line, I get Java 11 when I run ā€œjava --versionā€.
Any hints, please?

I assume you have installed java 11 with a package manager. Then typically you could switch between installed java version using something like

sudo update-alternatives --config java

or

alternatives --config java

i assumed they wanted to use Java 11 without changing the default for the OS.

1 Like

Correct. Java 11 is still not officially supported as system vm on Gentoo.

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.

from https://wiki.gentoo.org/wiki/Java#The_choices

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.

Edit:
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 http://192.168.0.7:8091/rest/auth/token?useCookie=true 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\"}}}

openhab.log:

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