Openhab on Raspberry PI 5

Hello,I have tested openhabian 1.8c on raspberry pi5 , a lot of things seems to work very smooth. But I have problems with installing Homegear .I need this for my heating control (cunx).
I hope I will get help here :wink:

Best Regards, Martin

which of the 3 images did you use?

I don’t think so. This is not an openHABian issue. Homegear still doesn’t support bookworm.
You would need to ask Homegear devs for support over at their forum.

I use openhabian-pi-raspios64-202402052003-git4f124c2-crc217d2cd1.img.xz

I’m about to release openHABian 1.9 with full support for bookworm and all RPi models (incl. 5).

Please help with testing and provide your feedback in this thread.

2 Likes

There have not been an Openhabian image when I installed Openhab on my Pi5 with NVMe-SSD-drive. Therefore I used the installation with APT packages (option 2).
I installed “Raspberry Pi OS Lite (64-bit)”, Java 17, Samba, Openhab 4.1.1, Mosquitto 2.0.11 and Node.js v21.6.2.

bguser@raspberrypi5:~ $ cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
bguser@raspberrypi5:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0 238,5G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part /boot/firmware
└─nvme0n1p2 259:2    0   238G  0 part /
bguser@raspberrypi5:~ $ java -version
openjdk version "17.0.10" 2024-01-16 LTS
OpenJDK Runtime Environment Zulu17.48+15-CA (build 17.0.10+7-LTS)
OpenJDK 64-Bit Server VM Zulu17.48+15-CA (build 17.0.10+7-LTS, mixed mode, sharing)
bguser@raspberrypi5:~ $

I used Openhabian in the past and are missing the Openhabian tool a bit, especially the Frontail log viewer in the web-browser (I need a SSH session and have to run openhab-cli showlogs).

Is it possible to install the “Openhabian tool” over a running Openhab installation - or is the Openhabian image especially for new SD-card installations?
Looking forward if it is possible to help with the testing of Openhabian on Pi5.

It’s an image for good reasons as its workings rely on a number of prerequisites in HW and OS config that are not guaranteed to be there when you bring that part in yourself.
It’s not built to be installed on whatever unsupported hardware or selfmade OS.

Thanks but no, thanks, read here why.

If you want to install frontail, execute the following script as sudo:

#This installs nodejs (it might run with version 21, too, but I am not sure). You may want to uninstall version 21 first
curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" | gpg --dearmor > /usr/share/keyrings/nodesource.gpg
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
apt-get install --yes nodejs

#Install NPM
apt-get install --yes npm

#Install FRONTAIL
useradd --groups bguser,openhab -s /bin/bash -d /var/tmp frontail
mkdir -p /usr/local/lib/node_modules/frontail
git clone https://github.com/Interstellar0verdrive/frontail_AEM.git /usr/local/lib/node_modules/frontail
cd /usr/local/lib/node_modules/frontail
npm audit fix --omit=dev
npm update --audit=false --omit=dev
npm install --global --audit=false --omit=dev
echo '[Unit]
Description=Frontail openHAB instance, reachable at http://%H:9001
Documentation=https://github.com/mthenw/frontail
After=openhab.service
PartOf=openhab.service

[Service]
Type=simple
ExecStart=/usr/local/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/local/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /var/log/openhab/openhab.log /var/log/openhab/events.log
Restart=always
User=frontail
Group=openhab
Environment=PATH=/usr/local/bin:/usr/bin/
Environment=NODE_ENV=production
WorkingDirectory=/usr/bin/

[Install]
WantedBy=multi-user.target' | tee /etc/systemd/system/frontail.service
chmod 644 /etc/systemd/system/frontail.service
systemctl enable --now frontail.service
1 Like

Thank you @Oliver2 for your help. Your instructions help me to install Frontail.

I had a few problems downgrading node v21.6.2 to node v18.19.1 and downgrade npm 10.5.0 to 10.2.4

