openHAB is an open source project to control your home automation system. openHAB stands for open Home Automation Bus.
Its strength is that it combines a huge variety of different protocols into one single web interface. The different protocols are "translated" to one single API by means of bindings.
More information about openHAB can be found here.
I'm still using the old openHAB version 1.8.3 which merely is based upon items, rules, sitemaps and transforms, in combination with a configuration file.
I don't really like the new approach: way to bulky, fancy and not my cup of tea...
I'm only using the MQTT binding for the communication to and from my own home automation system (written in Java and based on the Pi4J open source framework) and until today satisfies more than enough my requirements.
Next to the MQTT binding, I'm also using the astro binding to handle things at sunset and sunrise times. Very handy to automatically switch on or off certain lights in- and outside the house when it's becoming too dark or shiny enough.
First and foremost: openHAB allows you to have an intranet of things, not an internet of things. You're not depending on outside connections to clouds and so on, something I dislike.
I like to keep my home automation system "internal": far less vulnerable for outside attacks (in fact, not vulnerable at all...).
Next to this, there's a flexible web interface and also an Android application available so that you can also control your home automation system by means of your smartphone.
With openHAB, you have the possibility to retain messages. That is, every message processed is stored in a database maintained by MQTT.
The location of the database is /var/lib/mosquitto/mosquitto.db.
Advantages: when restarting the system, openHAB will submit all messages that were active before stopping the system.
Disadvantages: each time you restart the system, the messages will be forced onto the system, which is maybe not what you want.
Luckily, there's a possibility to switch on or off the retained messages by means of a flag that can be set in the openhab.cfg file. By default, the retained flag is not set and defaults to false.
When you have switch on the flag for one reason or another, the only way to avoid forcing the previous messages onto the system is:
switch off the flag again in the openhab.cfg file
remove the mosquitto.db file in /var/lib/mosquitto (must be done as sudo: sudo rm /var/lib/mosquitto/mosquitto.db).
By default, openHAB runs on port 8080. If for one reason or another that port is occupied by another application there's always the possibility to change the port openHAB uses for both HTTP as well as HTTPS.
For openHAB 1.8.3 it's very easy to change the default port(s). Edit the start.sh (or start_debug.sh) script and change the values for one or both of the following items:
HTTP_PORT: defaults to 8080, change to whatever value you like (but port must not be used by some other app, of course)
HTTPS_PORT: defaults to 8443, can also be changed
Don't forget to update the URL with the modified port number once you restart the openHAB server.
PS: later versions of openHAB started to use a file in /etc/defaults but I have no experience with that approach yet since I'm planning on continue to use version 1.8.3.
I don't want to swim through all the mud and misery time and again of those latest and (absolutely not) "greatest" versions of openHAB!