openHABian testing

Ok, I am on Main:


which results into

dpkg -s ‘openhab’ 2>/dev/null | grep Config-Version
reveals an EMTPY result

openhab-cli info
reveals Version: 3.4.4 (Build)

Now I start the recording and I start 02

and it comes back extremely fast. Here is the log: (edit: → deleted log)

Sorry but that’s a useless log.
Enable debugging in openhabian.conf, and do a proper recording so the output is ASCII-readable.
Use script or a different terminal program,

Sorry, my bad, due to the reinstall the debug setting got lost and I forgot about it. Here you go.

oh344-oh4.log (111.2 KB)

putty.log (939.3 KB)

When i start again SSH i have this information:

sed: can’t read /var/lib/openhab2/etc/version.properties: No such file or directory

With Legacy openhabian, I have this splash screen:

Linux openhabian 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jun  7 15:49:51 2023 from 192.168.0.69

###############################################################################
###############  openhabian  ##################################################
###############################################################################
##        Ip = 192.168.0.163
##   Release = Raspbian GNU/Linux 11 (bullseye)
##    Kernel = Linux 6.1.21-v8+
##  Platform = Failed to start Check for Raspberry Pi EEPROM updates.
##    Uptime = 0 day(s). 0:0:36
## CPU Usage = 59.09% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
##  CPU Load = 1m: 2.67, 5m: 0.73, 15m: 0.25
##    Memory = Free: 6.65GB (87%), Used: 1.01GB (13%), Total: 7.67GB
##      Swap = Free: 2.43GB (100%), Used: 0.00GB (0%), Total: 2.43GB
##      Root = Free: 43.35GB (77%), Used: 12.53GB (23%), Total: 58.29GB
##   Updates = 0 apt updates available.
##  Sessions = 1 session(s)
## Processes = 146 running processes of 32768 maximum processes
###############################################################################

                          _   _     _     ____   _
  ___   ___   ___   ___  | | | |   / \   | __ ) (_)  ____   ___
 / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \ | | / _  \ / _ \
| (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )| || (_) || | | |
 \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/ |_| \__|_||_| | |
      |_|                  openHAB 3.4.4 - Release Build

Looking for a place to get started? Check out 'sudo openhabian-config' and the
documentation at https://www.openhab.org/docs/installation/openhabian.html
The openHAB dashboard can be reached at http://openhabian:8080
To interact with openHAB on the command line, execute: 'openhab-cli --help

When switching openhabian to main or openhab4 I have some issues:

  • a splash screen which does not show openHAB’s version number, instead a message as cited by Samuel appears
  • choosing a backup with openhabian-config is no longer possible. Error message: openhab is not installed
  • I do not know whether is has to do with the current version but I had issues with deCONZ installing as described here

A cosmetic issue since some time: installing deCONZ with a non-standard port (e.g., 8007) is possible, but openhabian’s final screen says that port 8001 has been selected.

Actually, installing deCONZ needs a special fix since some days due to a Debian error. Therefore, openhabian fails to install as well.

I don’t see anything unusual about this log. Option 02 is supposed to update all packages to their latest version, and so it does. You didn’t select any of the 4X options.
Take a recording of the action that you believe should behave different.

what’s your point? Posting logs without any reasonable description is pointless.

The main version don’t install Firemot and i have an issue with /var/lib/openhab2/.
I also try install Firemot again via openhabian but the problem persist.

Linux openhabian 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch                               64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jun  7 23:17:24 2023 from 192.168.0.13

