So I installed git and cloned repo, linked the directory and copied the openhabian.conf
Then I change “clonebranch=OpenHAB” in /etc/openhabian.conf to “clonebranch=OpenHAB3”
Then I run the “openhabian-config unattended” command and I end up with OH4. But I need OH 3.4 to be able to restore the config backup on a the 22.04 Ubuntu before I can migrate to OH4 but I just can’t figure out what I’m doing wrong that I always end up with OH4.
Case matters. When it’s spelled out, “openHAB” always starts with a lower case “o”. It’s part of the trademark.
Note, there have been reported successes in restoring a 3.4 config to a 4.0 openHAB. You’ll need to run the upgradeTool manually though I think, unless you have all text based configs in which case you’ll need to manually make changes no matter how you upgrade.
Actually was just a typo here in the forum not in the config itself. In fact I only added the digit ‘3’ at the end of what’s already there in /etc/openhabian.conf. But as @mstormi said ubuntu is no supported, I wiped the sdcard again and did a fresh install of debian bullseye (as recommended), installed zulu11 and ran the install script again. But no matter what it again installed 4.0.3, it seems it’s completely disregarding the value in clonebranch or at least something is utterly broken.
what’s even more strange is that when I launch the openhabian-config and check the branch in ‘01’ it claims it’s on ‘openHAB3’, not on ‘release’, but still it installed the 4.0.3 packages of openhab and openhab-addons.
And now comes the killer problem itself. Just out of interest I restored my existing openhab 3.3 sdcard image which I backed up, checked the branch again with ‘01’ and ofc it was ‘openHAB3’, then I selected option ‘02’ , upgrade system. And even though on this long running installation was set to openHAB3 the ‘upgrade’ process installed the openHAB4.0.3 packages over existing OH3.3, wheras I expected it to update the 3.3 to 3.4 (latest 3.x that exists), and I did nothing like changing branch in ‘01’ or ‘03’ install openHAB. I just selected ‘02’ upgrade system and it completely destroyed the installation by overwriting parts of it with openhab4 packages.
Is something severly broken atm in the openhab config & installers or am I missing something which should be obvious but isn’t to me?
That’s the expected behavior. There is an issue and thread where this is discussed but for now, OH has three repos:
Version of OH Installed
Everything merged into main since yesterday, bleeding edge
4.1 #XXXX where XXXX is a constantly increasing number
The OH milestones
The most recent stable release
In oder to install a 3.4 release, you have to run a command to fix the version of OH so it doesn’t upgrade to the latest version in the repo. I don’t remember that command off hand but a quick search should find it.
I don’t know openHABian that well but it seems like the fact that it’s ignoring the branch and/or not applying the apt command to fix the version to 3 when that is chosen might be a bug, or at least an enhancement.
The openHAB repos are working as expected. When you do an update/upgrade you get the latest version of the software in the repos, which for the stable release is 4.0.4. I don’t know if openHABian is working as expected.
sudo apt install openhab=3.4.4-2
sudo apt-mark hold openhab
This works for my old 3.3.x installation to update it to 3.4.4-2 and then take a fresh backup of the config. But this doesn’t help for installing 3.4.4 through openhabian from scratch because the installer should actually install a specific version if a branch is selected but fails to do so and you have no control over it.
What would be the recommended way to go because I have to update my OS to debian bullseye (currently 3.3 is on ubuntu-18.04)? Skip the unattended install and do the installer steps manually? Maybe don’t even use “openhabian” installer at all? It sounds to me like that should be easily doable but turns out to be very hard thing to just reinstall 3.4 first to then upgrade to 4.x, I did read that it might work if you just restore old config but it’s not guaranteed and as I do have quite a complicated setup I would like to go the safe way.
Well, like I said, I don’t really know how it’s supposed to work with openHABian.
I would probably install openHABian, then from the command line, prior to copying over the backups, uninstall OH 4, run the commands to fix the OH version to OH 3.4, copy over the configs, verify it’s working, then remove the hold and upgrade to 4.
Though truthfully, I’d probably first just restore the 3.4 configs over to OH 4 and see what happens.
restore the backup
run the upgrade tool (I think it’s java -jar <path to openHAB runtime>/bin/upgradetool.jar)
make the changes to your config that you can for the breaking changes