OpenHAB on Raspberry Pi 3 with Razberry Z-wave - comm problem

Tags: #<Tag:0x00007efec1fca4d8> #<Tag:0x00007efec1fca3c0> #<Tag:0x00007efec1fca2d0>

My new Pi 3 newly installed with Raspbian-Jessie, OpenHAB and, after the problem with the Aeon Z-wave stick on my Synology NAS, a Razberry z-wave board.

The problem seems to be that the controller node (Razberry) is unreachable or so. This is in the openhab.log:


016-03-19 22:30:03.838 [INFO ] [.b.k8055.internal.k8055Binding] - No config supplied - using default values
2016-03-19 22:30:04.246 [INFO ] [.z.internal.ZWaveActiveBinding] - Update config, port = /dev/ttyAMA0
2016-03-19 22:30:04.247 [INFO ] [.z.internal.ZWaveActiveBinding] - Update config, healtime = 4
2016-03-19 22:30:04.249 [INFO ] [.z.internal.ZWaveActiveBinding] - Update config, softReset = false
2016-03-19 22:30:04.250 [INFO ] [.z.internal.ZWaveActiveBinding] - Update config, masterController = true
2016-03-19 22:30:04.253 [INFO ] [.service.AbstractActiveService] - ZWave Refresh Service has been started
2016-03-19 22:30:04.393 [INFO ] [b.z.i.protocol.ZWaveController] - Starting Z-Wave controller
2016-03-19 22:30:04.396 [INFO ] [b.z.i.protocol.ZWaveController] - Z-Wave timeout is set to 5000ms. Soft reset is false.
2016-03-19 22:30:04.399 [INFO ] [b.z.i.protocol.ZWaveController] - Connecting to serial port /dev/ttyAMA0
2016-03-19 22:30:04.430 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started
2016-03-19 22:30:04.477 [INFO ] [g.openhab.model.script.Weather] - Temperature evolved of 0 degrees.
2016-03-19 22:30:04.480 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘Compute humidex’: Cannot cast org.openhab.core.types.UnDefType to org.openhab.core.library.types.DecimalType
2016-03-19 22:30:04.498 [INFO ] [b.z.i.protocol.ZWaveController] - Serial port is initialized
2016-03-19 22:30:04.614 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
2016-03-19 22:30:12.517 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-03-19 22:30:17.519 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-03-19 22:30:35.085 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-19 22:30:44.540 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = GetVersion (0x15), type = Request (0x00), payload =
2016-03-19 22:30:49.543 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-03-19 22:30:54.547 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-03-19 22:30:59.550 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-19 22:31:04.554 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = MemoryGetId (0x20), type = Request (0x00), payload =
2016-03-19 22:31:09.556 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending
message. Requeueing - 2 attempts left!

Does anyone have any suggestions on this?

I’ve tried some cures that are in the forum already, but so far unfortunately no luck yet.

Thanks.

Nb.
I used this installation script: http://www.makeuseof.com/tag/getting-started-openhab-home-automation-raspberry-pi/
After that stopped OpenHAB, installed the Razberry software, stopped and deactivated the z-wave-server service and started OpenHAB.
By the way, also the z-wave-server service could not communicate with the controller.

Mostl likely I am facing the same problems.

I had a working setup on a Raspberry Pi 2 in combination with a RaZberry board. There I installed openHAB 1.8.1 manually by extracting the official installation archives into /opt/openhab. Linux used is Raspbian Jessie.

Now I wanted to switch to a Raspberry Pi 3. I also chose Raspbian Jessie but this time I used the Debian packages for installation which gave with openHAB 1.8.2.

The non-working result looks identical to me:

