OpenHAB and Synolgy DS 416play

Hello Open HAB Community this is my first posting on a forum, I recently retired and I’m just starting to enjoy it and doing the stuff I like and my project is to set up Home Automation. Here’s where I’m up to at the moment I installed Java 8 and OpenHab on my Synolgy Nas DS 416Play as per openhab tutorials, set a public directory in the shared folder installed Openhab have installed Z-Wave bindings, Purchased - Aeotec Z-Stick Gen5 (ZW090) - UZB - Sigma Designs, Inc.

I can connect via web browser (Firefox) from my HP laptop (Windows 10) to openhab on the NAS Drive, I added the Aeotec Z-Stick Gen5 (ZW090) - UZB – Bindings. Now I have come to a halt as it wants a serial port and I have looked in the NAS centre Info it shows the wave stick listed with:

(VID:0658 – PID:0200 REV 0:00) but how do I find the port number? you guys on here seem to be talking another language have I got to learn some new skills? (At present I have got two power monitoring power outlets – one smart LED bulb and more on order (smart LED and wall dimmer) the ones I have are all up and running via the (smart life APP and Google home) but I would really like to use OpenHAB can anyone help please sorry if I have not given enough technical data.

P.S.I have installed Visual Studio Code (Version 1.29) on my Windows PC do I need this to find my port number? And how?

Thank you in advance Les

Possibly. The unfortunate part with Synology is it isn’t all that commonly used. So there won’t be a lot of people who will be able to help.

The most popular deployment is on Linux with the majority of those being on a RPi using openHABian. I suspect the foreign language part is related to that. Almost everything written, particularly here on the forum, will be done so from this perspective. So the paths and environment variables and such will be for Linux.

I don’t know what Synology runs or how to configure it. IIRC it runs apps like OH in a container or a jail or something like that. You will need to pass that serial device into the container or jail for OH to have access to it.

On pretty much everything except Windows, serial devices appear as a file under /dev. On Linux it is usually /dev/ttyUSBX or /dev/ttyAMX where X is a one up number.

The Documentation for the Synology openHAB package seems to indicate that synology follows this convention as well. Hopefully that link will get you up and running.

Have a look at what I posted for my setup.

Rich Koshak, and Neil

Thank you for both responding to my post, I think I’m dumb or you think I know more than I do, its seems like I have to do some programming? The trouble is I’m a bit old in the tooth and need to be spoon fed a little with instructions, as to what I use to create and save the text/script files? or have i got to edit an existing one? and where do I find them and where they go Path/Dir/ folder on my nas?

Sorry to be a pain just like to say as a point, I did notice on the openhab app in my nas when you click the app icon it says coming soon, if so do I just wait unit Synology give us a fully working link to openhab? which will give us the ports?
Regards Les

Not programming but you will have to get deep into the details of the Synology configuration. I’ve never even seen a Synology in the flesh so I can do no more than point you at some docs.

I would strongly suggest investing in a Raspberry Pi 3 and using openHABian. Almost all of these sorts of configuration things are done for you and you will be running on a platform that will have more users on this forum who can help.

Unfortunately, I’ve no idea. Synology and Qnap NAS systems are weird in how they work. There are really really good reasons for this weirdness, but it means that only people who are running OH on Synology will be able to help, and they make up a small minority of OH users.

You will still have to do whatever is necessary to expose or make available the file that represents the USB device (/dev/ttyUSB0 probably) to the openHAB app. The problem isn’t on openHAB, it is on the Synology configuration.

Here’s what I use on my Synology DS716 for the zWave Stick.

# UDEV rules directly echoed to the target file
echo 'ACTION=="add", KERNEL=="ttyACM[0-9]*", MODE="0660", OWNER="openhab", GROUP="dialout"' >> /lib/udev/rules.d/99-aeon-z-stick.rules

chmod 755 /lib/udev/rules.d/99-aeon-z-stick.rules

# Start up script directly echoed to the target file
echo -e '#!/bin/sh\nstart_modules(){\n\techo ls -l /dev/tty[AU]* >> /volume1/public/zwavelog.txt\n\tchown -R root.uucp /run/lock\n\tchmod -R g+w /run/lock\n\tchown -R root.uucp /var/lock\n\tchmod -R g+w /var/lock\n}\nstop_modules(){\n\techo "do nothing"\n}\ncase "$1" in\n\tstart)\n\t\tstart_modules\n\t;;\n\tstop)\n\t\tstop_modules\n\t;;\n\t*)\n\t\techo "usage: $0 { start | stop }" >&2\n\texit 1\n\t;;\nesac\nexit 0' >> /usr/local/etc/rc.d/

chmod 755 /usr/local/etc/rc.d/

# Set owner of device once
chown openhab /dev/ttyACM0


Now if I can get the “foundation members” to create a OH2.4 build for the Synologies (hint, hint).

Best, Jay

Hello Jay

Thank you for your info, I assume this is machine code of some kind? (Java script?) wild guess on my part unfortunately I’m not a programmer just a retired man and want to keep the old grey matter ticking over, that’s why the home automation project here (use to work as a BMS engineer but this was modular construction of software using the Trend based system if you have heard of it.)

If you could give me some pointers as how to construct your text and with what? where I find it and how I gain access on the NAS and/or where it goes when constructed, looking from myself as a dummy with control code assume the # lines are for info, the Sian colours are execution commands, for the lines of script code in black, and red are setup parameters.

I have the Visual Studio Code programme on my windows PC never used it BTW but it looks like some sort of code editor another guess by me, (unless there is one in Openhab?) any help in this area would be appreciated if I’m asking too much I apologise now.

Best regards Les

You will need to SSH or Telnet into your NAS then run those lines of code. This is operating system code; not programming code.

Best, Jay

Hello Jay

Thank you for the response at present this is where I got to opened up CMD prompt logged on to my NAS using ssh Admin@ and used my password it then goes to this line in
green - admin@DS-416-Play:~$
and I used pwd and it says I’m here - /var/services/homes/admin.
Do I now type in the text of operation code here that you kindly sent me as it is? or have I got to go to another Dir? and when I type it in will it automaticaly save and run as I exit ssh mode? or do I have to something to make it work, sorry to be a pain but I’m still very nervious when I make changes to any thing to do PCs.

Regards Les

It doesn’t matter what directory you are in. Those commands will work from any directory.

The commands make changes to configuration files so they will persist after you log out.

In fact you will not have to log out because the last line reboots the machine.