Seite 1 von 1

How do I downgrade to a lower version or reïnstall an older version?

Verfasst: Sa Mär 11, 2023 12:40 pm
von Sceppi
I'm having some issues with my openWB software
See alse post: viewtopic.php?t=6641, but no answers so far :(

I now would like to try older versions of OpenWB again, as openWB has been working very well for me the past 2 years. I would like to go back to versions 1.9.28X or maybe even 1.9.27X and test if these versions are still working for me.

How do I go back to these older versions? I can only downgrade to Beta:1.9.290. When I re-install openWB, it always installs the latest version.

Thanks

Re: How do I downgrade to a lower version or reïnstall an older version?

Verfasst: Sa Mär 11, 2023 2:09 pm
von derNeueDet
Do you have an old backup of your Box with one of These versions? Then you can do a fresh install and restore your backup. That downgrades your installation to the version contained in the backup.

Re: How do I downgrade to a lower version or reïnstall an older version?

Verfasst: Sa Mär 11, 2023 2:58 pm
von Sceppi
I do not have a backup unfortunately. Any other possibility? I don´t mind doing a complete reinstall

Re: How do I downgrade to a lower version or reïnstall an older version?

Verfasst: Sa Mär 11, 2023 3:52 pm
von rleidner
Sceppi hat geschrieben: Sa Mär 11, 2023 2:58 pm I do not have a backup unfortunately. Any other possibility? I don´t mind doing a complete reinstall
I assume you have ssh access.
openwb is based on git, so all old versions are on your system.
A normal complete reinstall won't help you as you get the latest Nightly.

Basic steps - without guarantee and you should do a backup and download that BEFORE doing the following!!
There is a risk that the old code may not work with the actual data on your system.

cd /var/www/html/openWB
git log > x.txt
edit x and search for the word "bump" or "Bump" and the version you want to roll back to, e.g. for 1.9.283.
The file x.txt contains blocks like this:

Code: Alles auswählen

commit 3c1c99191a9e18b138d331a3926cc5865eaccf20
Author: benderl <benderl@users.noreply.github.com>
Date:   Fri Nov 18 09:20:19 2022 +0100

    Bump Version 1.9.283
    
    Beta 1.9.283
So the commit for version 1.9.283 is 3c1c99191a9e18b138d331a3926cc5865eaccf20
with the following command you switch to that version:
git checkout 3c1c99191a9e18b138d331a3926cc5865eaccf20

It will show some information about detached branch, etc, which is fine.
The switch back to the current stable just do
git checkout stable17

Similar for Nightly (master) or Beat (beta).

EDIT:
Instead of
git log > x.txt
edit x and search for the word "bump" or "Bump" and the version you want to roll back to, e.g. for 1.9.283.
The file x.txt contains blocks like this:

you can also do this
git log --grep="Bump"

This will list Beta and Stable releases.

EDIT2: After checking out another version you need to restart your raspi...

Re: How do I downgrade to a lower version or reïnstall an older version?

Verfasst: So Mär 12, 2023 2:34 pm
von Sceppi
Thanks, but not fully succesful yet.
When I do the git checkout, I indeed see all the files that have changed, but I get an error in the beginning and then at the end: Please commit your changes or stash them before you switch branches.
Aborting

for example: git checkout eaf454f1891f3e464bb5f0015d9680080e884232

Code: Alles auswählen

error: Your local changes to the following files would be overwritten by checkout:                                               t:
        modules/bezug_fronius_sm/froniusloadmeterdata.php
        modules/bezug_rct2/RCT.lua
        modules/smarthome/acthor/off.py
        modules/smarthome/acthor/on.py
        modules/smarthome/acthor/watt.py
        modules/smarthome/elwa/off.py
        modules/smarthome/elwa/on.py
        modules/smarthome/elwa/watt.py
        modules/smarthome/http/off.py
        modules/smarthome/http/on.py
        modules/smarthome/idm/off.py
        modules/smarthome/idm/on.py
        modules/smarthome/idm/watt.py
        modules/smarthome/lambda/off.py
        modules/smarthome/lambda/on.py
        modules/smarthome/lambda/watt.py
        modules/smarthome/mqtt/watt.py
        modules/smarthome/nxdacxx/off.py
        modules/smarthome/nxdacxx/on.py
        modules/smarthome/nxdacxx/watt.py
        modules/smarthome/ratiotherm/off.py
        modules/smarthome/ratiotherm/on.py
        modules/smarthome/ratiotherm/watt.py
        modules/smarthome/shelly/off.py
        modules/smarthome/shelly/on.py
        modules/smarthome/stiebel/off.py
        modules/smarthome/stiebel/on.py
        modules/smarthome/stiebel/watt.py
        modules/smarthome/vampair/off.py
        modules/smarthome/vampair/on.py
        modules/smarthome/vampair/watt.py
        modules/soc_tesla/tesla.php
        modules/wr2_kostalsteca/measurements.xml
        modules/wr2_kostalsteca/yields.xml
        modules/wr_kostalpikovar2/kostal_piko_var2_test_sample_off.html
        web/files/boot_config.txt
        web/files/lxdeautostart
Please commit your changes or stash them before you switch branches.
Aborting
When I then reboot my pi and start openWB I get the update message:
"openWB ist noch nicht bereit. Der Vorgang kann bis zu 15 Minuten dauern, bitte warten. Die Seite aktualisiert sich automatisch neu."
And then after a while I can start openWB, but when I look at system info, I still see installed version 1.9.290
Any idea?

Re: How do I downgrade to a lower version or reïnstall an older version?

Verfasst: So Mär 12, 2023 2:53 pm
von Sceppi
OK, I managed to get it working by doing:
git reset --hard
git pull

and then doing the checkout.
I have an older version running now, thanks.
Now check if I can get my keba modbus communicating again (but that's another issue).

Appreciate your help!
Francis