bguser@raspberrypi5:~ $ sudo su
root@raspberrypi5:/home/bguser# apt-get install --yes nodejs
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
nodejs ist schon die neueste Version (21.6.2-1nodesource1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
root@raspberrypi5:/home/bguser# node -v
v18.19.1
root@raspberrypi5:/home/bguser#

root@raspberrypi5:/usr/local/lib/node_modules/frontail# npm audit fix --omit=dev
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 139 packages, and audited 140 packages in 20s

After I run “npm audit fix --force” I still had 4 moderate severity vulnerabilities

… anyway I finished the installation … and Frontail works! Thank you!
The next days I’ll check possible difference between “Frontail web view” and “openhab-config showlogs”


Thanks again for your great support!

That‘s something we cannot solve. These errors require a developer to be fixed, but Frontail is no longer maintained.
Anyway, at the moment it is working for all of us - that‘s the good news.

You mean openhab-cli showlogs (do not mix up with openhabian-config).
There are no differences because both openhab-cli and frontail simply show the content of log files events.log and openhab.log.

1 Like

" * Zwave with Razberry board - After changing the “branch” to latest (main) I can disable the serial console (menu 35 of openhabian config). If I also select “move Bluetooth to miniuart”, the select “*” does not stay selected, if I leave the menu and re-enter it or reboot, so it does not seem to work. Do I still need this with Raspi5? Anyway my Zwave-Controller is not recognized, so I am lacking those “Things” unfortunately."

Hi,
@ecko I got the same problem here, ZWave with Razbbery board V2 and Pi 5 4gb, I bought yesterday Pi 5 and I try to make it work, still can’t disable mini uart from config…
"export EXTRA_JAVA_OPTS=-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA10
openhabian@openhabian:~ $ /dev/ttyAMA10
-bash: /dev/ttyAMA10: Permission denied

dtoverlay=pi3-disable-bt
openhabian@openhabian:~ $ ls /dev/tty*

I can see “/dev/ttyAMA10” and I can selected it from UI → Z-Wave Serial Controller at Port Configuration /dev/ttyAMA10 , but I got Status:OFFLINE, BRIDGE_OFFLINE, Controller is offline. It working fine on PI3, I bought yesterday a Pi 5 and I need help… Do you have any advice?
Thanks

Hi,
same situation with me. I haven‘t got it working yet. I decided to sit it out and wait for a functioning version of openhabian. Until then my raspi 3b has to do all the work.
I have tried to install a z-way server alongside openhabian (as they seem to have a working bookworm version) to switch from the z-wave-binding, to the z-way-binding, but I could not reach the z-way web-interface even though the server was running, to set it up properly. But that would have been a sort of „work around“. Maybe that idea helps you and you get it to work.

Greetings
Eckart

1 Like

Hello,

Have you considered this

/boot/config.txt
DO NOT EDIT THIS FILE
The file you are looking for has moved to /boot/firmware/config.txt

So you need to edit

/boot/firmware/config.txt

Try openHABian v1.9c.

Open Source Software is a joint effort and anyone to benefit is expected to contribute his or her share. So if 1.9c still does not work, please help with development and follow the debug guide to identify the cause rather than just wait for someone else to do the work. Thank you.

2 Likes

openHAB 4.1.2 - Release Build

Looking for a place to get started? Check out ‘sudo openhabian-config’ and the
documentation at openHABian | openHAB
The openHAB dashboard can be reached at http://openhabian:8080
To interact with openHAB on the command line, execute: ‘openhab-cli --help’

openhabian@openhabian:~ $ sudo openhabian-config
[sudo] password for openhabian:
2024-04-08_21:25:43_CEST [openHABian] Checking for root privileges… OK
2024-04-08_21:25:43_CEST [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2024-04-08_21:25:43_CEST [openHABian] openHABian configuration tool version: [openHAB]{2024-04-07T13:57:38+02:00}(64201c3)
2024-04-08_21:25:43_CEST [openHABian] Checking for changes in origin branch openHAB… OK
2024-04-08_21:25:45_CEST [openHABian] Switching to branch openHAB… OK
2024-04-08_21:25:45_CEST [openHABian] Checking openHAB Signing Key expiry.
2024-04-08_21:25:45_CEST [openHABian] Checking expiry date of apt keys… OK
2024-04-08_21:25:45_CEST [openHABian] Checking for updates of openhab_rules_tools for JS Scripting… No update available.
2024-04-08_21:25:52_CEST [openHABian] Updating Linux package information… OK
2024-04-08_21:25:52_CEST [openHABian] Applying file permissions recommendations…
Setting Java and arping file capabilites

$ setcap cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep /usr/lib/jvm/java-17-openjdk-arm64/bin/java

$ setcap cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep /usr/sbin/arping

$ usermod --append --groups audio openhab

$ usermod --append --groups audio openhabian

$ usermod --append --groups bluetooth openhab

$ usermod --append --groups bluetooth openhabian

$ usermod --append --groups dialout openhab

$ usermod --append --groups dialout openhabian

$ usermod --append --groups gpio openhab

$ usermod --append --groups gpio openhabian

$ usermod --append --groups tty openhab

$ usermod --append --groups tty openhabian

$ usermod --append --groups openhab openhabian

$ chown --silent openhab:openhab /srv /opt

$ chmod --silent ugo+w /srv

$ chown --recursive openhab:openhab /etc/openhab /var/lib/openhab /var/log/openhab /usr/share/openhab

$ chmod --recursive u+wX,g+wX /opt /etc/openhab /var/lib/openhab /var/log/openhab /usr/share/openhab

$ chown openhabian:openhab /var/lib/openhab/backups

$ chmod g+ws /var/lib/openhab/backups

$ fix_permissions /home/openhabian openhabian:openhabian

$ setfacl --recursive --remove-all /etc/openhab /var/lib/openhab /var/log/openhab /usr/share/openhab

$ fix_permissions /var/log/unattended-upgrades root:root 644 755

$ fix_permissions /var/log/samba root:root 640 750

$ fix_permissions /var/log/openhab openhab:openhabian 664 775

$ fix_permissions /opt/zram/log.bind/samba root:root 640 750

$ fix_permissions /opt/zram/log.bind/openhab openhab:openhabian 664 775

$ fix_permissions /opt/zram/persistence.bind openhab:openhabian 664 775
OK
2024-04-08_21:26:02_CEST [openHABian] Updating Linux package information… OK
2024-04-08_21:26:02_CEST [openHABian] Configuring serial port for peripherals… OK
2024-04-08_21:26:03_CEST [openHABian] Making Bluetooth use mini-UART… SKIPPED
2024-04-08_21:26:09_CEST [openHABian] Checking for default openHABian username:password combination… FAILED
2024-04-08_21:26:10_CEST [openHABian] We hope you got what you came for! See you again soon :wink:

That code part didn’t check for pi5 yet. I’ve added it.
Try again, let openhabian-config update itself on start.

1 Like

Thanks a lot! You rock !

sudo openhabian-config
2024-04-08_22:24:24_CEST [openHABian] Checking for root privileges… OK
2024-04-08_22:24:24_CEST [openHABian] Loading configuration file ‘/etc/openhabia n.conf’… OK
2024-04-08_22:24:27_CEST [openHABian] openHABian configuration tool version: [op enHAB]{2024-04-08T21:13:19+02:00}(e86ba87)
2024-04-08_22:24:27_CEST [openHABian] Checking for changes in origin branch open HAB… OK
2024-04-08_22:24:30_CEST [openHABian] Switching to branch openHAB… OK
2024-04-08_22:24:30_CEST [openHABian] Checking openHAB Signing Key expiry.
2024-04-08_22:24:30_CEST [openHABian] Checking expiry date of apt keys… OK
2024-04-08_22:24:30_CEST [openHABian] Checking for updates of openhab_rules_tool s for JS Scripting… No update available.
2024-04-08_22:24:36_CEST [openHABian] Updating Linux package information… OK
OK
2024-04-08_22:24:37_CEST [openHABian] Updating repositories and upgrading instal led packages…
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
rpi-eeprom
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2024-04-08_22:24:53_CEST [openHABian] Updating Linux package information… OK
2024-04-08_22:24:53_CEST [openHABian] Configuring serial port for peripherals… OK
2024-04-08_22:24:55_CEST [openHABian] Making Bluetooth use mini-UART… OK (rebo ot required)
2024-04-08_22:25:00_CEST [openHABian] Checking for default openHABian username:p assword combination… FAILED
2024-04-08_22:25:01_CEST [openHABian] We hope you got what you came for! See you again soon :wink:

after reboot the option 35 checkbox( 2 (RPi3/4) move Bluetooth to mini UART) isn’t checked and Z-Wave Serial Controller it’s still offline…

sudo openhabian-config
[sudo] password for openhabian:
2024-04-08_22:51:40_CEST [openHABian] Checking for root privileges… OK
2024-04-08_22:51:40_CEST [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2024-04-08_22:51:41_CEST [openHABian] openHABian configuration tool version: [openHAB]{2024-04-0 8T21:13:19+02:00}(e86ba87)
2024-04-08_22:51:41_CEST [openHABian] Checking for changes in origin branch openHAB… OK
2024-04-08_22:51:44_CEST [openHABian] Switching to branch openHAB… OK
2024-04-08_22:51:44_CEST [openHABian] Checking openHAB Signing Key expiry.
2024-04-08_22:51:44_CEST [openHABian] Checking expiry date of apt keys… OK
2024-04-08_22:51:44_CEST [openHABian] Checking for updates of openhab_rules_tools for JS Scripti ng… No update available.
2024-04-08_22:51:51_CEST [openHABian] Updating Linux package information… OK
2024-04-08_22:51:51_CEST [openHABian] Configuring serial port for peripherals… OK
2024-04-08_22:53:01_CEST [openHABian] Making Bluetooth use mini-UART… OK
2024-04-08_22:53:03_CEST [openHABian] Checking for default openHABian username:password combination… FAILED
2024-04-08_22:53:04_CEST [openHABian] We hope you got what you came for! See you again soon :wink:

Check config.txt in /boot/firmware if openhabian-config properly modified it.
And use debugmode=maximum in /etc/openhabian.conf before retrying.

Hi Markus,

Maybe I’m not doing something good…

I’ve checked config.txt in /boot/firmware →

# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

dtoverlay=miniuart-bt

After reboot the option 35 checkbox( 2 (RPi3/4) move Bluetooth to mini UART) still isn’t checked and Z-Wave Serial Controller it’s still offline…

Operation successful ├───────────────────────────┐
│ │
│ The serial options have successfully been configured! │
│ │
│ Please reboot for changes to take effect.

2024-04-09_17:08:34_CEST [openHABian] Updating Linux package information… OK
2024-04-09_17:08:34_CEST [openHABian] Configuring serial port for peripherals… OK
2024-04-09_17:08:39_CEST [openHABian] Making Bluetooth use mini-UART… OK

Until you made the commit I didn’t see this message, so I’m guessing I made the update… no errors… after reboot I’ve checked if there is any [*] , it isn’t.

Thanks!

That’s meaningless, it isn’t supposed to be checked.
Last line of your config.txt shows it was properly modified so it should work.
At least this has been working for RPI3/4 in years AFAIK.
So either something changed in RPi5 vs RPi4 w.r.t. UART options, or your zwave problem cause is not here.
EDIT: Try dtparam=uart0=on in config.txt
but please g**gle yourself to find out how to diagnose if your serial port is working.
If you find out about differences in RPi5 vs earlier such as new options we might need to set in config.txt, please figure out and let me know.