-
Notifications
You must be signed in to change notification settings - Fork 0
Ubuntu on x64
##Introduction Basicly a step by step guide to install OpenHAB 1.7.1 on an Intel x86 machine using a few common bindings. The content is mostly copy & paste from other parts of the wiki.
I've picked the LTS version for stability.
- Download Ubuntu 14.04 LTS 64bit: http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-server-amd64.iso
- Download Rufus: https://rufus.akeo.ie/downloads/rufus-2.2p.exe
- Create bootable USB using Rufus and the ISO file.
Install Ubuntu LTS
Pick the following options:
- OpenSSH server (To administrate the server using PuTTY)
- Samba Fileserver (To get access to the OpenHAB config files from Windows)
###Java We need Java 8, which is not included in Ubuntu 14.04 LTS, so we add a repository and install it.
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
###MySQL for persistence
sudo apt-get install mysql-server
Start the Mysql commandline as root
mysql -u root -p
Create a database for OpenHAB
CREATE DATABASE OpenHAB;
Create a user for OpenHAB
CREATE USER 'openhab'@'localhost' IDENTIFIED BY 'yourpassword';
Grant the user permissions for the database
GRANT ALL PRIVILEGES ON OpenHAB.* TO 'openhab'@'localhost';
Quit the Mysql command prompt
quit
###Mosquitto as MQTT broker
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto
####Setup TLS on Mosquitto (optional) copy the SSL CA to /etc/mosquitto/ca-certificates copy the SSL certificate and private key (.crt and .key) to /etc/mosquitto/certs
Protect your SSL certificate
cd /etc/mosquitto/certs
sudo chmod 600 *
sudo chown mosquitto *
Configure TLS
sudo nano /etc/mosquitto/conf.d/tls.conf
Add the following
listener 8883
tls_version tlsv1
cafile /etc/mosquitto/ca-certificate/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
require_certificate false
Restart Mosquitto (check how, /etc/init.d/mosquitto restart doesn't work)
####Portforward Make sure you portforwarded the default mosquitto port 8883 (or 1883) to your server!
###Configure the repository
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
###Install the runtime
sudo apt-get install openhab-runtime
sudo apt-get install openhab-addon-binding-astro
sudo apt-get install openhab-addon-binding-dsmr
sudo apt-get install openhab-addon-binding-http
sudo apt-get install openhab-addon-binding-hue
sudo apt-get install openhab-addon-binding-mqtt
sudo apt-get install openhab-addon-binding-mqttitude
sudo apt-get install openhab-addon-binding-netatmo
sudo apt-get install openhab-addon-binding-networkhealth
sudo apt-get install openhab-addon-binding-plex
sudo apt-get install openhab-addon-binding-samsungtv
sudo apt-get install openhab-addon-binding-sonos
sudo apt-get install openhab-addon-binding-wol
sudo apt-get install openhab-addon-binding-xbmc
sudo apt-get install openhab-addon-binding-zwave
sudo apt-get install openhab-addon-io-myopenhab
sudo apt-get install openhab-addon-persistence-mysql
cd /etc/openhab/configurations/
sudo cp openhab_default.cfg openhab.cfg
- Set security option external, for my.openhab
- Set default persistince to mysql
- Set Mysql server, username and password
- Set MQTT Transport
- Set HTTP Binding cache item for weather
- Set Philips Hue ip and secret
- Set Sonos UDN
- Set Samsung TV host
- Set Z-Wave port
- Set Netatmo clientid, clientsecret and refreshtoken
- Set Astro binding latitude and longitude
- Set Plex host
- Set DSMR port and gas channel
This is where you should create items, sitemaps and rules.
###symlink com ports for Zwave and DSMR devices
sudo nano /etc/udev/rules.d/50-usb-serial.rules
And add for the Aeotec Z-Stick II
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{product}=="CP2102 USB to UART Bridge Controller", SYMLINK+="usb_zwave", GROUP="dialout", MODE="0666"
And for the DSMR cable
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{product}=="FT232R USB UART", SYMLINK+="usb_dsmr", GROUP="dialout", MODE="0666"
Add the symlinks to the Java args
sudo nano /etc/init.d/openhab
Look file the lines starting with -D and add one
-Dgnu.io.rxtx.SerialPorts=/dev/usb_dsmr:/dev/usb_zwave
###Set autostart
sudo update-rc.d openhab defaults
##Share the configuration using Samba
sudo nano /etc/samba/smb.conf
Go to the bottom of the file and add
[OpenHAB]
comment = OpenHAB Configuration
path = /etc/openhab/configurations
browseable = yes
writeable = yes
guest ok = no
create mask = 0777
directory mask = 0777
Restart Samba
sudo /etc/init.d/samba restart
Change permissions on the OpenHAB config to 777
cd /etc/openhab
sudo chmod -R 777 configurations/
Now you can go to your machine using \hostname\OpenHAB from your Windows machine (use your Ubuntu credentials) and edit the configuration files. Use Notepad++ since most files have Unix linefeeds
###Linux / OS X
###Windows
- Cosm Persistence
- db4o Persistence
- Exec Persistence
- InfluxDB Persistence
- JDBC Persistence
- JPA Persistence
- Logging Persistence
- mapdb Persistence
- MongoDB Persistence
- MQTT Persistence
- my.openHAB Persistence
- MySQL Persistence
- rrd4j Persistence
- Sen.Se Persistence
- SiteWhere Persistence
- AlarmDecoder Binding
- Anel Binding
- Arduino SmartHome Souliss Binding
- Asterisk Binding
- Astro Binding
- Autelis Pool Control Binding
- BenQ Projector Binding
- Bluetooth Binding
- Bticino Binding
- CalDAV Binding
- Comfo Air Binding
- Config Admin Binding
- CUL Binding
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- Denon Binding
- digitalSTROM Binding
- DMX512 Binding
- DSC Alarm Binding
- DSMR Binding
- eBUS Binding
- Ecobee Binding
- EDS OWSever Binding
- eKey Binding
- Energenie Binding
- EnOcean Binding
- Enphase Energy Binding
- Epson Projector Binding
- Exec Binding
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FS20 Binding
- Global Cache IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-Binding
- KNX Binding
- Koubachi Binding
- LCN Binding
- LightwaveRF Binding
- Leviton/HAI Omnilink Binding
- Lg TV Binding
- Logitech Harmony Hub
- MailControl Binding
- MAX!Cube-Binding
- MAX! CUL Binding
- MiLight Binding
- MiOS Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- Neohub Binding
- Nest Binding
- Netatmo Binding
- Network Health Binding
- Network UPS Tools Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Panasonic TV Bindung
- panStamp Binding
- Philips Hue Binding
- Piface Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- Primare Binding
- Pulseaudio Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Sinthesi Sapp Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonos Binding
- Squeezebox Binding
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo Binding
- VDR Binding
- Velleman-K8055-Binding
- Wago Binding
- Wake-on-LAN Binding
- Waterkotte EcoTouch Heatpump Binding
- Weather Binding
- Wemo Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Yamahareceiver Binding
- Zibase Binding
- Z-Wave Binding
- Asterisk
- Google Calendar
- Linux Media Players
- ROS Robot Operating System
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- Transformations
- XSLT
- JSON
- REST-API
- Security
- Service Discovery
- Voice Control
- BritishGasHive-Using-Ruby
- Dropbox Bundle
A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.
Please update the wiki if you do come across any out of date information.
- Comfo Air Binding
- Ecobee Examples
- Nest Examples
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Farenheit to Celcius
- The mother of all lighting rules
- Reusable Rules via Functions
- Combining different Items
- Items, Rules and more Examples of a SmartHome
- Google Map
- Controlling openHAB with Android
- Usecase examples
- B-Control Manager
- Spell checking for foreign languages
- Flic via Tasker
- Chromecast via castnow