Author Topic: Vera Concierge running on NAS Synology  (Read 960 times)

Offline gonzo41

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Vera Concierge running on NAS Synology
« on: April 08, 2018, 12:41:42 pm »
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.
   
Code: [Select]
mkdir /volume1/Disque_Interne/veraconcierge
4 - Go to the directory you create and upload the application
   
Code: [Select]
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
   
Code: [Select]
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
   
Code: [Select]
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: [Select]
#!/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
   
   You have to change :
      - The APPPATH value to the path of the directory you create at step 3,
      - the JAVADIR value to the full Path for java.exe
      - the SERVERIP value to the internal IP address of your NAS (like 192.168.1.27)
      
8 - Make the file executable
   
Code: [Select]
chmod +x  ConciergeServer.sh   
   You can now test the application :
   
   
Code: [Select]
sudo ./ConciergeServer.sh start   
   Wait about 1 min and you should be able to access to the interface on your web browser at https://XX.XX.XX.XX:8989 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 :
       
Code: [Select]
sudo ./ConciergeServer.sh start
   To stop the application :
   
Code: [Select]
sudo ./ConciergeServer.sh stop   
   To restart the application :
   
Code: [Select]
sudo ./ConciergeServer.sh restart   
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

Code: [Select]
#!/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.
   
« Last Edit: April 08, 2018, 02:05:57 pm by gonzo41 »

Offline vicw

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera Concierge running on NAS Synology
« Reply #1 on: May 03, 2018, 03:13:58 pm »
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.
VeraEdge FW 1.7.3830

Offline 4Crawler

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +2/-0
Re: Vera Concierge running on NAS Synology
« Reply #2 on: May 06, 2018, 02:24:08 pm »
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.

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: Vera Concierge running on NAS Synology
« Reply #3 on: May 06, 2018, 07:05:05 pm »
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.

Offline 4Crawler

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +2/-0
Re: Vera Concierge running on NAS Synology
« Reply #4 on: May 07, 2018, 02:10:14 am »
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.

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:

Code: [Select]
    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. 

Offline 4Crawler

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +2/-0
Re: Vera Concierge running on NAS Synology
« Reply #5 on: May 07, 2018, 01:52:48 pm »
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.

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.

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

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1180
  • Karma: +24/-13
Re: Vera Concierge running on NAS Synology
« Reply #6 on: May 07, 2018, 02:17:27 pm »
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"...
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

Offline vicw

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera Concierge running on NAS Synology
« Reply #7 on: May 28, 2018, 02:15:44 pm »
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.
VeraEdge FW 1.7.3830

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10070
  • Karma: +761/-141
Re: Vera Concierge running on NAS Synology
« Reply #8 on: May 29, 2018, 08:53:39 am »
You have to do the certificate install again ... when you change the physical machine where the Concierge Server is running.

Offline vicw

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera Concierge running on NAS Synology
« Reply #9 on: May 29, 2018, 11:32:37 am »
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.
VeraEdge FW 1.7.3830

Offline vicw

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera Concierge running on NAS Synology
« Reply #10 on: May 29, 2018, 07:46:34 pm »
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.
VeraEdge FW 1.7.3830

Offline vicw

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera Concierge running on NAS Synology
« Reply #11 on: June 29, 2018, 07:28:01 pm »
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.
VeraEdge FW 1.7.3830

Offline 4Crawler

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +2/-0
Re: Vera Concierge running on NAS Synology
« Reply #12 on: July 08, 2018, 11:18:00 pm »
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.

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.

Offline vicw

  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
Re: Vera Concierge running on NAS Synology
« Reply #13 on: July 08, 2018, 11:23:16 pm »
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.

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.
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

VeraEdge FW 1.7.3830