HomeCtrl was a long term home automation project and a huge learning project for me during my university years and even a some time after. I used it productively in two appartments before I moved into the one that I have now. That said, there were actually three versions of it, from some basic connecting of things to the computer and pressing buttons, to a fully autonomous system.
The first version of HomeCtrl was really just trying to connect some buttons and LEDs via parallel and serial ports to my computer. I already used Java and the RxTx library to react to user input and send some output. Seeing where it is today, that really wasn't much but it got me hooked and inspired me to go to the next level.
Eventually I scrapped version 1, because I wanted to actually control things in my room (and later appartment) using a nice interface. With nice I mean a Star Trek LCARS interface, because I already liked Star Trek TNG. In that time I was learning about Java based webservers in some university course so I gave that a try.
I built a Java web app using Spring that ran in a Tomcat web server instance. I loved this idea, because I could built a web interface, which would be available on every device at home ... no installation. At first, the web server ran on my PC. Later, I put it on an extra computer for productive use. The web server did not control the devices directly. Instead, the server interacted with Atmel microcontrollers that I programmed in C, which controlled the devices and also provided status data using sensors.
What kinds of devices did it control? I startet with lighting and expanded to heating control and temperature sensors. I wanted to expand to blinds and even got the hardware, but I never got that far, even with version 3 (maybe, if my wife and I have our own house one day I'll revive the project and finish it). BUT, the project also got a sound system, meaning I had a headless VLC player that I could control via the interface to stream tuner channels or MP3 music.
Version 2 eventually got a feature and design update in terms of configurability.
I liked using this system. The downside was that you had to press buttons for everything. After a few years I wanted a better system, one that would simply do what it was supposed to do without me constantly interacting with it. And so I moved on toward Version 3.
Version 2.x was still very much try and error. That was shown mostly in the code, which became a big ball of mud. I wanted to move on to something more modular, in two ways. Firstly, I wanted the whole system to be highly configurable. Not the tiniest bit of how sensors and actors would be connected to each other should be predefined. Secondly, the system should be fully autonomous. I should be able to get information and take some influence if I wanted to but that should be the exception. As a result, the user inferface should not be glued to the control as it was with the Java web server.
So this time, before I started, I did some architectural work. I decided to still go with a centralized control server and the distributed microcontroller setup to connect to sensors and actors. I also kept Java and Spring on the Server but instead of a web application, I wrote a simple application. The whole distributed system used HTTP communication, which I kept too. That way I could also offer an interface of the same kind on the server to remotely connect any kind of UI.
The server application uses a self written event system. The whole control system, its configuration and interaction can be configured using a JSON configuration file. The parts of the control system are small code modules that resemble different kinds of actors and sensors as well as pieces to connect them through converting, comparing or combining data. The sound system didn't make it into version 3. Neither did any UI, because it worked so well after I quickly got the configuration file right. It did what it was supposed to, work fully autonomously.
Well, as I said in the introduction, the system is not in use right now. But version 3 is also available on GitHub, so you can always check it out. You can find HomeCtrl here.