OpenHAB2 on Razpberry - Z-Wave Controller Offline

Hello guys,

My Environment

Raspberry 3 with Razberry module/controller (GPIO)
–Raspbian Jessie (8) (with Pixels) (clean image)

OpenHAB2 Beta installed with ‘apt-get install openhab2-offline’
–Package: openhab2-offline
–Version: 2.0.0~b4

Extensions:
–Z-Wave Binding
–binding-zwave - 2.0.0.b4

Context

I tried to add a Z-Wave Controller (Configuration/Things) but OH tells me “Status: OFFLINE - BRIDGE_OFFLINE Controller is offline”.

First of all, i checked the permissions … and added dialout and tty to openhab

ll /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 64 Dec 10 20:55 /dev/ttyAMA0
su openhab -s /bin/bash -c "id"
uid=112(openhab) gid=119(openhab) groups=119(openhab),5(tty),20(dial out)

After restarting the PI, the problem is still there.

The controller(Razberry) will work with the Z-Way application(previous tests), so the controller should be ok.

I tried also to load the ttyAMA0 into the Java, but it won’t solve it.

cat /etc/default/openhab2
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
openhab   2504  4.9 15.7 439712 148948 ?       Sl   21:12   3:23 /usr/bin/java 
-Dopenhab.home=/usr/share/openhab2 
-Dopenhab.conf=/etc/openhab2 
-Dopenhab.runtime=/usr/share/openhab2/runtime 
-Dopenhab.userdata=/var/lib/openhab2 
-Dopenhab.logdir=/var/log/openhab2 
-Dorg.osgi.service.http.port=8080 
-Dorg.osgi.service.http.port.secure=8443 
-Xmx256m -Djava.awt.headless=true 
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 
-Djava.endorsed.dirs=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/jre/lib/endorsed:/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/endorsed:/usr/share/openhab2/runtime/karaf/lib/endorsed 
-Djava.ext.dirs=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/jre/lib/ext:/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/ext:/usr/share/openhab2/runtime/karaf/lib/ext 
-Dkaraf.instances=/usr/share/openhab2/runtime/karaf/instances 
-Dkaraf.home=/usr/share/openhab2/runtime/karaf 
-Dkaraf.base=/var/lib/openhab2 
-Dkaraf.data=/var/lib/openhab2 
-Dkaraf.etc=/usr/share/openhab2/runtime/karaf/etc 
-Dkaraf.restart.jvm.supported=true 
-Djava.io.tmpdir=/var/lib/openhab2/tmp 
-Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties 
-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true 
-classpath /usr/share/openhab2/runtime/karaf/lib/boot/org.apache.karaf.diagnostic.boot-4.0.4.jar:/usr/share/openhab2/runtime/karaf/lib/boot/org.apache.karaf.jaas.boot-4.0.4.jar:/usr/share/openhab2/runtime/karaf/lib/boot/org.apache.karaf.main-4.0.4.jar:/usr/share/openhab2/runtime/karaf/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main

/var/log/openhab2/openhab.log:

2016-12-10 21:13:51.462 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-12-10 21:13:56.470 [WARN ] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class=SerialApiGetCapabilities[0x07], type=Request[0x00], priority=High, dest=255, callback=0, payload=
2016-12-10 21:14:01.479 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-12-10 21:14:06.487 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-12-10 21:14:11.495 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-12-10 21:14:16.504 [WARN ] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class=SerialApiSetTimeouts[0x06], type=Request[0x00], priority=High, dest=255, callback=0, payload=96 0F
2016-12-10 21:14:21.513 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-12-10 21:14:26.521 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-12-10 21:14:31.524 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-12-10 21:14:36.527 [WARN ] [ocol.ZWaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class=GetSucNodeId[0x56], type=Request[0x00], priority=High, dest=255, callback=0, payload=

/var/log/openhab2/events.log

2016-12-10 21:12:47.077 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_a98a2768_serial_oof-zwave:serial_zstick:a98a2768:serial_oof' has been added.
2016-12-10 21:12:47.081 [ItemChannelLinkAddedEvent ] - Link 'zwave_serial_zstick_a98a2768_serial_sof-zwave:serial_zstick:a98a2768:serial_sof' has been added.
2016-12-10 21:12:47.173 [ItemAddedEvent            ] - Item 'zwave_serial_zstick_a98a2768_serial_sof' has been added.
2016-12-10 21:12:47.187 [ItemAddedEvent            ] - Item 'zwave_serial_zstick_a98a2768_serial_ack' has been added.
2016-12-10 21:12:47.189 [ItemAddedEvent            ] - Item 'zwave_serial_zstick_a98a2768_serial_nak' has been added.
2016-12-10 21:12:47.191 [ItemAddedEvent            ] - Item 'zwave_serial_zstick_a98a2768_serial_can' has been added.
2016-12-10 21:12:47.193 [ItemAddedEvent            ] - Item 'zwave_serial_zstick_a98a2768_serial_oof' has been added.
2016-12-10 21:12:47.201 [ThingAddedEvent           ] - Thing 'zwave:serial_zstick:a98a2768' has been added.
2016-12-10 21:12:53.245 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:a98a2768' changed from UNINITIALIZED to INITIALIZING
2016-12-10 21:12:53.257 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:a98a2768' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

Under
Inbox > Z-Wave Binding > Choose Thing
I can only choose "Z-Wave Serial Controller \Z-Wave USB Stick with Serial Interface"
But i using the Module (Razberry)…
Does it matter?

Has anyone an idea, how to fix that problem?

No, it doesn’t matter - the serial API is the same for all controllers.

Hopefully someone can help you more than me - I don’t have an RPi so can’t comment about the port issues. Unfortunately it does seem to be a common issue with the Pi so I’d suggest a search of the forum to see what others have suggested.

I banged my head against the keyboard trying to get my Razberry working when switching from an RPI2 to an RPI3.

Basically if you do extactly this, nothing more nothing less it will work.

Openhabian is a really nice image anyway. So go with that. See if it works, when it does, you can install Jessie/whatever and try step by step to compare differences.

Regards, S

is it really dial out with space in it? That’d be strange…

No!

I checkt it again…

su openhab -s /bin/bash -c "id"
uid=112(openhab) gid=119(openhab) groups=119(openhab),5(tty),20(dialout)

OK
I have tried with the Openhabian but i get the same error…

“Status: OFFLINE - BRIDGE_OFFLINE Controller is offline”

I believe with the RPi 3, /dev/ttyAMA0 is actually claimed by the bluetooth module onboard.

IIRC, to disable it, I added the line:

dtoverlay=pi3-disable-bt

to /boot/config.txt, and rebooted. Its a known conflict with the razberry and RPi3 (nothing to do with openhab)

http://domoticanoob.nl/razberry-met-raspberry-3/

(Google translate does a good job, if you can’t read it native) :wink:

Did you connect on /dev/ttyS0?
You you should not have to add anything manually in /boot.

Hi,

I have had similar problems to get my Razberry working until I stumbled upon a post that said that in the RPi3 AMA0 is now the Blutooth.
On RPi3 you need to connect to /dev/ttyS0 in order to reach your Razberry.

Still with this info it didn’t work for me, something else was also wrong. But I did these steps described by BlizzWave and after that myh Razberry is Online. :slight_smile:

Btw, that was some nice logs you got there, I have to see if I can find them as well. I guess they can be useful. :slight_smile:

/ newbie 4 days into openhab2 :slight_smile:

Hy community,

I got openhab2 running on an raspberry 3 with an ZME_UZB1 Z-Wave Controller stick and a few sensors.

The Z-Wave Controller was set to /dev/ttyACM0 and everything worked for 2 weeks but since today openhab says the controller is offline. I tried to reboot and change the port to /dev/ttyAMA0 and /dev/ttyS0 but still no connection to the controller.

The only thing I changed was I added the MQTT Binding.

Hi Aiko,

I have the same issue since yesterday! I have a similar setup as you, (Rpi3 + Razberry z-wave card) and running openhab2 + about 5 z-wave devices so far.

Last night I installed the RFXCOM binding. Later on today I notice that the Basic UI wasn’t responding to changes on my light switch. I went over to habmin and everything was listed as OFFLINE.

I figures I’d reboot to fix it. But when I got back to habmin everything is gone! I did try a search you know to see if stuff would get connected again but noting showed up.

Haven’t had time to look into this more today just turned the Rpi off. But I figure I’ll have to start from the scratch I guess with a clean install.

Let me know how things go for you Aiko.

Hi Erik,

now where you say it I got the same problem yesterday. All my things was gone and I added everything again but now I can’t get the connection.

The “all my things are gone” issue is because OH changed the storage used to store things. This is expected and if you search the forum for jsondb, you should find the notification on this.

The “ZWave offline” problem is likely due to a change in the serial driver. See here -:

Thanks for linking to that thread Chris!

I got my z-wave controller working again after adding the liblockdev1-dev package as suggested solution in that discussion thread. It fixed the issue with communicating with the serial port.

I did:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install liblockdev1-dev
and rebooted.

Then it was just a question of adding all the items and things again. :slight_smile:
Cheers!

changed nothing. Today is everything working again.

The change to the serial driver was reverted earlier today.