This is one of my projects for the university, for the course of Software Engineering for Autonomous Systems (Prof. Davide Di Ruscio). Its aim is to engineer an autonomous system for domitics. It is able to manage basic things in a hause, like temperature and electricity.
The chosen architectural style is the MAPE-K one. The MAPE-K loop stands for Monitor, Analyse, Plan, Execute, all by considering Knowledge. For more details about this architectural style, please refer to this article.

More details about the project

In particolar, this project is centered on domotics. The general architecture of the system is in Figure 1:

Overall architecture of the system
Figure 1: overall architecture of the syste
The system is obviously based on simulation: the Monitoring Module generates and sends data based on what the user chooses in a window, which is realised with Java Swing. Mainly, it is possible to control lights and temperature. The Analysis Module takes data from the Monitoring Module and it analysis them. As regarding the temperature, the scheme in Figure 2 summarizes them.

Analysis Module
Figure 2: Analysis that the system performs. Also decisions are reported on the righ
The results of the analysis continue through the Decision and the Execution Module, that makes some changes in the physical environment (i.e., the database, because it is simulated). Data are exchanged through MQTT protocol, by using the Eclipse Paho, an MQTT client library written in Java.

Please notice that version 1.0.0 was tested with Windows 10 64 bit, OpenHAB 1.8.3 (but it should be compatible with OpenHAB 2.0), Mosquitto (configure it with "localhost" and port 1883), MySQL Ver 15.1 Distrib 10.1.21-MariaDB, for Win32 (AMD64).

For installation, you will need to download OpenHAB 1.8.3 (available on the official website ) and the JARs+database available here JARs+DB . Of course, you can generate the executable JARs by using the source codes of Analysis, Monitoring, Sensor, Execution components available on this repository, but the database (file smarthome.sql) is still required and it is available in the link above. Moreover, once you download OpenHAB 1.8.3, you should replace the "configuration" folder with the one provided in this repository (actually, only Items, Sitemap and Rules folders are to be replaced; other files are 0K).