openHAB 3 got released and you might be running into issues when or after you upgrade.
This post is meant to summarize the most often encountered problems to show up on upgrading your system to openHAB 3.0. I’ll update/extend it over time.
Let me know if you feel there’s substantial stuff missing (issues) or insufficient (explanations how to fix).
Please cross-check before opening your own thread (let alone jump on someone else’s).
First things first
The very first thing to check out is the breaking changes section of the Release Notes if your issue is a known issue.
is it openHAB, really ?
Make yourself aware if your issue is really caused by the openHAB upgrade you went through
- did your issue exist before the upgrade ?
- is it that rules no longer do what they did, eventually because of bad or missing initialization of item states? I.e. is it really the openHAB code or rather your own rules to have a problem ?
- might it rather be an issue with openHABian or the OS you run on and its setup ?
If you run on openHABian, in order to be able to analyse issues you should always
- set (or add if missing)
- set your terminal to record the output of your activities.
before you start
This is crucial to be able a) to look up what you did and what the system’s response was and
b) to eventually open a Github issue to make developers aware of your problem and to provide them right in the first place (i.e. when you open the issue) with the information they need to help you.
There are branches (= different code versions) of openHABian, too - not to be confused with the openHAB versions themselves. Think of it as the environment openHAB lives in.
You can use option 01 to change branches.
You need to use the
openHAB3 branch for OH3. For OH2 you must the ‘stable’ branch.
master is equal but will be deleted soon.
To successfully complete the upgrade process, openHABian needs to change you over to the
openHAB3 branch. That happens automatically if you select the upgrade option 03 in openHABian. It does in most but not all cases.
Unfortunately there’s many possible starting points (many versions of openHABian on many Linuxes on various hardware) and depending on your starting point this switching to the proper environment may not have worked.
The branch you start in every time you fire up
openhabian-config is defined as the
clonebranch parameter in
/etc/openhabian.conf and shows up in the menu title bar.
There used to exist a bug in openHABian that once you actively switched branch or the system did for you as part of the 03 OH3 install option, it didn’t store that information into
clonebranch which is why you were reset to the original branch on next
There also used to be instructions how to manually install openHABian on other Linuxes that were not updated in time to reflect the openHAB 3 changes. They used to tell you to clone the
stable branch. That was (and in fact still is) correct when you want to get openHAB 2 as it installs the environment for openHAB version 2. However everybody expected to get the openHAB 3 version installed (or the OH3 enabled openHABian environment). They didn’t and many subsequent actions failed because of the differences in OH2 vs. 3 such as directory names.
Eventually downgrade (menu option 42#2) or
purge the openhab package and select menu 03 to install again.
If these hints do not work for you, the safest thing to do is to install openHABian again, from scratch.
Broken time processing in rules
OH3 removed the Joda libraries many of us used to handle time related events in rules DSL code.
There’s Java classes available to replace them but it does not work 1:1 so you need to change some of your rules code. See links at the end for pointers.
Links for further reading
- openHAB 3 Release notes and its breaking changes section
- the status of the most widely used v1 addons and of those that got migrated
- openHABian debug guide
- the known issues on upgrade to OH 2.5 post provides a number of hints to handle generic issues such as a memory leak. They still apply to OH3 and the 2->3 upgrade process.
- a tutorial on time conversion in rules DSL you might be in need of to change your rules because Joda time code was removed from OH3
- How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community
- How to file an issue