Z-Wave board and Raspberry 3


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*
”/dev/ttyS0 port does not exist" - after implementing the overlay fix for RP3 GPIOs (port is again listed by "ls /dev/tty*)

Any ideas?

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

Hope it helps :slight_smile:

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…

Did you disable the serial console via raspi-config? For this try

sudo raspi-config

and then go to Advanced -> Serial -> No.
You will have to reboot your Raspberry to take advance.
After that step, with

ls -l /dev/ttyA*

you should get an output like

crw-rw---- 1 root dialout 204, 64 Jun 16 16:56 /dev/ttyAMA0

The next step is, to add this non-standard serial port to the openHAB Startup Script, so find the java line and add


to the options - see here

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.

1 Like

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.

Ah. for some strange reason, your serial device bleongs to the group tty, and the group has only write access.


sudo chmod g+r /dev/ttyAMA0

to set read permissions for group
after this, the command ls -l /dev/ttyA* should show

crw-rw---- 1 root tty 204, 64 Jun 16 23:38 /dev/ttyAMA0

and additionally you have to add the user openhab to the group tty:

sudo adduser openhab tty 

to grant access for user openhab (if this is the one you are using to start openhab)

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.

I should have reread the first posting… :wink:

Another weekend, another try on a freshly installed Raspberry Pi 2 … no big change. I’m sure it is some config error, but still I get:

2016-06-25 10:07:23.999 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-06-25 10:07:29.019 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-06-25 10:07:34.039 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-06-25 10:07:39.060 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = SerialApiSetTimeouts (0x06), type = Request (0x00), payload = 96 0F

Steps so far::
A. Installed razberry board and tested with zbw_connect => everything works fine, => disableed autostart of zbw_connect

B. Openhab and Habmin => Installed and working fine for a week (displaying time and network bandwith)

C. Rights (only then /dev/ttyAMA0 is recognized by OpenHAB)
sudo chgrp dialout /dev/ttyAMA0
sudo chmod a+rw /dev/ttyAMA0

D. Z-Wave for OpenHAB

  1. sudo apt-get install openhab-addon-binding-zwave
  2. sudo usermod -a -G dialout openhab
  3. sudo adduser openhab tty
  4. added "-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 " to /usr/share/openhab/bin/openhab.sh
  5. etc/openhab/configurations/openhab.cfg"

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

Are you sure, that razberry makes use of /dev/ttyAMA0?

? what does it mean “not found”?

Yes it uses it, if not found/present the zbw_connect does not work either. There are also several other guides which document this.

The original output reads: “ls: Zugriff auf /dev/ttyAM* nicht möglich: Datei oder Verzeichnis nicht gefunden”

After rebooting I now get the well known message:

2016-06-25 17:53:15.786 [ERROR] [b.z.i.protocol.ZWaveController] - Serial Error: Port /dev/ttyAMA0 does not exist


sudo ls -l /dev/ttyAM* => crw–w---- 1 root tty 204, 64 Jun 25 17:29 /dev/ttyAMA0

I really do not now what to do from this point onward. This whole set-up is again not working.

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.

In the other thread reagarding this (Port dev/ttyAMA0 does not exist) nobody found an answer to that so far.

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.

Hi Udo, this was my understanding too, but if I disable it the port is not available any more:

sudo ls -l /dev/ttyAM* => ls: Zugriff auf /dev/ttyAM* nicht möglich: Datei oder Verzeichnis nicht gefunden

and in openhab.log I see the following error (which makes sense I guess):

[ERROR] [b.z.i.protocol.ZWaveController] - Serial Error: Port /dev/ttyAMA0 does not exist

You managed to solve the problem?