[SOLVED] Z-Wave binding: no access to serial port on Raspberry Pi

Hey there. I’m completely new to this stuff, and have been doing linux things only for a few weeks now.
What I have done is: Installed Raspbian on a Raspberry Pi Model B(the old one, it was lying around) fitted with a zwave.me raZberry module. Then I installed OpenHAB2, and it seems to work fine. I can access the paper ui and add bindings and things and so on.
Next I installed the Z-Wave Binding and added a thing “Z-Wave Serial Controller” and now this shows me an error: “zwave.thingstate.serial_notfound”
What I already did is:

  • switched off the serial console of the pi in raspi-config
  • chmod 777 /dev/ttyAMA0
  • usermod -a -G dialout openhab
    Then rebooted aaaand…nothing changed. Any suggestions? Thank you in advance…

Hi,

Are you sure your module is connected to /dev/ttyAMA0?
Can you check if it is connected to another port?

Best regards,
George

Thanks George,
I already double checked that. /dev/ttyAMA0 is the serial port located on the gpio header of the raspberry pi, and that is where the module is sitting. I did the following:

dmesg |grep tty
[ 0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x1fa00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=00a27c7c-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.001370] console [tty1] enabled
[ 0.991297] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2

Another thing I found in the documentation of the serial binding:

If you are using non standard serial ports you have to adapt start.sh to have the serial port included. The java command line should then include the following parameters:
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0

Unfortunately, I can’t find a start.sh
I got Openhab2 to start upon booting with the command from the OpenHAB2 Tutorial:
sudo update-rc.d openhab2 defaults

Have you added the serial port to /etc/default/openhab2?

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

Definitely NOT! I will try this immediately. Thanks a lot, I think this could do the trick!

Finally, the thing says it is online! Thank you very much for your super fast help. Now I am waiting for my first wall plug to arrive. I have a last question regarding the topic: Where could i have found that information by myself? I don’t want to bother people with my beginner’S questions all the time…

In the installation instructions