Use raspberry z-wave shield with openHAB on diskstation

Hello,

i use raspberry with z-wave shield for fhem.
Now i want to switch to openHAB on a diskstation.

I use the newest Version of openHAB, the z-way binding and the z-wave binding.
The z-wave binding doesnt find anything.
The z-way binding find my raspberry, but i cant log in.
What is my mistake? Another Port? Another username or Password?
I use “pi” and “raspberry”.

Thanks for help

Carsten

Are you running a discovery as described in the Z-way binding’s readme?

http://docs.openhab.org/addons/bindings/zway/readme.html

If it is not finding it, make sure it isn’t being blocked by a firewall.

As documented in the ZWave binding’s readme, it can only work with locally hosted controllers.

Yes, i think i find something. But the Status is offline, check Password or username.
I tried the z-way binding with ip for the raspberry at the Network, and the z-wave binding with the local z-wave usb-stick. Both doesnt work.

For the zwave dongle locally, you need to make sure to follow the docs and:

Before the binding can be used, a serial adapter must be added. This needs to be done manually. Select Serial ZStick, and enter the serial port.

But what isn’t included in the docs is that if you did an apt-get or yum install, you need to give the openhab users permission to read/write /dev/ttyUSB0 (or what ever device the dongle appears as). This is usually done by adding the openhab user to the dialout group.

Finally, in general, statements like “Both doesnt work” rarely provide enough information for us to actually help you solve your problem.

In problems like these perhaps the most important thing to do is post your relevant logs, most especially errors in your logs.

I’m not sure if I understand it.
Select Serial ZStick, and enter the serial port. Means I have to plug the stick into the USB Port?
The Stick is in the port and the blue light is on.

I added a new group on my NAS with the name dialout and added the user openhab2

The status of my z-wave binding:
Status: OFFLINE - COMMUNICATION_ERROR zwave.thingstate.serial_notfound

The status of my z-way binding:
Status: OFFLINE - COMMUNICATION_ERROR Authentication error. Please check username and password

How can I get the log you want to see?

dialout is the name of the group that has permission to read/write to the /dev/tty* devices. It is a system group and is there by default. You do not create this group yourself.

Your NAS may use a different group. Do an ls -l /dev/tty* and see what the permissions are.

I’m not familiar with diskstations.

What OS does it run?
How did you install OH?
When you say “newest version of OH” do you mean 2.2 SNAPSHOT Build XYZ or 2.1 Release?

When you tried the Zway binding, the username and password is almost certainly not “pi” and “raspberry” and is instead some username and password configured by the Zway service itself. If you didn’t set it to anything you will need to look into the ZWay docs to find the defaults.

You need to create a new Thing in PaperUI and configure it to use the /dev/tty* or com port or where ever the USB dongle shows up when you plug it in. You appear to have created a Thing. Now you just need to configure that thing with the right path to the device it shows up as on your system and make sure the openhab user has permission to read/write to that device.

I use a synolgy NAS with DSM 6.1.4-15217
I install OH as app in my NAS, the name is openHAB2 in version 2.1.0.008

My z-wave binding still doesnt find my stick.

Anyway, my z-way binding doesnt work too. I dont have any documents from the z-wave controller on my raspberry for passwords. I dont know if the openhab2 app on a synology can work with a z-wave board on a raspberry by network. Does anyone use this system too?

I have nearly the same situation. Aeon Laps Z-Wave stick worked fine on Pi 3.Now on my new DS916 I cannot find the stick. Already tried different USB Ports. Via putty I can see, that it has always the same name. I am afraid it has something to do with missing rights for the openhab-user as mentioned above from Rich Koshak.
ls -l /dev/tty
gives me the follwowing:
crw-rw-rw- 1 root root 5, 0 Nov 10 15:08 /dev/tty
but I do not know, wheter this is ok.
How can I add the openhab-user to the dialout group? In the diskstation manager there is no such group.

In this case everyone can read and write to the device so you don’t need to add the user to a group. However, /dev/tty doesn’t sound right for the device.

Usually it is /dev/try[something] where [something] is USB0 or AMA0 or the like.

You mean this:
admin@DS916:~$ ls -l /dev/ttyACM0
crw------- 1 root root 166, 0 Nov 13 09:48 /dev/ttyACM0
?
Has anyone successfully set up a z-wave stick on a synology a NAS?

Yes, /dev/ttyACM0 looks more like the actual device. You can verify that by unplugging the dongle and see if that disappears.

Unfortunately, if that is indeed the device you will have to run OH as root or figure out how to modify the permissions on the device because the current permissions only allow root read/write access.

Any news or solutions?

Hello,

unfortunaly I dont think I can run openhab with zwave on a synology NAS.

