Guide: Installing and testing OH3 snapshots/milestones using APT and YUM

@RGroll just looked at the addons.cfg, there is nothing there… But thank you anyway!

Paulo

1 Like
sudo systemctl enable openhab.service

If you installed everything by UI, then you need to look in:

/var/lib/openhab/config/org/openhab/addons.config
4 Likes

It all worked now!! Thank you…

Now still there are some issues related below, but I’m unable to figure out what is this configuration…

2020-10-15 09:19:29.314 [ERROR] [org.apache.felix.fileinstall ] - Cannot create folder /var/lib/openhab2/tmp/bundles. Is the folder write-protected?

2020-10-15 09:19:29.360 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedServiceFactory, id=38, bundle=10/mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.4]: Unexpected problem updating configuration org.apache.felix.fileinstall.3b778af7-83ab-41fd-9a73-ebbf81f27521

java.lang.RuntimeException: Cannot create folder: /var/lib/openhab2/tmp/bundles

1 Like

I installed OH3 milestone version. It started with some errors of

org.openhab.core.automation.module.script:3.0.0.M1

openhab.log (128.1 KB)

Zwave was operating well. There are some Zwave messages in uploaded log file, but it is normal Zwave communication.
I use windows 10 with Java: Zulu_JDK_11.0.8_X64

I have one more question. I use NGRE rule engine. I know that it is on the way to be merged into the distro. As I see it is not part of the package or should I install it from the configuration menu, or I can manually install. What do you recommend?

Using actual addon version I receive following message:

2020-10-17 08:21:34.307 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/C:/Openhab3/addons/org.openhab.core.automation.module.script.scriptenginefactory.jython-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.automation.module.script.scriptenginefactory.jython [208]
  Unresolved requirement: Import-Package: org.openhab.core.automation.module.script; version="[2.5.0,3.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

I assume it is due to Java version.

1 Like

I see in another thread that @5iver our main automation developer has not had any code changes merged into OH3. That means likely somebody else tried migrating it.

1 Like

There are currently no Jython add-ons in OH3…

2 Likes

I created a test system on an older RasPi, based on openhabian, cloning my production setup in OH2 (except the Z-Wave things as I wanted no disruption on the running prod system) and then followed the advise here for upgrading to OH3.

It went really well :slight_smile: Cheers to all maintainers and contributors, you did an outstanding job!

There are a few observations I want to share, though:

The OH2 installation was recognised and some output about changes to config files was to be seen. I expected to see a takeover from the OH2 configuration for items, rules, sitemaps etc, but saw nothing about that. Nevertheless it did happen and when I took a look into the respective folders, everything was there.

Before switching to OH3 I did shut down OH2 services. After starting OH3 I saw the first logging still go to /var/log/openhab2/openhab.log instead of /var/log/openhab/openhab.log. After a few minutes it switched and all further logging went to the expected log file. That was totally unexpected and I can’t imagine what the root cause could be as I answered “Yes” to all questions whether the maintainers version of configuration files should be used. One of the 4 files in question was the logging config file, so there should have been no mention in the config of the old OH2 log files.

After OH3 was running I made a few adjustements in the configuration and there is one issue that I hope will be fixed/changed for the RC: the thing identifier cannot be marked for copy & paste in the GUI. For all those guys that keep their configs in files, this leads to a situation where they have to read and type this information manually into their config files instead of being able to copy it from the GUI and paste it accordingly. Or did I oversee something here? (Well, I’m aware I could activate the developer tools of my browser, inspect the page source code and copy the information from there, but I don’t see that as a feasible way, it should be easier than that.)

1 Like

That it’s already a known issue perhaps. :wink:

2 Likes

Let me just mention that when I tested I did not approach it as an upgrade using text files but tried using the UI. I was unable to get any of my UI based rules to run when triggered. They ran fine manually though.

My test system is currently on OH2 for other testing.

1 Like

You can get to where you can copy and paste a Channel ID by opening the Thing then open the Channel details. But as Wouter pointed out, I’ve filed an issue on this. It’s useful even when not using text based Items and instead are importing Items from .items files configs or relinking Items that already exist through the “code” tab.

It’s probably worth opening a new thread to post examples of one or two of your rule’s YAML and see if there is a bug or a something that needs to be clarified when we write the docs or something else going on.

1 Like

My test system is not currently on OH3.

I think the difference from most if the users here is I tried configuring from scratch with the UI instead of importing file based configuration.

1 Like

I too am configuring from scratch (and changing to JavaScript in the process) and I’m not seeing the same behavior, so it’s worth further exploration.

1 Like

I also started to confog from scratch but it would take so mutch time. Now I started to move in 2.5 Zwave things to textual config and I hope that I can copy and pase my config files and use rules as well. But how can I use Javascript? I used only DSL and NGRE rule engines so far.

1 Like

HabPanel config is not being loaded even while existing at:
/var/lib/openhab/config/org/openhab/habpanel.config

1 Like

I just set up the latest OH3 snapshot. I used Docker on the Pi this time instead of native packages.

My rule based on an astro event just triggered. I am not sure what was done differently or if code changes helped out.

2 Likes

Following up in my tests of a migrated system I came to an error log entry where a script cannot be found. It is a script located in $OPENHAB_CONF/scripts and is called via callScript(scriptname) from a DSL rule file (according to this documentation). That worked flawlessly in OH2 but now the script seems to be expected within the rules file:

2020-10-21 16:40:02.963 [ERROR] [internal.handler.ScriptActionHandler] - Script execution failed: Script ‘arbeitsfrei’ cannot be found. in zentral

Are scripts in the script folder no longer supported in OH3? I could not find anything in the documentation or community threads about it. Or what can I look for as a possible obstacle that prevents the execution? Thanks…

1 Like

I am trying to run the tar-file-based openhab3 in order to not perturb my existing 2.5 until I am sure everything work sufficiently well to make it my standard-running version.
I am lacking directions on how to do this correctly. I am using a linux box.

I downloaded openhab-3.0.0-SNAPSHOT.tar.gz and openhab-addons-3.0.0-SNAPSHOT.kar and un-tared the first one. I gave ownership to openhab for the directory where I un-tared the first file. Then I copied my configuration files in their corresponding location (at least I hope that’s where they are supposed to go).
However, I do not know where to put the .kar file.
Finally I started openhab with runtime/bin/start.
A runtime/bin/status says it is Running. However, looking at a ps -efl | grep openhab shows arguments being passed to the java running process of -Djetty.host=0.0.0.0 and the web server does not seem to be running at the right place.
I cannot ssh into the openhab system either like the docs for 2.5 say (ssh -p 8101 openhab@localhost).

Could someone help get something basic running?

1 Like

Docker might be a better option. OH2 runs best with java 8. OH3 requires Java 11.

1 Like

Are there detailed instructions somewhere for installing OH with docker?

PS: I’m looking at https://www.openhab.org/docs/installation/docker.html Hopefully I can get it running with that.

1 Like

https://hub.docker.com/r/openhab/openhab/

I am working on my own script but it is not ready for others yet.

1 Like