Giter Site home page Giter Site logo

oem_openhab's Introduction

OpenEnergyMonitor skeleton config for openHAB

To install openHab on Raspberry Pi:

Check Java version (JVM 1.6 or later is required):

$ java - version 

Install if needed:

$ sudo apt-get install oracle-java7-jdk

Install OpenHab:

$ wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' |sudo apt-key add -
$ echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/openhab.list
$ sudo apt-get update
$ sudo apt-get install openhab-runtime
$ sudo /etc/init.d/openhab start

To run openHab at startup:

sudo update-rc.d openhab defaults
sudo nano /etc/rc.local

add

/etc/init.d/openhab start

before 'exit 0'

Install the OpenEnergyMonitor config files:

$ git clone this repo
$ cd oem_openHab
$ sudo cp oem.items /etc/openhab/configurations/items
$ sudo cp oem.sitemap /etc/openhab/configurations/sitemaps
$ sudo /etc/init.d/openhab restart

Then browse to:

http://IP_ADDRESS:8080/openhab.app?sitemap=oem

You might need to open up the port:

sudo iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT

To save port rules use:

sudo apt-get install iptables-persistent
sudo nano /etc/iptables/rules.v4

Install MQTT & HTTP Bindings

Download openHAB addons (http://www.openhab.org/getting-started/downloads.html), unzip and extract. You probably want to do this on your PC since download .zip is over 80Mb then copy te required add on's

sudo cp org.openhab.binding.mqtt-1.7.1.jar /etc/openhab/addons/
sudo apt-get install openhab-addon-binding-mqtt

sudo cp org.openhab.binding.http-1.7.1.jar /etc/openhab/addons/
sudo apt-get install openhab-addon-binding-http

In configurations/openhab.cfg in the MQTT section add:

sudo nano /etc/openhab/configurations/openhab.cfg
mqtt:mosquitto.url=tcp://locahost:1883

Enable Authentication

sudo nano /etc/openhab/configuration/openhab.cfg

Change:
security:option=ON or EXTERNAL for external from WAN security only

sudo nano /etc/openhab/configuration/users.cfg

Add "user=password" e.g:

pi = raspberry

oem_openhab's People

Contributors

glynhudson avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.