Skip to content
Andreas Tennert edited this page Mar 18, 2016 · 5 revisions

HomeCtrl

HomeCtrl is my project to control my home. It consists of micro controller nodes, that handle the device access and a server, which manages the whole system. At some point there will also be a user interface or different user interfaces. What you will find here is the server software. The nodes are using an extended version of U. Radigs AVR webserver.

General design

The system consists of three parts:

  • Sensor/Actor nodes - devices that have sensors and actors attached to it
  • A server - instance/program, that manages the whole system
  • A user interface (doesn't exist yet) - interface for the user to change values and configurations or mess with things in some other way

So far everything communicates via HTTP and EnOcean. I only use EnOcean for sensors and it's only testing. Everything else uses HTTP to transmit values. This means it's quite easy to extend the system, but there's of course the lack of security that needs to be fixed. The communication is handled via the communication library (com), that I wrote.

The server is a Java software, which uses an event bus. It reads the system configuration from a configuration file and attaches every configured element to the event bus. I choose this design to get a high level of extensibility. It's not necessary to touch the code for changing the configuration and if a new controller is needed, you usually extend / change the configuration (maybe add a new controller class before) and that's it :).

There are two kinds of elements, that can be written and instantiated:

  • Controllers - will use input data to control a certain actor (for instance take temperature values and control the heating depending on the value)
  • Processors - can be used to process data and provide a certain result (for instance take different temperature values and calculate the mean)

Sensor data is put into the system in form of device value update events. Processors calculate new information based on aggregated data from sensors or other processors. Controllers can take sensor values or values from processors and use those to control devices. If control actions are necessary, they can send a control event. Processors and controllers are created from the configuration file.

History

HomeCtrl is based made from the words home and the English keyboard button Ctrl (spoken control).

It all started in 2007 when I made first attempts to have a PC exchanging data with an ATMEL microprocessor. During the next 4 years I developed the first HomeCtrl server software as a pure Java web project. Later I changed it to a Java server with similar program structure and a HTML/PHP/JS interface.

In 2013 I started to completely rewrite the software to change the whole architecture. It's based on an event bus as internal communication connection and the Com bundle as interface to actors, sensors and user interfaces. The result is the current version, which will probably also be the final one, so there will only be extensions and bug fixes.

Clone this wiki locally