Now i uninstalled fhem and installed openhabian with openhab2 on my raspberry with razberry board.

But my problem is the same, my pioneer binding work, but the zwave binding only repeat OFFLINE - COMMUNICATION_ERROR zwave.thingstate.serial_notfound

I try the razberry board with /dev/ttyAMA0
and the UZB stick with /dev/ttyUSB0
as shown in different manuals…but it doesnt work.

2017-12-10 20:06:57.188 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyAMA0’

==> /var/log/openhab2/events.log <==

2017-12-10 20:06:57.189 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:76bb8524’ changed from OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound to OFFLINE (BRIDGE_OFFLINE): Controller is offline

2017-12-10 20:06:57.198 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:76bb8524’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound

2017-12-10 20:12:43.065 [ExtensionEvent ] - Extension ‘package-expert’ has been installed.

==> /var/log/openhab2/openhab.log <==

2017-12-10 20:12:47.465 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled ‘openhab-package-standard’

==> /var/log/openhab2/events.log <==

2017-12-10 20:12:47.468 [ExtensionEvent ] - Extension ‘package-standard’ has been uninstalled.

==> /var/log/openhab2/openhab.log <==

2017-12-10 20:21:37.095 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin

==> /var/log/openhab2/events.log <==

2017-12-10 20:21:37.127 [ExtensionEvent ] - Extension ‘ui-habmin’ has been installed.

==> /var/log/openhab2/openhab.log <==

2017-12-10 20:22:49.668 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2017-12-10 20:22:49.670 [ThingUpdatedEvent ] - Thing ‘zwave:serial_zstick:0a879a49’ has been updated.

==> /var/log/openhab2/openhab.log <==

2017-12-10 20:22:49.670 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyUSB1’

==> /var/log/openhab2/events.log <==

2017-12-10 20:22:49.677 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0a879a49’ changed from OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound to OFFLINE (BRIDGE_OFFLINE): Controller is offline

2017-12-10 20:22:49.683 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0a879a49’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound

==> /var/log/openhab2/openhab.log <==

2017-12-10 20:22:57.254 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2017-12-10 20:22:57.256 [ThingUpdatedEvent ] - Thing ‘zwave:serial_zstick:0a879a49’ has been updated.

==> /var/log/openhab2/openhab.log <==

2017-12-10 20:22:57.257 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyUSB0’

==> /var/log/openhab2/events.log <==

2017-12-10 20:22:57.263 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0a879a49’ changed from OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound to OFFLINE (BRIDGE_OFFLINE): Controller is offline

2017-12-10 20:22:57.268 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:0a879a49’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): zwave.thingstate.serial_notfound

I’m pretty sure people do so, but I don’t so can’t really say for sure or help much.

Have you actually done anything to see what device it is showing up on?

Unplug the device, list the contents of /dev, plug the device in and list the contents of /dev. The new tty that shows up will be the device.

Furthermore, you need to give the openhab user permission to read/write the device, often by adding the openhab user to the dialout or tty group.

Thank you for your reply.

I adding openhab to dialout and tty.

The user openhab' is already a member ofdialout’.
[20:17:15] openhabian@openHABianPi:~$ sudo adduser openhab tty
The user openhab' is already a member oftty’.

I have a problem with the search with the /dev:

[20:14:00] openhabian@openHABianPi:~$ 1s-1/dev*
-bash: 1s-1/dev*: No such file or directory
[20:14:10] openhabian@openHABianPi:~$ 1s-1/dev/tty*
-bash: 1s-1/dev/tty*: No such file or directory

what do I wrong?

might be a typo, guess you wanted to type
ls -l /dev

Thank you, now I can check the devices

So, I found 2 less rows when unplugging the usb and the board:

crw-rw---- 1 root dialout 166, 0 Dec 13 19:57 ttyACM0

drwxr-xr-x 4 root root 80 Dec 13 19:57 serial

Plug the board in and restart, no changes in the /dev : no board found?
Plug the usb in and restart, the 2 lost rows are back : I found the USB on the adress: ttyACM0?

Now I used this adress in openhab, and the stick is online!!! :astonished:

Thank you so much rlkoshak and hmerk

Why I cant identify my board?

I think I found the problem with the board:
On raspberry 3 the bluetooth module block the pins from the board.
If someone like to use the board, first disable the bluetooth module.

After a long time, I now move on with setting up everything on the synology 916. Today I successfully started the AeonLabs Z-Wave stick on my NAS.
the months before I made some experiences running OH2 on a Intel NUC.
I was able to solve my issue on the NAS with the Z-Wave stick because of this:

  • Solve the “ Serial Error: Port /dev/ttyACM0 does not exist ” Z-Wave binding issue with ssh’ing:
sudo chmod 777 /dev/ttyACM0

:slight_smile: