Openhab on Raspberry PI 5

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.

Don’t know if i still can help?

I had the same problem with Zwave-js. What i did was.

sudo systemctl stop serial-getty@ttyAMA0.service and then
sudo systemctl disable serial-getty@ttyAMA0.service

do not use ttyAMA10. Because I tryed it and it didn’t work so i tryed ttyAMA0 and that was the solution for me.

I tried sudo stop/disable serial-getty@ttyAMA0.service as you wrote, but it does not seem to work for me.
Then i tried to sudo stop/disable serial-getty@ttyAMA10.service (because I thought then the sytem would relocate to another ttyAMAx and you wrote not to use ttyAMA10), but that does not make a difference.
When I check with: ls -l /dev |grep serial it returns always: serial0 -> ttyAMA10.
What am I doing wrong? How would I relocate the serial0 to ttyAMA0 (if that may help solve to get the zwave-controller online)?

Thanks for any help.