Reinventing the Wheel

Posted by Kai Kreuzer on November 21, 2009

As announced, I would like to tell you some details about my latest private project: SmartKNX!

I have spent quite some time in the past months with the Open Source project MisterHouse - a software for home automation. Initially, I have started using it, then I also engaged myself in the community and contributed some new features and bug fixes. Misterhouse really offers a lot functionality and it has quite a low learning curve for newbies. Especially, the iPhone interface is attractive, which has been mainly done by members of the german KNX community.

So although this all looks quite fancy and modern, being a professional software developer, I still do not feel completely satisfied with it. There are multiple reasons for it:

  • MisterHouse more or less only consists out of a bunch of Perl scripts; the core dates from more than 10 years ago. Many parts are hard to read as the software is not modular and even things like the HTTP server are coded in Perl with a scary if-then-elsif-elsif-elsif... block for doing all request processing.
  • The standard web interface also dates from the 90s and thus is not really usable anymore. The iPhone interface has been plugged on-top, but is not really well integrated. Future additions like ajax-enabled features might become very awkward due to the reason above, the simple embedded HTTP server.
  • I do not want to think of what security wholes might be in these scripts, there has definitely never been any focus on securing the interfaces.
  • There is not really good IDE support for the whole thing; my tool of choice for the moment is 'vi', but as I am not 100% fluent in Perl, the regular expressions and the MisterHouse API, it is often a long trial&error session before things work the way I want. Eclipse Perl integration has helped me a bit now, but still it is far from being as nice as all the goodies of JDT.
  • Debugging is a nightmare for me as well; I can put some log messages here and there, but often it only helps to do educated guesses what might be wrong. This is tedious and not the way one expects software development today.
Taking all the issues above, I asked myself if this is really the framework that I want to work with for the next decades (well, a home automation project is really for a life-time, isn't it?). And I wondered what my sons will tell me if they grow up and see what I did there (and I have to ask them to learn Perl in order to maintain our house)...? So do not get me wrong - I really appreciate what has been done with MisterHouse and it is truely amazing. I just feel that time has moved on and that after more than 10 years it could be time for a "next generation" implementation.

And this is what I would like to do: A complete rewrite of MisterHouse on basis of the very latest technologies - the temporary project name is SmartKNX, which also shows the focus on KNX rather than X10 (what MisterHouse is mainly focusing at). But of course, SmartKNX should be so modular and extensible that any other domostics standard can be supported as well. As technologies, I have things like Java, OSGi, XText, Maven, Scala etc. in mind... More details will follow - stay tuned!