Upgrade to OH 3 - Experience Report

Hi all,
In order to make the decision easier for some of you, I would like to tell you about my experiences with the migration from OH2.5.11 to OH3 stable.
You have to take into account that I have been working in IT for 30 years and as a result I certainly have a technical understanding, but my programming knowledge stopped 15 years ago.

The requirements
Currently openhab runs on a Raspberry 4 with 4 GB Ram (based on the Raspberry original image). Instead of a SD - card I switched to a SSD.M2 about 3 months ago, which is first of all much faster and secondly more stable (with SSD cards there are often errors because they are not designed for constant writing/reading).

The infrastructure
Currently there are about 150 Things and 430 Items. The following components are to be served:

HomeMatic (Cul for intertechno)
RFXCom (also for intertechno and some nonames)
HUE (Incl. Tradfri Devices)
Harmony (3 Hubs)
Amazon (6 Alexas)
Gardena (mower and sensor)
Telekom - Magenta
Home Connect (NEFF)
Sonos (One)
Yamaha Receiver
FritzBox (TR064 and AVM Fritzbox Binding)
Samsung (div. TVs)
TP-Link

The Network-Binding for monitoring the network and the Exec for executing scripts, remote Pushover for sending messages. Furthermore the persistence based on mysql.

The change
Backup ! SSD image backup as well as config backup - furthermore I allowed myself the luxury to clone the current OH2.5.11 installation on a 2nd SSD.M2 to go back quickly.
OH2 service stopped.
First installed JAVA 11 and followed the instructions from Kai (Releases · openhab/openhab-distro · GitHub).
Restart Raspberry and wait - I think that some conversions are connected with the first start - so to be on the safe side give it some time first.
What I want to say here is that I had to restore the backup after the first change and the first attempts because some installation steps and settings were wrong and I want to have a “clean” system. Therefore, you really can not skip the backup!

The new UI - first impressions
At first glance it looks tidy and clear, in parts you will find again what you knew from 2.5, much is new. The arrangement is a bit hard to get used to because it does not always correspond to the logical order - my mistake was not to read the headings.
On the 2nd look you realize that many settings are completely different and you have to bring more technical understanding than in OH2 - but that may also be due to the fact that the philosophy must first be understood which is now more clearly anchored in the interface.
One point for me is the semantics - here I clearly have to deal with in detail. In addition wr come however also to a current problem with OH3 - that are the descriptions and examples. Here is not yet so much there but that will certainly change in the coming months.
Genrell as experience I can say that everything you do in the UI takes significantly longer. I don’t always find it intuitive and it takes time to find the places where you want to go. If you limit yourself to Things and Items it goes faster.

Technical adjustments / problems
Essentially, the changeover was quite safe. But you have to remember that it is the first release and there are bugs for sure. It is also very important to check the log, track the events. Also the bindings should be checked. Various ones are not installed automatically - I guess because they have changed incompatible and manual interventions are necessary.
I will only go into the problems, HUE, Homematic, TP-Link, 
 ran without problems.

First I removed paper, mysql, fritzboxtr0641, restdocs from the ADDON - file. These are tried to load, but no longer exist.

**2020-12-30 16:25:33.259 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'fritzboxtr0641' does not exist - ignoring it.**

**2020-12-30 16:25:33.338 [WARN ] [core.karaf.internal.FeatureInstaller] - The persistence add-on 'mysql' does not exist - ignoring it.**

**2020-12-30 16:25:33.377 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'restdocs' does not exist - ignoring it.**

**2020-12-30 16:25:33.380 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'paper' does not exist - ignoring it.**

After that the JDBC MySQL Binding had to be installed for the Persistance. The next error was the length of the text fields.

2020-12-30 17:23:07.678 [ERROR] [org.knowm.yank.Yank                 ] - Error in SQL query!!!
java.sql.SQLException: Table 'openhab3.Item135' doesn't exist Query: INSERT INTO Item135 (TIME, VALUE) VALUES( NOW(), ? ) ON DUPLICATE KEY UPDATE VALUE= ? Parameters: [DISABLE_ACOUSTIC_SIGNAL, DISABLE_ACOUSTIC_SIGNAL]

Missing records created manually and added to jdbc.cfg (service folder)

sqltype.STRING = VARCHAR(16000)

entered.
The problem with the TR064 binding could have tipped the switch - here the presence detection is done via the MAC addresses by means of the connected mobiles. It took me a while and the help of the community to find out that - if you have more than one MAC - you have to write them in a second line and not separated by comma or 
 separated. There was also a fix for this. Many thanks to Jan who took care of this in time.
A little bit more work was the adjustment of the pushover messages. After I had found different contributions also the syntax was clear. Since I have many points where messages are sent I had to touch more or less all rules.

I did not get Gardena running (wintertime no problem) - but the binding was also completely rewritten. The Home Connect (manually installable binding) is undefined in OH3 in the behavior - sometimes something works, some not at all. Here is also still work on the part of the developer (many thanks to Jonas !) necessary.

Conclusion
On the whole, the switch was worth it. Some things are still not completely solved, but for me there are no showstoppers. But there has to be an update soon which fixes the basic problems - also concerning the runtime. Here the system is super fast, but it gets slower with time - maybe the JAVA settings have to be changed.
As with OH2 I restart the service every morning - that fits because I always make a backup (database and config).
I can only advise this to everyone - with SD card it happened that the system stopped and after a restart all Things ud Items were gone. You are thankful if you have a backup ! You can’t say that often enough.

Topic Raspberry, here I think OH3 comes to the limits for PI3 systems. Memory requirements are higher, CPU performance is not a problem in my opinion.

HTOP on Raspberry 4:
grafik

For Raspberry PI 4 system I can only recommend everyone to switch to a SSD.M2 USB3. There are several tutorials on the net. The factor speed is felt factor 10 or more. The start of the system is very fast compared to SD card. Unfortunately, there are only M2 cards from 240 GB (about 40 € + 20-30 € for housing) of which I use only 32 GB. The rest is reserve if you need a 2nd drive. In any case more stable and durable.

I hope that my report may help some to make a decision for themselves whether they switch, how they switch or whether they do not switch to OH3.
Since my English is not perfect I have translated this by deepl - hope it fits

Bests, Christian

6 Likes

A new topic

I use habpanel and have a very complex ui created with a lot of maps. Now I figure out that it is saved only local. Good to have it local on my laptop - export and import again and it looks like it’s central. But the result is : On my Echo Show it works with OH2 - with OH3 not - here Echo show a black screen if I try to access the habpanel settings site. From my understanding this must be done to load the central side locally.

After a week (feels longer :slight_smile: ) now the conclusion.

Certainly from my point of view and with the consideration that many do here of their own free will and invest their free time - that is already very great.

With me, however, there are always new problems, some of which can not be found in the log, which makes it much more difficult to get to the bottom of the whole thing.

Binding : HomeConnect

Some status changes arrive, others do not. Apparently there is a bug in the message formatting in some situations, but so far there is no further feedback - one can live with that, even if it is not very nice.

Binding : AVM Fritz!box

I use this for switching the Dect sockets. Unfortunately also here problems. As long as the OH service is restarted they work, a short time later that’s it - there is no error message. Neither in the OH logs nor on the Fritzbox. Sometimes the think definition (and the items) is offline, sometimes not. Also here the luck that it is only one which is switched, all others serve only the status recognition (which is nciht great but one can live with it).

Binding : TR-064

As for the presence detection via Mac address, that works so far - I haven’t been able to get to the phone book etc. yet. In OH2 I had also used the binding, that when a call came in it was announced on the Alexa by voice with the caller name - this will not be implemented with the current binding as far as I know (incomming calls I have not found more).

Binding : RFXCOM

After the upgrade there was a problem with the permissions to access the USB port (Could not find the device path for /sys/class/tty/ttyUSB1 in the sysfs). The technical implementation seems to have changed compared to OH2 so that deeper interventions are necessary, many thanks here to all (Continuous repeating Warnings /sys/class/tty/ttyUSB0).

Semantics

My beginnings to build semantics unfortunately lead to several errors in the logfile. Here I can contribute but little because I am not further in the subject. In any case, the items are clearly more and from my point of view ĂŒnĂŒbersichtlicher. I think if one decides to do this, then everything must be accommodated in the semantics and the items are used only in individual cases. But maybe I’m just having a hard time with it.

New UI

What I generally find as a problem is that I can’t switch items in the UI. This makes it hard to test what works and what doesn’t.

Conclusion

All in all I am still thinking about going back. The image is there and functionally I haven’t changed anything. Also I’m worried that at this stage errors in the data model can creep in and cause problems later.

Who says you can’t ???


This is the item view of one of my light switches. Ther is a big orange switch just above analyze.
Guess what it does 
:slight_smile:

Yes, I have it too :slight_smile: but if I switch on and refresh the browser - status is always off.

OH log shows

2021-01-08 19:11:07.905 [WARN ] [apache.cxf.jaxrs.utils.ResourceUtils] - No resource methods have been found for resource class javax.ws.rs.core.Response

the event log show all correctly

2021-01-08 19:11:03.209 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'CUX_FLEX_8_1_State' received command ON

Your Example doesn’t looks like that it is migrated. From my end after migration a “normal Switch Item” looks

This is the same message which I got if I open habpanel on the Echo device - but this is another issue.

If I switch this item in a rule or in habpanel (on my base lapstop) or in a sitemap then it works - only Main UI has this problem. Looks like the status of a switch will not updated in MainUI. I found some other topic in the community where have simular problems, mostly with MQTT.

But this is post is not a question to solve problems, this is only my experience about the way and some problems with the upgrade.

best
Christian

So, today I decided to go back to OH 2.5.

The reasons are complex, but basically because it is a productive system for me and I have to rely on it working. Unfortunately, there were too many things that sometimes worked, then again not, partly with log entries that could be followed up, partly without. Also inconsistencies in the new main UI like the status of the items was not displayed correctly, items could not be switched made it not easier to decide for it.

But what you can say is that OH3 is a huge step forward. The interface is very clear and well structured. Also the introduction of semantics is a real progress. I find it confusing that the created groups (location, equipment,
) are displayed in the overviews - this is very bloating.

For me, anyway, it is still too early to change but I look forward to when the first update was there. Also I will consider whether I make an update or set up a new system. This is not absolutely necessary, because by the “name change” also old overhead disappears, but perhaps it makes it easier to classify all devices in the semantics.

Christian

This isn’t recommended and untrue for the most part. I/O speed isn’t a real issue (unless you keep restarting your system often which is a no-go !) and stability is fine also without SSD if you properly setup your system.
SSD usage and even more so to build upon plain Raspbian definitely is not a “requirement” as your (sub)title implicates !
I won’t detail that any further here, there’s many threads on the forums, search for ‘ZRAM’ if you’re interested.

Nope. I run on RPi3 as well and memory usage has not increased when I migrated.
You use about twice as much as my system does. That’s definitely not normal. I have never seen anyone use that much memory on ARM. It could be a memory leak but it’s probably not OH itself but bad OS and/or java parameters.

Uh, now that’s nonsense. OH config (and even InfluxDB, FWIW) can be backed up while OH stays online. OH is designed to run 24/7 and you should let it run.

Ouch, that is bad advice you shouldn’t give. Backup yes of course but don’t ever take OH down for this.
And the reasoning given here does not make sense, it’s mixing issues. Either the SD card is broken then you will have all sorts of broken files and issues OR just items/things are gone.
That’s a totally different issue that can happen but it is totally unrelated to SD cards.

Your best option is to move over to openHABian.
It has multiple optimizations and backup/data safety options built in.

I use the standard Raspberry image - don’t think that it is a bad OS :slight_smile: but you can see tha tthe OH threads needs a lot of memory. Java Parameter are also standard.

nonsense is a personal view. I have to deal with the problems I face. I’m not a Java developer and I don’t know anything about Karaf or the infrastructure. I also have respect for the developers who do this in their spare time. But in the end I am alone with the problems. Trying to find a solution without throwing everything away is what makes a dedicated user. If OH didn’t have these users, nobody would know OH and no media would report about it.

Maybe, SD Card are not really developed to write so often. If you search with “openhab probleme sd card” you can find a lot of notes for that.

Thats my personal way, my experience and my decision !

But it is a good idea if you share your expierence, how you upgrade or do you start with a complete new setup, what problems you have and how many Things / Items you use. That could be show us another way how it can be.