Vera Concierge running on NAS Synology

Hi,

I was trying to install the Vera Concierge Server on my NAS Synology and it was not very easy for me.

I will try to explain (sorry for my poor english) what i have done for those who want to do the same.

The install was done on a NAS Synology DS216play with DSM 6.1.6-15266

1 - Install the java package from the package Center : JAVA8 ver 8.0.151-0014 and reboot the NAS

2- SSH the NAS with Putty

3 - Create a directory to put the application.
mkdir /volume1/Disque_Interne/veraconcierge

4 - Go to the directory you create and upload the application
cd /volume1/Disque_Interne/veraconcierge wget https://storage.googleapis.com/veraconcierge.appspot.com/ConciergeServerVersions/ConciergeServer.jar

5 - Execute the application once, so it will create all the files in the directory
java -jar ConciergeServer.jar

These files would be created : conciergeserver ConciergeServer.jar install.sh uninstall.sh update.sh

6 - Delete conciergeserver, install.sh, uninstall.sh and update.sh because it’s not working on Synology OS and we will create new files
rm install.sh uninstall.sh update.sh conciergeserver

If you launch the application as indicated : java -jar ConciergeServer.jar service

The server will listen to the 127.0.0.1 or localhost address and no way for me to access to the web page from my computer.

Fortunatly, the developper add a parametrer you can specify to change the default server address : -ip

The command line should be java -jar ConciergeServer.jar service -ip XX.XX.XX.XX (XX.XX.XX.XX is the internal IP address of your NAS (like 192.168.1.27))

7 - Create the file ConciergeServer.sh and copy this :

[code]#!/bin/sh
PATH=/opt/bin:/opt/sbin:/usr/sbin:/usr/bin:/sbin:/bin
APPPATH=/volume1/Disque_Interne/veraconcierge
JAVADIR=/var/packages/Java8/target/j2sdk-image/jre/bin/java
SERVERIP=XX.XX.XX.XX
DESC=“VeraConcierge Server”
PIDFILE=/var/run/VeraConcierge.pid

set -e
start() {
        if [ -f $PIDFILE ]; then
                echo "Warning : $PIDFILE still present. Unclean shutdown ?"
                kill -s 9 `cat $PIDFILE` 2>/dev/null
                rm -f $PIDFILE 2>/dev/null
        fi
        echo -n "Starting $DESC... "
        $JAVADIR -jar $APPPATH/ConciergeServer.jar service -ip $SERVERIP -delay 60&
		PID=$!
		echo $PID > $PIDFILE
        echo "done"
}
stop() {
        echo -n "Stopping $DESC... "
        if [ -f $PIDFILE ]; then
                kill -9 `cat $PIDFILE` 2>/dev/null
                rm -f $PIDFILE 2>/dev/null
        fi
        echo "done"
}
case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                sleep 1
                start
                ;;
        *)
                echo "Usage: $0 (start|stop|restart)"
                exit 1
                ;;
esac[/code]

You have to change :
	- The [b]APPPATH [/b]value to the path of the directory you create at step 3, 
	- the [b]JAVADIR [/b]value to the full Path for java.exe
	- the [b]SERVERIP [/b]value to the internal IP address of your NAS (like 192.168.1.27)

8 - Make the file executable
chmod +x ConciergeServer.sh

You can now test the application :

[code]sudo ./ConciergeServer.sh start[/code]

[b]Wait about 1 min [/b]and you should be able to access to the interface on your web browser at [b][i]https://XX.XX.XX.XX:8989[/i][/b] where XX.XX.XX.XX is the internal IP address of your NAS (like 192.168.1.27)

How to use
To start the application :
sudo ./ConciergeServer.sh start

[i]To stop the application : [/i]
[code]sudo ./ConciergeServer.sh stop[/code]

[i]To restart the application :[/i]
[code]sudo ./ConciergeServer.sh restart[/code]

9 - Create now a task in the tasks scheduler of the Synology so the application will start with the NAS :
Create a triggered task, user-defined task.
task:Veraconcierge or whatever you want
user:root
event:boot-up

to the user-defined script , copy-paste :
cd /volume1/Disque_Interne/veraconcierge/
./ConciergeServer.sh start

Change the directory to the one you created at step 3

10 - For future update, create the file update.sh and copy this

#!/bin/sh ./ConciergeServer.sh stop mv ConciergeServer.jar old.jar mv new.jar ConciergeServer.jar ./ConciergeServer.sh start

Now the vera concierge is running on my synology…i’ts time to learn how to use it ;D

Many thanks to RichardTSchaefer for this app.

You had provided a very good, detailed set of instructions. I wish I had found it sooner, as I had given up hope that Vera Concierge could be run on the Synology NAS. I set up a Raspberry Pi as an alternative, and have been using it successfully with Google Home, but I might try this, using your instructions.

I’m curious to hear if you have had success using the Synology NAS to work with Google Home since you completed the installation.

Great post, worked fairly well. One key step is to make sure and run the Java8 executable at that first time, I also have Java7 installed and that seems to be the one that runs from the $PATH.

Did you have to do anything special with the firewall settings for the two ports, 8989 and 8998?
I installed this on my Synology DS1513+ and it seems to be working. I have both ports allowed in the Security->Firewall, both source and destination and I still get the error message about blocked ports in the Connectivity test.

If you know of a way for me to uniquely identify this is running on that platform … I can fold the changes into the standard installation procedure.

[quote=“4Crawler, post:3, topic:198955”]Great post, worked fairly well. One key step is to make sure and run the Java8 executable at that first time, I also have Java7 installed and that seems to be the one that runs from the $PATH.

Did you have to do anything special with the firewall settings for the two ports, 8989 and 8998?
I installed this on my Synology DS1513+ and it seems to be working. I have both ports allowed in the Security->Firewall, both source and destination and I still get the error message about blocked ports in the Connectivity test.[/quote]

With Richard’s help, was able to identify the issue. Turns out an executable named “keytool” is required and it’s in the Java8 binary directory. That directory needs to be added to the path in the ConciergeServer.sh shell script, something like this:

PATH=/opt/bin:/opt/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/var/packages/Java8/target/j2sdk-image/bin

The keytool is what generates the https certificate and without that, it seems the Vera - Server communication isn’t working. I did have to add a firewall rule for the two ports. All is now working, although it took a few tries through Google Home to get the Vera Concierge service and what not all linked up.

The Synology is a perfect host for this as it’s always on, maybe with the hard drives powered down at night.

Here’s the uname output (DiskStation is the machine name on my network), but the “synology_” string seems to be unique. I imagine “cedarview” is the name of the Synology build tree. DS1513+ is the model of my NAS.

uname -a Linux DiskStation 3.10.102 #15266 SMP Mon Mar 26 15:08:22 CST 2018 x86_64 GNU/Linux synology_cedarview_1513+

Just a suggestion- create a docker image and run that in the Synology client for Docker. That is how some of us Synology users have been running the Echo Bridge for several years.

I actually see a Docker repository called “jrowland/vera-concierge”…

Whew! I successfully installed Concierge Server on my DS214, and it’s running properly with Google Home. I don’t have the skill sets to have done it without detailed instructions, so I much appreciate the detailed steps that Gonzo41 provided, and the fixes from 4Crawler, with the support of RichardTShaefer. Thank you all.

The installation went pretty smoothly. I got stuck trying to figure out how to copy/paste from windows to the Putty terminal, so I ended up using the Synology Text Editor for that task. Getting it running took me quite a while, but I finally managed it today. I have now installed and run it on Windows, Raspberry Pi and finally the Synology NAS, which will be my ongoing home for the server.

The only disappointment I have is that I’m again confronted with the browsers gagging on the certificate, and having to override them to allow me access to the server. I was hopeful that the certificate would be accepted as legit. I added the PATH as 4Crawler suggested, but still have that problem.

You have to do the certificate install again … when you change the physical machine where the Concierge Server is running.

Thanks, Richard

By "do the certificate install again’, do you mean that I need to do something with the existing certificate in Concierge Server folder of the Synology NAS to make it legitimate, or do I need to make Windows to accept the certificate as if it is legitimate for that device?

If the answer is the former, I need a bit of direction on how to do that.

Assuming that I couldn’t do anything with the actual certificate in the Server, I went ahead and added the Concierge Server certificate to the Trusted Root Certification Authorities on my laptop, using the instructions in: http://www.thewindowsclub.com/manage-trusted-root-certificates-windows.

The browser is happy now - I just need to remember the circumstances if I try to access the server from a different system.

If there is actually a way to make the certificate itself directly valid to remote access browsers without the action I took, I welcome any comments on that.

It’s hard for me to believe that there is no activity on this thread for a full month. I am very happy to have completed a full month successful operation using the Synology NAS as my Server for Vera Concierge with Google Home, with absolutely no issues.

