I have some troubles getting the razberry Z-Wave board working with openhab 1.8.3 on my Raspberry Pi 3. I found several “ideas” how to solve it, but now I’m confused. Binding/openhab.cfg is easy, but I’m not getting the serial port up and running. Either:
"/dev/ttyAMA0 does not exist" - but port is listed by “ls /dev/tty*
or:
”/dev/ttyS0 port does not exist" - after implementing the overlay fix for RP3 GPIOs (port is again listed by "ls /dev/tty*)
I ran into similar issues recently with the Docker image for openHAB 2. For me it was permission related, my device was mounted with the group uucp but the openhab user did not have this in their groups, only dialout.
If you are running this on the OS without a VM or Docker on top then look at your ls -l /dev/ttyAMA0 for example and see what group name is assigned. I don’t know if openHAB is running with it’s own user, if it is running as your user and you are not root, then make sure your user has access to the group ttyAMA0 is on. Type groups in terminal to see groups active user has.
Did you search the forums? I’m browsing them myself as I get familiar with openHAB and I came across a post with similar issue to yours: Port dev/ttyAMA0 does not exist
Thank you. Yes, I’ve googled the issue for hours, thats when I got confused. I’ve posted my issue in the thread you’ve provided.
Some posts state, that you have to include:
"-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 "
to the openhab start-up script, but the official documentation does not mention this.
I’ve changed everything back to “without z-wave board” but thats not getting me anywhere. Enocean is also working for some sensors only, therefore I choose Z-Wave because it seemed to be much more supported…
It’s depending on how you did setup openHAB on your Raspberry3 where you have to add this option, but for the very first test, you can add it in ./start.sh in your openhab runtime folder. In this file every option has it’s own line and ends with the backslash \ to indicate a newline without enter - so in fact it is one very long command line.
ls -l /dev/ttyA* => crw–w---- 1 root tty 204, 64 Jun 16 23:38 /dev/ttyAMA0
I still assume there is an access issue, but I’m not sure how to verify and solve this.
I’ve tried several iterations and options, without serial, with serial, with or without overlay, SD in Raspberry B, … Whatever I found as tip/workaround, but nothing really works. The Z-Wave board is found by the native tool (z-wave.me) but not by openHAB. And I really do not know which steps I have to do to revert this mess.
Thank you, this really looked promising, but I still get this error in openhab log:
[b.z.i.protocol.ZWaveController] - Serial Error: Port /dev/ttyAMA0 does not exist. I’m thinking of a fresh install on a RPi 2 just to have a clean start and the work from there on.
Checks
sudo ls -l /dev/ttyAM* => crw-rw-rw- 1 root dialout 204, 64 Jun 25 10:07 /dev/ttyAMA0
Worth to mention:
after reboot: sudo ls -l /dev/ttyAM* => crw–w---- 1 root dialout 204, 64 Jun 25 10:10 /dev/ttyAMA0
Disabeling serial terminal with raspi-config => /dev/ttyAM* => not found
I think you have to write a udev rule. Unfortunately I can’t give any advice regarding to this, as I didn’t do that yet, but there should be good documentation in the net. Maybe there is a udev rule already (from zbw_connect?) which sets this strange permissions (it shouldn’t be necessary to root in for access).
First of all: thanks for your support and fast answers so far Udo, I really appreciate that.
After some thought I think the real trouble starts when using raspi-config and changing “A7 Serial Enable/Disable shell and kernel messages on the serial connection”. Even setting it back to “Enable” does not help a lot. Something was changed which is still working even when going back.
If the kernel messages are enabled, the internal tty is not available for the user but bound to the kernel. This is useful for debugging, when video is not available you would be able to login via serial connection, but this blocks the serial port for other apps…
So it’s no option, to enable this setting.
Be aware that a reboot is essential after switching this option.