[HowTo] Install OpenRemote on Raspberry Pi

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Post Reply
Posts: 2053
Joined: 08 Apr 2012 13:44

[HowTo] Install OpenRemote on Raspberry Pi

Post by pz1 » 08 Feb 2015 13:10

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 OpenRemote-Controller-2.1.0.zip -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 openremote.sh is executable, if not already:

Code: Select all

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

Code: Select all

$ sudo nano /etc/init.d/openremote.sh

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/openremote.sh stop > /dev/null 2>&1 &

        # start OpenRemote in background mode
        /opt/openremote/bin/openremote.sh 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/openremote.sh
The following command makes the script run at startup:

Code: Select all

$ sudo update-rc.d openremote.sh 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!
Since 29-12-2016 I am no longer a moderator for this forum

Posts: 121
Joined: 15 Oct 2013 19:04

Re: [HowTo] Install OpenRemote on Raspberry Pi

Post by pierre2302 » 20 Feb 2015 00:30

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
" Raspi 2 (RaZberry) / Raspi B (Razberry) " With OpenRemote Free 2.2.0_TTS-Email-Serial and Z-Way

Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [HowTo] Install OpenRemote on Raspberry Pi

Post by pz1 » 20 Feb 2015 10:20

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.

Post Reply