Page 1 of 1

[HowTo] Install OpenRemote on Raspberry Pi

Posted: 08 Feb 2015 13:10
by pz1
DRAFT DRAFT --- Tested on Raspberry Pi 2 --- DRAFT DRAFT
Since the Howto Install instruction from OpenRemote has become a bit messy over time, I here summarised the nessential steps for Raspberry/Z-Way installations. This description is derived from the official OpenRemote documentation. Comments on this instruction are welcome.
Intended use is with Z-Way. It is supposed to run on Rasbian released on 2015-01-31 or later. That distribution comes with Java 8 preinstalled. So that part of the official documentation can be skipped.

CAUTION: At the moment of this writing OpenRemote Controllers are still compiled with JAVA 6. As a consequence the Drools rules engine may not always work properly with the pre-installed Java 8.

So from the command line do the following:

Code: Select all

$ export JAVA_HOME=/usr
Download the OpenRemote controller to your home folder on Pi. Unzip it to /opt; next rename folder

Code: Select all

sudo unzip -d /opt
sudo mv /opt/OpenRemote-Controller-2.1.0 /opt/openremote
From the command line, execute the following instructions:

Code: Select all

$ cd /opt/openremote/bin
Make sure the file is executable, if not already:

Code: Select all

$ sudo chmod +x
Make a complete service setup of OpenRemote Controller with proper start/stop/restart functionality.
Create with editor nano a new script, and copy the code below to that file.

Code: Select all

$ sudo nano /etc/init.d/

Code: Select all

# Provides:          openremote
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.

cd /opt/openremote/bin

case "$1" in

        echo "Stopping OpenRemote Controller..."
        /opt/openremote/bin/ stop > /dev/null 2>&1 &

        # start OpenRemote in background mode
        /opt/openremote/bin/ start > /dev/null 2>&1 &
        echo "OpenRemote Controller started..."

        $0 stop
        sleep 5
        $0 start
        echo "usage: $0 { start | stop | restart}" >&2
        exit 1

Make sure the script you saved above has its executable bit set:

Code: Select all

$ sudo chmod +x /etc/init.d/
The following command makes the script run at startup:

Code: Select all

$ sudo update-rc.d defaults
OpenRemote should be up and running after the next reboot. Logs are in /opt/openremote/logs
Be reminded that you must first get a (free) account for the
  • online designer
tool. Do make a design there.
Synchronise that with your installation http://IP_OF_YOUR_RASPBERRY:8080/controller/.
View the result on a web console with http://IP_OF_YOUR_RASPBERRY:8080/controller/.

Check the OpenRemote site for how to display on Androids and/or iThings.

Any questions about OpenRemote should go to their forums!

Re: [HowTo] Install OpenRemote on Raspberry Pi

Posted: 20 Feb 2015 00:30
by pierre2302
I have always used the 1.8.0 version of java, the Drools rules engine works correctly with OpenRemote

I use it for over a year on this version being Raspbian and it seems that version 1.6.0 is not compatible with this system

By cons I noticed, for example, that I had to use Event rather than CustomState

Re: [HowTo] Install OpenRemote on Raspberry Pi

Posted: 20 Feb 2015 10:20
by pz1
Thanks for the update. I recently added the remark about Java 8, because of a recent message on the OpenRemote site that there were problems with it. I am going to test on the new Pi 2 it once I have new firmware for my UZB1
I adapted the recipe text.