2016-03-26 14:21:36.535 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.2).
2016-03-26 14:21:39.150 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-03-26 14:21:39.244 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-03-26 14:21:44.242 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-03-26 14:21:49.796 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-03-26 14:21:54.448 [INFO ] [.service.AbstractActiveService] - FritzBox refresh Service has been started
2016-03-26 14:21:54.450 [INFO ] [o.b.f.internal.FritzboxBinding] - Fritzbox conditional deActivate: false
2016-03-26 14:21:54.519 [INFO ] [.z.internal.ZWaveActiveBinding] - Update config, port = /dev/ttyAMA0
2016-03-26 14:21:54.522 [INFO ] [.service.AbstractActiveService] - ZWave Refresh Service has been started
2016-03-26 14:21:54.571 [INFO ] [b.z.i.protocol.ZWaveController] - Starting Z-Wave controller
2016-03-26 14:21:54.574 [INFO ] [b.z.i.protocol.ZWaveController] - Z-Wave timeout is set to 5000ms. Soft reset is false.
2016-03-26 14:21:54.576 [INFO ] [b.z.i.protocol.ZWaveController] - Connecting to serial port /dev/ttyAMA0
2016-03-26 14:21:54.637 [INFO ] [b.z.i.protocol.ZWaveController] - Serial port is initialized
2016-03-26 14:22:02.670 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-03-26 14:22:07.674 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-03-26 14:22:12.678 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-26 14:22:17.685 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = GetVersion (0x15), type = Request (0x00), payload = 
2016-03-26 14:22:22.690 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-03-26 14:22:27.695 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-03-26 14:22:32.703 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-26 14:22:37.708 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = MemoryGetId (0x20), type = Request (0x00), payload = 
2016-03-26 14:22:42.712 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!

Advice would be appreciated. :slight_smile:

Regards,
Mark

I swapped the SD-cards between the Raspberry Pi 2 and 3 and also moved the RaZberry board board back. Now the Z-Wave binding is able to communicate.

