A home automation interface connects controlled devices to a central hub or "gateway". The user interface for control of the system runs uses smart devices and will also be accessible off-site through the Internet. Mostly each smart device comes out with some kind of automation interface. You want to create your own unified interface so that you don’t have to deal with so many different interfaces, look and feel, vendors, apps etc.
You can choose any automation interface of your liking. We are going to use OpenHAB(Open House Automation Bus) that has good community support. openHAB does not try to replace existing solutions, but rather wants to enhance them - it can thus be considered as a system of systems. It therefore assumes that the sub-systems are setup and configured independently of openHAB as this is often a very specific and complex matter (including "pairing" processes, direct device links etc.). Instead, openHAB focuses on the "daily use" side of things and abstracts from the devices themselves
Automation Interface will help enable your smart device (Phone/Tablet/Computer) to interact with your HA server and will help you create a modern App like interface.
Note: There will be a small learning curve. Have patience and go thru OpenHAB tutorials https://www.openhab.org/docs/
Install OpenHAB on CentOS:
1. Install Java: OpenHAB needs and works with Java as a pre-requisite. CentOS by default doesn’t come with Java installed or may be old versions of Java. You can choose your liking java we will install and use Zulu:
a. Import Azul's public key
$ sudo rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
b. Add the Azul package to the yum repository
$ sudo curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsyst
c. Install Zulu
$ sudo yum install zulu-8
d. Ensure your server default java is pointing to zulu
$ sudo alternatives --config java
2. Install OpenHAB:
a. Configuration for OpenHAB install: The RPM repo information should be defined inside a file, Create a new file at /etc/yum.repos.d/openhab.repo with the following contents depending on your choice of release. You may add all three to the same file, but make sure the desired repo is is set to enabled=1:
$vim /etc/yum.repos.d/openhab.repo
b. install openHAB with the following command, please note that for systems that support it dnf can be used instead of yum:
$ sudo yum install openhab2
$ sudo yum install openhab2-addons
c. Configure OpenHAB Service: This will allow you to register openHAB as a service, so that it runs at startup and automatically restarts if openHAB crashes. The service will be running with the privileges of the user “openhab” and expects the openHAB files under /opt/openhab2.
i. Create the file /lib/systemd/system/openhab2.service with the following content:
$vim /lib/systemd/system/openhab2.service
ii. enable the service to be executed on system startup, start the service and retrieve status information:
# initialize the new service (execute only once)
$sudo systemctl daemon-reload
$sudo systemctl enable openhab2.service
#start and retrieve status
$sudo systemctl start openhab2.service
$sudo systemctl status openhab2.service
The output of status after a successful execution should be similar to:
openhab2.service - The openHAB 2 Home Automation Bus Solution Loaded: loaded (/lib/systemd/system/openhab2.service; enabled) Active: active (running) since Thu 2016-08-14 01:16:00 GMT; 18h ago Docs: http://docs.openhab.orgiii. Test and open Console
$ ssh -p 8101 openhab@localhost
Note:The default username/password is openhab:habopen, so enter habopen at the password prompt.
OpenHab file locations:
File LocationsVar/lRepository InstallationopenHAB application/usr/share/openhab2
Additional add-on files/usr/share/openhab2/addons
Site configuration/etc/openhab2
Log files/var/log/openhab2
Userdata like rrd4j databases/var/lib/openhab2
Backups folder/var/lib/openhab2/backups
Service configuration/etc/default/openhab2
Original Configurations/var/lib/openhab2/config/org/openhab
Next you need to create sitemap, things and items for your home automation. Check concepts here https://www.openhab.org/docs/concepts/ and google search will bring tutorial videos if you want some examples