I am very grateful for the contributions of gonzo41, RichardTSchaefer and 4Crawler to make it possible for us other users. I would encourage any non-coder owners of a Synology NAS, a Vera controller and Google Home like me to take advantage of the opportunity provided here for a reliable 24/7 server, at no additional cost.

[quote=“vicw, post:12, topic:198955”]It’s hard for me to believe that there is no activity on this thread for a full month. I am very happy to have completed a full month successful operation using the Synology NAS as my Server for Vera Concierge with Google Home, with absolutely no issues.

I am very grateful for the contributions of gonzo41, RichardTSchaefer and 4Crawler to make it possible for us other users. I would encourage any non-coder owners of a Synology NAS, a Vera controller and Google Home like me to take advantage of the opportunity provided here for a reliable 24/7 server, at no additional cost.[/quote]

Mine has been working fine as well. The NAS is up all the time, so a perfect system to host this on. I’m planning on making a YouTube video on the install.

[quote=“4Crawler”][quote=“vicw, post:12, topic:198955”]It’s hard for me to believe that there is no activity on this thread for a full month. I am very happy to have completed a full month successful operation using the Synology NAS as my Server for Vera Concierge with Google Home, with absolutely no issues.

I am very grateful for the contributions of gonzo41, RichardTSchaefer and 4Crawler to make it possible for us other users. I would encourage any non-coder owners of a Synology NAS, a Vera controller and Google Home like me to take advantage of the opportunity provided here for a reliable 24/7 server, at no additional cost.[/quote]

Mine has been working fine as well. The NAS is up all the time, so a perfect system to host this on. I’m planning on making a YouTube video on the install.[/quote]Good idea. The written procedure, plus the added comments and tweaks are a bit intimidating for the non-coder.

I tormented about it for quite a while before I just bit the bullet and launched into installing it.

Sent from my Pixel 2 XL using Tapatalk

This morning, after about 2 months of 24/7 service, I experienced my first, hard loss of connectivity with Vera Concierge on the Synology NAS. It was working when I used a voice command about 11:40PM last night, but failed when I tried this morning, about 11:30AM. When I tried the Connectivity test it failed in a way that I hadn’t experienced before, responding with “Can’t talk to your Local Concierge Server! Check the connection of you Local Concierge Server”, which pointed to the local server as the issue.

I did try the “Force Discovery” button, but no change in behavior afterward.

After I forced the Synology NAS to reboot, normal operation was reinstated. I have the server set to restart every morning at 3 AM. and it’s set to automatically update. I checked the installed version to be at 2.031. I suspect that the failure today may correlate to an update installation, but I can’t tell when it was updated on my server, and I don’t know if there is a record of firmware updates to check against.

Hopefully, this will be a one time failure, but I’ll be monitoring carefully in the next few days.

There is an update script in the installation.
You NAS port may not have addressed this …
When a software update (like last night) happens … it must shutdown the service … replace the old Jar File with the new Jar File … and restart the service.

[quote=“RichardTSchaefer, post:16, topic:198955”]There is an update script in the installation.
You NAS port may not have addressed this …
When a software update (like last night) happens … it must shutdown the service … replace the old Jar File with the new Jar File … and restart the service.[/quote]
Thanks, Richard Yes, I have the update.sh file in the folder

Here are the contents, according to the Editor:

#!/bin/sh
./ConciergeServer.sh stop
mv ConciergeServer.jar old.jar
mv new.jar ConciergeServer.jar
./ConciergeServer.sh start

Is version 2.031 the new version, as of yesterday?

The timestamp on the <ConciergeServer.jar> file is 07/27/18 3:00 AM, so it looks to me that the new version (assuming 2.031 is the new one) was probably installed this morning, but that <ConciergeServer.sh start> didn’t actually start up, for some reason that I don’t understand.

UPDATE: I just discovered Richard’s postings of version updates, at the top of this subject, so I now know that 2.031 is the new version. Thanks Richard, for providing that info on an ongoing basis. Sorry I didn’t see it sooner. Now I just need to resolve the question of why the program didn’t startup after the update.

[quote=“wilme2, post:7, topic:198955”]Just a suggestion- create a docker image and run that in the Synology client for Docker. That is how some of us Synology users have been running the Echo Bridge for several years.

I actually see a Docker repository called “jrowland/vera-concierge”…[/quote]

Synology has limited Docker availability in the package manager to only some select models. Unfortunately i was not able to install it on my Nas, that why i looked for another solution.

Thanks to all for the guides, stumbled my way through!

Cheers

Salut Gonzo41, tu peux me le faire en Fran?ais stp
merci d’avance
Cordialement
Manu