2016-03-26 14:40:25.771 [INFO ] [penhab.io.rest.RESTApplication] - Stopped REST API
2016-03-26 14:44:05.271 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.2).
2016-03-26 14:44:10.530 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-03-26 14:44:10.708 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-03-26 14:44:20.697 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-03-26 14:44:26.258 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-03-26 14:44:31.024 [INFO ] [.service.AbstractActiveService] - FritzBox refresh Service has been started
2016-03-26 14:44:31.029 [INFO ] [o.b.f.internal.FritzboxBinding] - Fritzbox conditional deActivate: false
2016-03-26 14:44:31.157 [INFO ] [.z.internal.ZWaveActiveBinding] - Update config, port = /dev/ttyAMA0
2016-03-26 14:44:31.163 [INFO ] [.service.AbstractActiveService] - ZWave Refresh Service has been started
2016-03-26 14:44:31.263 [INFO ] [b.z.i.protocol.ZWaveController] - Starting Z-Wave controller
2016-03-26 14:44:31.265 [INFO ] [b.z.i.protocol.ZWaveController] - Z-Wave timeout is set to 5000ms. Soft reset is false.
2016-03-26 14:44:31.267 [INFO ] [b.z.i.protocol.ZWaveController] - Connecting to serial port /dev/ttyAMA0
2016-03-26 14:44:31.413 [INFO ] [b.z.i.protocol.ZWaveController] - Serial port is initialized
2016-03-26 14:44:34.864 [INFO ] [rialApiGetInitDataMessageClass] - NODE 1: Node found
2016-03-26 14:44:34.866 [INFO ] [rialApiGetInitDataMessageClass] - NODE 2: Node found
2016-03-26 14:44:34.867 [INFO ] [rialApiGetInitDataMessageClass] - NODE 3: Node found
2016-03-26 14:44:34.869 [INFO ] [rialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2016-03-26 14:44:34.871 [INFO ] [rialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2016-03-26 14:44:34.873 [INFO ] [rialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2016-03-26 14:44:34.875 [INFO ] [rialApiGetInitDataMessageClass] - # Nodes = 3
2016-03-26 14:44:34.877 [INFO ] [rialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------

Good news: openHAB and the Z-Wave binding are working.

Bad news: RaZberry seems to be incompatible with Raspberry Pi 3.

What could be the problem of the RaZberry with the Raspberry Pi 3? I thought the specifications of the extension header did not change, did it?

Solution

Raspberry Pi 3 uses a different UART peripheral compared to RPi 2 for the extension header. For details see the blog post below.

There are several options how to get around the problems releated with this change. I choose to use an device tree overlay to map the old UART back to the extension header. It works and I can live with the drawback of loosing Bluetooth. See the following blog post for details.

I tested with a Raspbian Jessie release after 18th March 2016.

More information about the available overlays can be found in the official documentation. Have a look for pi3-miniuart-bt and pi3-disable-bt.

https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

Thanks Mark,

I tried the pre 18th March Scenario as I have a Jessie distribution dated March 15.

This is the result:

2016-03-26 18:26:03.653 [INFO ] [.service.AbstractActiveService] - ZWave Refresh Service has been started
2016-03-26 18:26:03.852 [INFO ] [b.z.i.protocol.ZWaveController] - Starting Z-Wave controller
2016-03-26 18:26:03.853 [INFO ] [b.z.i.protocol.ZWaveController] - Z-Wave timeout is set to 5000ms. Soft reset is false.
2016-03-26 18:26:03.854 [INFO ] [b.z.i.protocol.ZWaveController] - Connecting to serial port /dev/ttyS0
2016-03-26 18:26:03.983 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started
2016-03-26 18:26:05.824 [INFO ] [b.z.i.protocol.ZWaveController] - Serial port is initialized
2016-03-26 18:26:09.433 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
2016-03-26 18:26:11.048 [WARN ] [o.b.w.i.parser.CommonIdHandler] - CommonId not found: CommonIdHandler[provider=YAHOO,id=,icon=]
2016-03-26 18:26:15.565 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-03-26 18:26:20.585 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-03-26 18:26:25.605 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-26 18:26:30.625 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = GetVersion (0x15), type = Request (0x00), payload =
2016-03-26 18:26:35.645 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 2 attempts left!
2016-03-26 18:26:40.665 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 1 attempts left!
2016-03-26 18:26:47.385 [ERROR] [WaveController$ZWaveSendThread] - NODE 255: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-26 18:26:52.405 [WARN ] [WaveController$ZWaveSendThread] - NODE 255: Too many retries. Discarding message: Message: class = MemoryGetId (0x20), type = Request (0x00), payload =

Could it be the baudrate, which is set to 115200, or …?

Checked all actions and re-did it all, I forgot one action, now it’s running OK !

Thanks Mark, great !

Mark,
As I was still having comms problems, I tried some things… Now I’m kindof lost.
I found different solutions and did some changes, now I get the error " Serial Error: Port /dev/ttyS0 does not exist" again.

The problem is that I don’t know which solution to choose from as I don’t know which distribution I’ve got, dont know which port to use etc…

I started with an install from before March, 18th. Today I did a “sudo apt-get dist-upgrade”, do I now have an after March 18th distribution?

I’ve read a new solution was in the distribution to disable bluetooth (http://forum.z-wave.me/viewtopic.php?f=3422&t=22957), I followed that one and undid the Brian Dorey changes. Should the Razberry now be available on ttyAMA0 again or still …S0? Actually it’s on neither.

I wouldn’t want to go for a full new install as we have quite some work in this one (VPN, Samba, mqqt, etc)

What, do you think, would be the way to go?

Thanks

Bought a Raspberry Pi 2, put the Razberry and the SD card in it, undid all Pi 3 specifics and it runs.
Apart from quite some bugs.
I think some of the bugs are:

  • 1.8.2 related (z-wave bug in habmin);
  • some new devices not fully supported yet (zwave.me wall controller 2 and the Fibaro motion detector z-wave-plus);
  • weather binding Yahoo not stable (undefined state, because of: “CommonId not found: CommonIdHandler[provider=YAHOO,id=,icon=]”)

I’m looking forward to a new version which handles these problems.

Thanks

FYI: Also the RPi 3, with the new software (end of March 2016 or so) and overlays is now running with the Razberry. Device is /dev/ttyAMA0.

Just keep on going, one will succeed :slight_smile: