since i’ve been spending the whole day unsuccessfully getting the Razberry Board up and running on my Raspberry Pi 4 with Docker, I would like to ask for your advice.
I have installed the Z-Wave add-on, the device is displayed there under serial port, but the status is always offline.
The following was attempted on the host:
installed Ubuntu-Server for Raspberry
installed Raspberry OS
set user to dialout group
chmod 777 /dev/ttyAMA0
deactivated/uninstalled all bluetooth stuff
deactivated bluetooth in the boot config
My Docker compose file looks like this:
devices: - /dev/ttyAMA0:/dev/ttyAMA0:rwm
Maybe someone has an idea… that would be great!
Thanks in advance!
thanks for your reply. I received the following output:
On the host:
[ 0.001805] printk: console [tty1] enabled
[ 1.447416] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[ 1.454662] printk: console [ttyS0] disabled
[ 1.454802] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 37, base_baud = 62500000) is a 16550
[ 2.724158] printk: console [ttyS0] enabled
In the docker (docker exec -it openhab /bin/bash) i cant execute the command dmseg, so i did this:
ls /dev/tty*
and get this: /dev/tty /dev/ttyAMA0
Therefore, I assumed that openHAB also sees the device in the Docker container. But maybe that doesn’t say anything either.
If I put the container in privileged mode, then I can use the sudo dmesg | grep tty, but get the output from the host - at least that’s how it looks to me…
[ 0.001805] printk: console [tty1] enabled
[ 1.447416] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[ 1.454662] printk: console [ttyS0] disabled
[ 1.454802] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 37, base_baud = 62500000) is a 16550
[ 2.724158] printk: console [ttyS0] enabled
Sorry @Bruce_Osborne , i forgot to mention that, of course i also tried /dev/ttyS0, unfortunately without success.
What i noticed - sometimes i can select the controller in the GUI under serial port and then the next time i try it doesn’t appear again. Something shouldn’t be going very well there.
Which rights have to be set? Is it enough to set this :rwm in the composer-file or do i have to set rights somewhere in (docker) or outside (host) the container? I’ve already tried it with the 777 on the host for the device, unfortunately without success …
thank you for your hint.
The device can be found with the same name in the OS as in the container.
The user openhab was authorized in the container for the device with chown -R openhab: openhab /dev/ttyAMA0 the same for /devttyS0. The user does not exist on the host itself, so nothing can be authorized here.
Maybe it has something to do with the Raspberry Pi 4 - i tried it on the Raspberry Pi 3+, everything worked right away. I also tried my second Raspberry Pi 4, unfortunately without success here as well.
Yes, the board is compatible - i had this constellation (Raspberry Pi 4, Razberry and openHAB 2.5) running for about 2 years without any problems. Now i wanted to switch to OH3 and unfortunately that doesn’t quite work. The only thing that has changed is that i have the system running on Docker - which works fine on a Raspberry Pi 3+.
I have now found the solution. The following post provided me with the necessary information:
If openHAB is installed in a Docker on a Raspberry Pi OS, the serial console must be deactivated via raspi-config and the serial port must of course be activated.