2023-06-07 23:17:24,903: FireMotD: Info: No FireMotD ExportFile detected. Please                                generate with "sudo .\/FireMotD -S"
sed: can't read /var/lib/openhab2/etc/version.properties: No such file or direct                               ory
sed: can't read /var/lib/openhab2/etc/version.properties: No such file or direct                               ory


              Welcome to            __  _____    ____  _
            ____  ____  ___  ____  / / / /   |  / __ )(_)___ _____
           / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  / / __ `/ __ \
          / /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ / / /_/ / / / /
          \____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/_/\__,_/_/ /_/
              /_/
                  openHAB  ()


Looking for a place to get started? Check out 'sudo openhabian-config' and the
documentation at https://www.openhab.org/docs/installation/openhabian.html
The openHAB dashboard can be reached at http://openhabian:8080
To interact with openHAB on the command line, execute: 'openhab-cli --help'
2023-06-07_23:24:53_WEST [openHABian] Updating Linux package information... OK
2023-06-07_23:24:53_WEST [openHABian] Downloading FireMotD...
Update...

$ update_git_repo /opt/FireMotD master
2023-06-07_23:24:53_WEST [openHABian] Updating FireMotD, master branch from git.                         ..
$ git -C /opt/FireMotD fetch origin

$ git -C /opt/FireMotD fetch --tags --force --prune

$ git -C /opt/FireMotD reset --hard origin/master
HEAD is now at 3d2bea6 fix

$ git -C /opt/FireMotD clean --force -x -d

$ git -C /opt/FireMotD checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
OK
OK
2023-06-07_23:24:56_WEST [openHABian] Installing FireMotD...
$ make --always-make --directory=/opt/FireMotD install
make: Entering directory '/opt/FireMotD'
cp FireMotD /usr/local/bin/FireMotD
chmod 755 /usr/local/bin/FireMotD
mkdir -p /usr/share/firemotd/data
mkdir -p /usr/share/firemotd/templates
mkdir -p /usr/share/firemotd/themes
mkdir -p /usr/share/firemotd/cache
cp templates/* /usr/share/firemotd/templates
cp themes/* /usr/share/firemotd/themes
make: Leaving directory '/opt/FireMotD'

$ make --always-make --directory=/opt/FireMotD bash_completion
make: Entering directory '/opt/FireMotD'
cp bash_completion.d/FireMotD /etc/bash_completion.d/FireMotD
make: Leaving directory '/opt/FireMotD'
OK
2023-06-07_23:24:56_WEST [openHABian] Generating FireMotD theme...
$ FireMotD -S -d -D all
2023-06-07 23:24:56,706: FireMotD: Info: Debug mode
2023-06-07 23:24:56,715: FireMotD: Info: FireMotD action save started
2023-06-07 23:24:56,725: FireMotD: Info: Action "save"
2023-06-07 23:24:56,734: FireMotD: Info: Exportfile /usr/share/firemotd/data/Fir                         eMotD.json found.
2023-06-07 23:24:56,743: FireMotD: Info: Template type set to all. Overwriting..                         
2023-06-07 23:24:56,840: FireMotD: Info: Exploring HostIp
2023-06-07 23:24:57,037: FireMotD: Info: Exploring Release
2023-06-07 23:24:57,244: FireMotD: Info: Exploring Kernel
2023-06-07 23:24:57,440: FireMotD: Info: Exploring Platform
2023-06-07 23:24:57,655: FireMotD: Info: Exploring InstallDate
2023-06-07 23:24:57,845: FireMotD: Info: Exploring Updates
2023-06-07 23:25:04,395: FireMotD: Info: Exploring Httpd
2023-06-07 23:25:04,582: FireMotD: Info: Exploring Nginx
2023-06-07 23:25:04,768: FireMotD: Info: Exploring Mysql
2023-06-07 23:25:05,081: FireMotD: Info: Exploring Postgres
2023-06-07 23:25:05,266: FireMotD: Info: Exploring Php
2023-06-07 23:25:05,548: FireMotD: Info: Exploring Elasticsearch
2023-06-07 23:25:05,734: FireMotD: Info: Exploring Logstash
2023-06-07 23:25:05,919: FireMotD: Info: Exploring Kibana
2023-06-07 23:25:06,103: FireMotD: Info: Export system data to "/usr/share/firem                         otd/data/FireMotD.json" finished.
2023-06-07 23:25:06,120: FireMotD: Info: ExportFile: -rwxrw-rw- 1 root root 3231                          Jun  7 23:25 /usr/share/firemotd/data/FireMotD.json
2023-06-07 23:25:06,130: FireMotD: Info: FireMotD action save finished

$ FireMotD -G Gray
OK
2023-06-07_23:25:20_WEST [openHABian] Setting up FireMotD apt updates count service...
Make FireMotD check for new updates every night...

$ install -m 644 /opt/openhabian/includes/firemotd/firemotd.service /opt/openhabian/includes/firemotd/firemotd.timer /etc/systemd/system/

$ systemctl -q daemon-reload

Make FireMotD check for new updates after using apt...

$ install -m 644 /opt/openhabian/includes/firemotd/15firemotd /etc/apt/apt.conf.d/

Initial FireMotD updates check

$ FireMotD -S
OK
2023-06-07_23:25:33_WEST [openHABian] Checking for default openHABian username:password combination... FAILED
2023-06-07_23:25:33_WEST [openHABian] We hope you got what you came for! See you again soon ;)
openhabian@openhabian:~ $

That’s just a cosmetic problem and does not happen on new installs.

This thread is explicit about testing the changes and procedures for OH4.

No, this happend to me o a fresh install done in unattended mode.
Even openHAB 4M3 was installed, the wrong path is used here.

I tried many different options, almost all I can think of and I always ended up with either 3.4.4 or openHAB2.

“You didn’t select any of the 4X options.”

The option that I think would make sense the most is

  • (1) (*) release most recommended version that supports openHAB 4 (openHAB branch)
  • then 02 | Upgrade System Update all installed software packages (incl. openHAB) to their latest version

which ends up with 3.4.4

I then tried 03 | Install openHAB Install or upgrade to openHAB 3, → same result.

An 41 option will end up with OH2 (All warn about OH2 and I tried it once and ended up with a corrupt openHAB install, so I had to purge SD card and start from scratch)
│42 | Upgrade to latest openHAB Upgrade OS environment to openHAB current release → also ended up with 3.4.4

So which option or sequence do you like me to try and record? What 4x option do you think of?

Was anyone successful with the latest openhabian / openhabian-config to upgrade from a downloaded 3.x version to 4.0? And if, what options did you use?

You obviously cannot upgrade your release version as OH4 is not released yet, so you need to switch to milestone using the corresponding 4x option first.

The code I asked you about determines how openhabian proceeds. For the system you showed the output for, it should not result in OH2 being installed.

Send the output of

source /opt/openhabian/functions/helpers.bash
set -x
openhab4_is_installed && echo 4
openhab3_is_installed && echo 3
openhab2_is_installed && echo 2

Here you go

set -x
openhab4_is_installed && echo 4
openhab3_is_installed && echo 3
openhab2_is_installed && echo 2
+ openhab4_is_installed
++ dpkg -s openhab
++ grep --color=auto Config-Version
++ cut '-d ' -f2
++ cut -d. -f1
+ [[ '' =~ 4 ]]
+ return 1
+ openhab3_is_installed
++ dpkg -s openhab
++ grep --color=auto Config-Version
++ cut '-d ' -f2
++ cut -d. -f1
+ [[ '' =~ 3 ]]
+ return 1
+ openhab2_is_installed
++ dpkg -s openhab2
++ grep --color=auto Status
++ cut '-d ' -f2
+ [[ '' =~ ^(install|hold)$ ]]
+ return 1

so you need to switch to milestone using the corresponding 4x option first.

I now used “41 openHAB Milestone Install or switch to the latest openHAB Milestone Build” but then canceled it during installation (not to break the whole setup) because I saw in the logs that it retrieves OH2 stuff, see recording

oh_set_to_milestone.txt (53.5 KB)

Can you tell me which menu entry exactly you are referring to, so I don’t misunderstand you? :pray:

PS: btw, if it would help to track down the issue more efficiently, I am happy to offer you a session/call between us.

that’s weird and the reason for OH3 not being detected as installed

Ensure you are on main branch and update openhabian-config on start then try again
with logging on. 41 milestone is the correct option.

All with the Firemot issue, also provide the above command outputs and try the update fix, eventually.

dpkg -s openhab

Package: openhab
Status: install ok installed
Priority: optional
Section: java
Installed-Size: 112411
Maintainer: https://community.openhab.org
Architecture: all
Source: openhab
Version: 3.4.4-2
Replaces: openhab2 (<< 3.0.0~)
Depends: adduser
Recommends: zip, unzip
Suggests: default-jre | java11-runtime | java11-runtime-headless
Breaks: openhab2 (<< 3.0.0~)
Conflicts: openhab2, openhab-runtime, openhab2-online, openhab2-offline
Conffiles:
 /etc/default/openhab a792803febd6308aa964bd1830c920c7
 /etc/profile.d/openhab.sh 15b9e8bd388eac8596feb055f335e71e
 /etc/openhab-cli/command-overrides.sh 8cd755c6f3b4ba095af80bc77c76e927
 /etc/openhab/rules/readme.txt f2780c3cb08c0cc211e70d1dd2b2af38
 /etc/openhab/icons/classic/readme.txt 011f31d40515c2fac27cced93642b105
 /etc/openhab/sounds/doorbell.mp3 70574f7e973f11bb455aede67937da85
 /etc/openhab/sounds/barking.mp3 cbec913d66083aef95c985138268d09f
 /etc/openhab/things/readme.txt b5f79f235cbd6b00988f2f55a64f1382
 /etc/openhab/transform/en.map f61a41a4e7ad91652408a0f97037f9d2
 /etc/openhab/transform/de.map cda3ddd36f115257078eba6591a11946
 /etc/openhab/transform/readme.txt 232ab644e3b46a7a635edd3ba62065e3
 /etc/openhab/items/readme.txt f9812990e58a5c7c6b6c20416e551c94
 /etc/openhab/persistence/readme.txt 8efee3cf25f59daf4ff1f13f5d9e5bcd
 /etc/openhab/services/addons.cfg 7cf20b604cefefa5dc39fe5405411800
 /etc/openhab/services/runtime.cfg 197fb8034df044f72c5cca2c3a634f88
 /etc/openhab/services/readme.txt cb77ecf2c8c08d77dd3a4112b784c065
 /etc/openhab/sitemaps/readme.txt 6e91a52ebe47eb41e1d0fa355521a80f
 /etc/openhab/html/index.html 4777d08e4312bb0c964fceadbe670625
 /etc/openhab/html/readme.txt 20c91c90ba105a0478219bfe026d2260
 /etc/openhab/scripts/readme.txt 69033952a19ce0d58630a2485dadffc4
 /var/lib/openhab/etc/users.properties 805b7f0597b49f522663ccf052ca5c4d
 /var/lib/openhab/etc/org.ops4j.pax.logging.cfg e32d03d5faa08ee147f7b262dbead148
 /var/lib/openhab/etc/log4j2.xml cf79edb74d784c1649af9cea80833028
 /var/lib/openhab/etc/shell.init.script 8468362135a22053da687ddd1b6acc48
 /var/lib/openhab/etc/java.util.logging.properties adb9f5b39047b64b12a6dc4834afc76e
 /var/lib/openhab/etc/scripts/shell.completion.script ac0e1a959777126397265ed304c8fe5c
 /var/lib/openhab/etc/scripts/shell.colors.script 00a54900d8a1fe0bdc83f8d719938ce8
 /var/lib/openhab/etc/keystore 936040b89edd5ef52bbe60b4250ad05e
 /var/lib/openhab/etc/org.ops4j.pax.web.cfg 3afafbfbbd3abf44e3f1b3b0d21034bd
 /var/lib/openhab/etc/org.openhab.voice.cfg a1ecde6c004db8ac15a47ea2600e3a6c
 /var/lib/openhab/etc/equinox-debug.properties 383caa00ead275df972aaf251bea6b11
 /var/lib/openhab/etc/org.openhab.audio.cfg 767b9bf993fa6c74ac5a90758d92a026
 /var/lib/openhab/etc/keys.properties 5ee372301f22fad02165bad62d3d2149
Description: openhab
 Linux installation package for openHAB.
Homepage: www.openhab.org

openhab-cli info

openhabian@openhabian:~ $ openhab-cli info

Version:     3.4.4 (Build)

User:        openhab (Active Process 59358)
User Groups: openhab tty dialout audio bluetooth gpio

Directories: Folder Name      | Path                        | User:Group
             -----------      | ----                        | ----------
             OPENHAB_HOME     | /usr/share/openhab          | openhab:openhab
             OPENHAB_RUNTIME  | /usr/share/openhab/runtime  | openhab:openhab
             OPENHAB_USERDATA | /var/lib/openhab            | openhab:openhab
             OPENHAB_CONF     | /etc/openhab                | openhab:openhab
             OPENHAB_LOGDIR   | /var/log/openhab            | openhab:openhabian
             OPENHAB_BACKUPS  | /var/lib/openhab/backups    | openhab:openhab

URLs:        http://192.168.178.153:8080
             https://192.168.178.153:8443

Branch: → Selected Main on 01

I am now on

which is weird compared to above because above I was on the 5th of June, now I am back on the 4th of June! :man_shrugging:

Selected 02 → just to be sure

and ONLY NOW it is retrieving 4.0.0 m3

Get:1 JFrog testing/main arm64 openhab all 4.0.0~M3-1 [103 MB]

and the result I am indeed on

Which I don’t understand why?!Maybe because the openhabian-config version has changed (see above)?

cheers
Stefan

I will cleanly install the system tomorrow from scratch and try again to reproduce it, I guess.

Your dkpg produced a different output than mine w.r.t. the version check.
I adjusted the code again.

Given there’s newer Raspi OS, I’ve also built a new image.
Please try with this one:

1 Like

Ok, downloaded it and currently installing. I will tell you tomorrow, how it went.

UPDATE:

So, installed that version and it directly comes up with openHAB 4 M3

The only thing that isn’t completely right is the intro message, I guess:

openHAB () under the logo

and the fact that it wants to read something in openHAB2

sed: can’t read /var/lib/openhab2/etc/version.properties: No such file or directory

openhabian config says

openHABian Configuration Tool — [main]{2023-06-08T21:18:26+02:00}(dd99ed3)

Note hat

dpkg -s ‘openhab’ 2>/dev/null | grep Config-Version
still delivers an empty result

The branch is set to

I wonder if this setting still makes sense (downgrade to OH 2)

I haven’t done anything additionally, so let me know if should provide you with more information before I update to the snapshot

Edit ~/.bash_profile the line that sets OHPKG so it reads
if openhab2_is_installed; then OHPKG="openhab2"; else OHPKG="openhab"; fi

It needs to be Version not Config-Version.
What do the code lines in /opt/openhabian/functions/helpers.bash look like for this on your system ?

1 Like

I replaced

if openhab3_is_installed; then OHPKG=“openhab”; else OHPKG=“openhab2”; fi

to

if openhab2_is_installed; then OHPKG=“openhab2”; else OHPKG=“openhab”; fi

and then logged out and in again. Result looks good

dpkg -s ‘openhab’ 2>/dev/null | grep Version
still an empty result

sudo dpkg-query -l | grep openhab
ii openhab 4.0.0~M3-1 all openhab
ii openhab-addons 4.0.0~M3-1 all openhab-addons

Note that openhabian-config has changed its version again (you may know but I just want you to tell which version I am on)

openHABian Configuration Tool — [main]{2023-06-09T09:26:20+02:00}(fea501d)

I think this is what you are looking for

## Function to check if openHAB is running on the current system. Returns
## 0 / true if openHAB is running and 1 / false if not.
##
##    openhab_is_running()
##
openhab_is_running() {
  if openhab_is_installed && [[ $(systemctl is-active openhab) == "active" ]]; then return 0; else return 1; fi
}

## Functions to check it a given supported program is installed should be placed below here

## Function to check if openHAB 2 is installed on the current system. Returns
## 0 / true if openHAB is installed and 1 / false if not.
##
##    openhab2_is_installed()
##
openhab2_is_installed() {
  if [[ $(dpkg -s 'openhab2' 2> /dev/null | grep Status | cut -d' ' -f2) =~ ^(install|hold)$ ]]; then return 0; else return 1; fi
}
## Function to check if openHAB 3 is installed on the current system. Returns
## 0 / true if openHAB is installed and 1 / false if not.
##
##    openhab3_is_installed()
##
openhab3_is_installed() {
  #if [[ $(dpkg -s 'openhab' 2> /dev/null | grep Status | cut -d' ' -f2) =~ ^(install|hold)$ ]]; then return 0; else return 1; fi
  #if [[ $(dpkg -s 'openhab' 2> /dev/null | grep Config-Version | cut -d ' ' -f2 | cut -d '.' -f1) = 3 ]]; then return 0; else return 1; fi
  if [[ $(dpkg -s 'openhab' 2> /dev/null | egrep '^Version' | cut -d ' ' -f2 | cut -d '.' -f1) = 3 ]]; then return 0; else return 1; fi
}
## Function to check if openHAB is installed on the current system. Returns
## 0 / true if openHAB is installed and 1 / false if not.
##
##    openhab_is_installed()
##
openhab4_is_installed() {
  if [[ $(dpkg -s 'openhab' 2> /dev/null | egrep '^Version' | cut -d ' ' -f2 | cut -d '.' -f1) = 4 ]]; then return 0; else return 1; fi
}
## Function to check if openHAB is installed on the current system. Returns
## 0 / true if openHAB is installed and 1 / false if not.
##
##    openhab_is_installed()
##
openhab_is_installed() {
  if openhab2_is_installed || openhab3_is_installed || openhab4_is_installed; then return 0; else return 1; fi
}

Here is the full file, just in case:
helpers.bash.txt (21.7 KB)