How to update OH windows Version?

  • Platform information:
    • Hardware: Minix
    • OS: windows 10
    • openHAB version: 3.4.2
      The update scripts to 3.4.4. didn’t work. So I istalled a new 3.4.4 version and started it. The clean 3.4.4 installation worked and I closed it . After that I copied the confg and userdata folders from the 3.4.2 instalation to the new 3.4.4 one and started OH. It runs but the OH version is back to 3.4.2.
      Does anyone know, how to restore a configuration (bindings, things, items, rules…) into a clean new installation?

Restoring from a backup can only be done properly within the exact same version.

Thats what I was afriad off.
Is there still any known way to update the windows OH version?
The openHAB update powershell script: cd C:\openHAB
.\runtime\bin\update.ps1 Update-openHAB -OHVersion x.x.x is not working since a long time, the cmd line workaround C:\openHAB2\runtime\bin\update.bat x.x.x since 3.4.2.

I am running on Windows 10 (and have tested on Windows 11). I have no issues upgrading using the PowerSell script.

Are you running the script in an Administrator Powershell Window?

Maybe if you provide eror details someone might be able to assist?

I have OH installed on D: partition.
After entering D:\openhab\runtime\bin\update.ps1 Update-openHAB -OHVersion 3.4.4 I get no error message, no log entries, just a new promt.
Do I have to stop OH manualy (net stop OH) or does the script stop it? Anyway I have tried to run the update script both ways without sucess.
Where could I look for error details?

You need to STOP openHAB
Run Powershell as admin
Change to the openHAB directory

. .\runtime\bin\update.ps1
Update-openHAB -OHVersion 4.0.0

I suspect the issue is that you are not starting in the openHAB directory

I entered:
PS D:\openhab> .\runtime\bin\update.ps1 Update-openHAB -OHVersion 3.4.4
without any different effect.

This is a two line command. And you seem to only have one .

You can do:

. .\runtime\bin\update.ps1

and then

Update-openHAB -OHVersion 4.0.0

Thank you.
Finally the update script run.
After the update I restarted OH. The service is running, but OH does not start and there are no log entries.
Do I have to start it manually (start.bat) und reinstall the wrapper service?

Just to eliminate the obvious, you’ve upgraded your Java to 17 and updated your environment variables accordingly?

If the service was running correctly and linked to the correct folders etc you should not have to reinstall the wrapper.

The first logs after an update do sometimes take a bit of time.

I installed Java 17 to D:\Programme\Zulu and set JAVA_HOME to this folder.
After a system reboot OH is still not starting, although the OH service ist running.
The only log entry is in wrapper.log: WARNING - Unable to load the Wrapper’s native library ‘wrapper.dll’.
There are no entries after the update in the openhab.log and events.log.

What happens if you stop the service and run start.bat as admin?

If wrapper dll us missing i would follow the docs to reinstall the wrapper

Stopping the OH service an running start.bat leads to: Launching the openHAB runtime…
No logs, OH not starting

Please share a screen shot of:

  • Go to command prompt
  • Enter java --version

Maybe a screen shot of this too?

So the Java seemsvto be correctly installed and the path to the Java 17 version correct.

Can you show ehat happens when you run start.bat?

Where are you looking for logs?

The logs are here: D:\openhab\userdata\logs
After starting the start.bat the console shows: “Launching the openHAB runtime…”

My only other suggestion is to reboot.

EDIT: - Does start_debug.bat give you anything more?

The problem was that I wanted to update top 3.4.4 and not to 4.0.0. 3.4.4 needs Java 11 and 4.0.0 Java 17.
The update to 4.0.0 worked finally.