[SOLVED] Razberry: Controller goes offline

Hi there,
I’m new to openhab and also to raspberry. I want to create a small home-automation and therefore set up a raspberry 3 with a razberry. I installed openhabian with openhab Rel. 2.1.0-1.

I followed some manuals in the www and also had some problems getting the Serial Port working for openhab (ttyAMA0). Finally it seemed to work and the controller was visible in HABmin and PaperUI.
But after some minutes it always goes offline. I can’t imagine why and I find nothing in the web for this prolem.

Can anybody help please?
:grimacing:

Regards
Klaus

Have you checked the openhab.log and eventlog in /var/log/openhab2 on the raspberry ? It could give you an indication what the problem might be.

openhab.log (from last boot)

2017-08-23 13:26:59.575 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at <link>
2017-08-23 13:26:59.584 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at <link>
2017-08-23 13:27:15.712 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-08-23 13:27:15.969 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2017-08-23 13:27:16.248 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-08-23 13:27:16.443 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-08-23 13:27:16.614 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-08-23 13:27:21.042 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'
2017-08-23 13:27:21.116 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-08-23 13:27:21.132 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-08-23 13:27:21.155 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2017-08-23 13:27:21.156 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2017-08-23 13:39:43.271 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2017-08-23 13:39:55.692 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2017-08-23 13:39:56.206 [INFO ] [assic.internal.servlet.WebAppServlet] - Stopped Classic UI
2017-08-23 13:39:56.267 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2017-08-23 13:39:56.678 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2017-08-23 13:39:56.730 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2017-08-23 13:39:56.767 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
2017-08-23 13:41:13.642 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://10.24.9.126:8080
2017-08-23 13:41:13.651 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://10.24.9.126:8443
2017-08-23 13:41:29.363 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-08-23 13:41:29.594 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2017-08-23 13:41:29.911 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-08-23 13:41:30.771 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-08-23 13:41:30.862 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-08-23 13:41:35.320 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'
2017-08-23 13:41:35.387 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-08-23 13:41:35.404 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-08-23 13:41:35.427 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2017-08-23 13:41:35.429 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

events.log (from last boot)

2017-08-23 13:26:11.632 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to UNINITIALIZED
2017-08-23 13:26:14.713 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-08-23 13:26:15.462 [ThingRemovedEvent ] - Thing ‘zwave:serial_zstick:0c4223e9’ has been removed.
2017-08-23 13:27:12.729 [ThingAddedEvent ] - Thing ‘zwave:serial_zstick:0c4223e9’ has been added.
2017-08-23 13:27:21.042 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from UNINITIALIZED to INITIALIZING
2017-08-23 13:27:21.072 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2017-08-23 13:39:52.444 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to UNINITIALIZED
2017-08-23 13:39:55.707 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-08-23 13:39:56.404 [ThingRemovedEvent ] - Thing ‘zwave:serial_zstick:0c4223e9’ has been removed.
2017-08-23 13:41:27.030 [ThingAddedEvent ] - Thing ‘zwave:serial_zstick:0c4223e9’ has been added.
2017-08-23 13:41:35.317 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from UNINITIALIZED to INITIALIZING
2017-08-23 13:41:35.323 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0c4223e9’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

Update: now the controller dont want to go online anymore (I changed nothing…)

:disappointed_relieved:

which version of razberry do you have? 1 or 2?

Do you have prepare the serial port about openhabian-config?
When you have a Razberry 1, you have to check all three options:
* Disable serial console
* Disable bluetooth module
* Add common serial ports to openHAB JVM

At least this was the solution for me!

seems to be razberry 2 (Expert-UI says: product-ID: 1024 / 2, Z-Wave-Chip: ZW0500)

I disabled serial console and bt via openhabian-config.

* Add common serial ports to openHAB JVM
means this?:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
=> I set this in /etc/default/openhab2

If I’m right
ZW0500 = Razberry 1 and
ZM5202 = Razberry 2

If it looks like this one -> https://razberry.z-wave.me/index.php?id=9 it’s a Razberry 2

I’m not sure if the version makes a difference. But I had the the same messages in the logfile and after checking the three options it works!

“Add common serial ports to openHAB JVM” adds the port “/dev/ttyAMA0” to /etc/default/openhab2
and some other ports:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

Here is a good step-by-step tutorial (in german): http://onesmarthome.de/smart-home-openhab-2-z-wave-integration-und-konfiguration/.

Thanks for your reply.
According to the image it is Razberry v2

I’ll try the tutorial tomorrow and will report :o)

Heureka! :rofl:

I followed the above mentioned tutorial (made a fresh install) and all seems to work fine. Even after some reboots and shutdowns with unplug and reboot.

Thanks a lot, there must something magic within one of the tutorial steps that I don’t understand.

Regards
Klaus

By the way: I found out what the problem is :bulb::
I always installed the razberry z-way-server. After a reboot the controller went offline.

But without the z-way-server I cannot access the razberry directly.

Now I removed the z-way-server from autostart. So I can start and access the razberry on port 8083 whenever I need to but
in normal use it is off and the z-way-server is green in OH2 :blush: o)