Install Java8:
sudo apt-get install oracle-java8-jdk
Select versie:
sudo update alternatives --config java
Download the Binary tar.gz version the maven website. Pick the latest version.
wget
http://www.mirrorservice.org/sites/ftp. ... bin.tar.gz
Extract the archive to:
cd /opt
sudo tar -xzvf /home/pi/apache-maven-3.2.5-bin.tar.gz
Tell you shell where to find maven. We’ll do this in the system profile settings so it is available to all users.
sudoedit /etc/profile.d/maven.sh
and enter
export M2_HOME=/opt/apache-maven-3.2.5
export PATH=$PATH:$M2_HOME/bin
Quit and save from the editor.
Log out and back into the Raspberry Pi so the profile script takes effect and there it is. You can test that it is working with
mvn -version
and you should see something like:
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /opt/apache-maven-3.2.5
Java version: 1.8.0, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.12.26-rt40+", arch: "arm", family: "unix"
Basic script setup to run the bridge on a pi.
Create the directory and make sure that ha-bridge-2.0.6.jar is in your /home/pi/habridge directory.
pi@raspberrypi:~ $ mkdir habridge
pi@raspberrypi:~ $ cd habridge
pi@raspberrypi:~/habridge $ wget
https://github.com/bwssytems/ha-bridge/ ... -2.0.6.jar
Edit the shell script for starting:
pi@raspberrypi:~/habridge $ nano starthabridge.sh
Then cut and past this, modify any locations that are not correct:
cd /home/pi/habridge
rm /home/pi/habridge/habridge-log.txt
nohup java -jar /home/pi/habridge/ha-bridge-2.0.6.jar > /home/pi/habridge/habridge-log.txt 2>&1 &
chmod 777 /home/pi/habridge/habridge-log.txt
Exit and save the file with ctrl-X and follow the prompts and then execute on the command line:
pi@raspberrypi:~/habridge $ chmod u+x starthabridge.sh
Then execute the script:
pi@raspberrypi:~/habridge $ ./starthabridge.sh
You should now be running the bridge. Check for errors:
pi@raspberrypi:~/habridge $ tail -f habridge-log.txt
Go in your webbrowser to: 192.168.x.x.:8080
Than to Bridge Control
Fill in info about your Logitech Harmony:
Name: Harmony
IP: 192.168.x.x.
Click add
Harmony Username: your account username
Harmony Password: your account password
Click "save" upper left corner.
Go to "Manual Add"
Fill in a name: Woonkamerlamp
On Url:
http://Domoticz IP:Domoticz port/json.htm?type=command¶m=switchlight&idx=378&switchcmd=On
Off Url:
http://Domoticz IP:Domoticz port/json.htm?type=command¶m=switchlight&idx=378&switchcmd=Off
Grep your Harmony. Go to: "Harmony setup" and add new device. Add Home Control. Click Philips Hue. No need to fill in username and password.
Import? Yes. Now you will see the "woonkamerlamp"
Autostart at reboot:
crontab -e
@reboot /home/pi/habridge/starthabridge.sh