Monday 15 June 2015

The Domotic Server


hi folks!, this post is about the software i use for the domotic web server, there are many open source options for choose the software, for example freedomotic, PiDome, home assistant and many more. But i choosed openhab, why? why i did it? because it is developed in java and there is a large community supporting the project. In my case i have a lot of experience in java and it is more easy for me for collaborate with the project or change something that i want only for me.


Openhab has a web developed, android and Ios interfaces. The best of all is that your server works with any of this interfaces without any extra effort.

The software has a lot of bindings like Asterisc, cups, EnOcean, MQTT, TCP, HTTP, XBMC, anything you can imagine, it is very easy to develop your own binding if you have experience with git and maven. In my case i have installed the server in a raspberry pi with kodi's media center . I also have an arduino with the ethernet shield, via http  the arduino provides the temperature , light sensor and a relay to switch on/off the wifi. With the raspberry i can request the temperature to the arduino, turn off the wifi, execute some basic commands in kodi, integrate with yahoo weather, control the air conditioner, see how many light is in the living and control the thermostat.

Openhab's Android screenshot
openhab's web screenshot

To clone the project you have to excute this command



$git clone https://github.com/openhab/openhab.git

You don' t have to download the source code and compile, there are binaries distributions at the link http://www.openhab.org/downloads.html.

There are three downloads to consider, the runtime core, the designer, the addons and it is recommended to download the demo setup. As a pre-condition you need a Java Virtual Machine (JVM) installed in your computer.
The runtime core is the server itself, you can run the server as a service, you can see many tips like this at this link https://github.com/openhab/openhab/wiki/Samples-Tricks.
The designer is for integrate your bindings, it is more easy to use the demo setup and change it instead of begin from a blank project, you can learn a lot with the examples, to getting started follow this tutorial http://www.openhab.org/gettingstarted.html.

Once you have installed it, you can see your server at the url http://<ip>:8080/openhab.app?sitemap=demo, if you want to access your server via internet you can create an user in no-ip or dyndns. In my case i used no-ip, and i have the router flashed with dd-wrt, so i could configure the no-ip user in the router with no problem. I never configure the no-ip in the raspberry but i suppose it is not a dificult task.

Two hints for the designer
  1. if you are a linux user under a 64-bit platform add the line next line in the  designer/configuration/config.ini
    org.eclipse.swt.browser.DefaultType=mozilla
  2. delete the workspace folder in the designer, if you don't you can't use the runtime enviroment in the designer

No comments:

Post a Comment