Access Keys:
Skip to content (Access Key - 0)

Installing OpenRemote 2.0 Controller on QNAP NAS

Step 1: Install Java

Note: Java is only available as ready-made installable for the x86-based NAS systems (TS-x39/ x59/ 509/ 809/ 809U-RP/ SS-x39/ x59 Pro+/ x59 ProII/ TS-x79 Series). For ARM-based systems, look at the QNAP Forum

Login to the Administration console and navigate to Application Servers -> QPKG Plugins

Click on the Get QPKG-button, a new window will be opened with all the currently available QPKGs.

Scroll down to Java Runtime Environment, click on it and download the zip-file. Extract the zip-file somewhere locally.

Go back to the Administration console, move to the INSTALLATION-tab on the QPKG Plugins page and upload the previously extracted .qpkg file.

The successful installation can be verified by setting up a SSH connection (using PuTTY or a similar application) to the NAS and running "java".

Step 2: Install OpenRemote

Using the Administrator console or a tool like WinSCP to create a new share folder, for example "openremote".

Download the OpenRemote Controller and extract the files locally.

OpenRemote Controller attempts to listen on port 8080 by default. This is already taken by other QNAP services. The OpenRemote Controller needs to be configured to run on a different port (for example, 8081).

To do so, navigate to the "conf"-folder. Open "server.xml" and search for the following section:

<!-- Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
-->
<Connector executor="HTTP-ThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

Change the port value to 8081 (or any other unused port number) so you will have:

<Connector executor="HTTP-ThreadPool"
port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

Use WinSCP to log on to the server and navigate to the created folder (i.e., "/share/MD0_DATA/openremote/")

Copy all the previously extracted files and folders to the server.

Navigate to the "bin"-folder, right click on "openremote.sh" and choose Properties. Make sure the shell script has execute rights (all the checkboxes underneath the X are checked).

WinSCP has a built-in terminal window, but the openremote shell script cannot be ran from it (it will display an error message that JRE_HOME or JAVA_HOME are not set). The install can be validated by setting up a SSH connection using PuTTY, navigating to the "openremote/bin/"-folder and running

> ./openremote.sh run

You should see the controller starting, after which the controller can be accessed using a web browser at the IP-address or hostname of the NAS and the specified port-number (i.e., http://192.168.1.100:8081/controller/ or http://servername:8081/controller/ )

Step 3: Setting up the Autorun

In order to make sure that the OpenRemote Controller is started every time the NAS is booted, the OpenRemote shell script needs to be added to the autorun script of the NAS . Details on this procedure can be found at the QNAP Wiki.

In WinSCP, browse to "/tmp/config/". There is probably no file or folder there, this is because the config ramblock hasn't been mounted yet. To do this. open the terminal window and execute:

> mount -t ext2 /dev/sdx6 /tmp/config

Note: The exact location of the config ramblock, and therefore the mount-command, might vary per NAS model. The command above is valid for many of the recent models, such as the TS-239 Pro-II+. Refer to the QNAP Wiki for the right command for your NAS model.

Close the terminal and hit the Refresh button. Now, a number of files should be visible.

If "autorun.sh" doesn't exist yet, create a new file with that name, and have it start with the following line:

#!/bin/sh

Add to the end of the file the lines that load Java, set the JAVA_HOME parameter and then start Openremote:

#Start JAVA
/share/MD0_DATA/.qpkg/JRE/jre.sh start

#Export JAVA PATH
export JAVA_HOME=/usr/local/jre

#Start OpenRemote
cd /share/MD0_DATA/openremote/bin
./openremote.sh run &

Save and close the file.

Move up two folders, back to the root.

Open the terminal window and unmount the config ramblock by executing:

> umount /tmp/config

If the "device is busy" error message is returned, disconnect, reconnect and run the command again.
Reboot the NAS by logging into the Administration console, navigating to System Administration -> Power Management and hitting the RESTART-button.

Now the OpenRemote Controller should be up and running. Since the port number has been changed, the auto discovery function in the app will not work, but the server can easily be added manually.

See Also

Added by Administrator , last edit by Freek Uijtdewilligen on Nov 17, 2011 17:14

© 2008-2011 OpenRemote Inc. OpenRemote is a trademark of OpenRemote, Inc.
Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10.3, the Enterprise Wiki.
Free theme builder license