Tuesday, 27 July 2010

openHAB @ Eclipse DemoCamp in Darmstadt

I had the pleasure to present my openHAB project at the Eclipse Helios DemoCamp in Darmstadt on July 14, 2010. First of all, a big "thank you!" to Jochen Hiller and Marcel Bruch who have organized this great event and gave me the opportunity to do a short demo.

Altough most of my presentation was a live demo, I also had some slides that I have now made available on SlideShare for anyone who is interested.


Friday, 9 April 2010

Tycho Entering the Eclipse Space

Almost two years have passed since my blog post about the the discrepancy of OSGi/p2 on the one side and Maven on the other. At that time I was pessimistic that the two worlds would ever come together and the creation of the B3 project even reinforced that impression.

Nonetheless I followed Sonatypes efforts on the Tycho front during the last year, which looked very promising. It actually already works so well that I recently changed the build of openHAB from Maven2/PaxConstruct to Maven3/Tycho - it's really cool (a blog post with details will follow soon).

Seeing that Chris Aniszczyk has now also embraced Tycho for the JGit/EGit builds is a clear sign that Tycho (and thus Maven) is slowly being picked up in the Eclipse space.

And the best news: Tycho has just been proposed as an Eclipse project! As the proposal states, it "competes with these [Buckminster, B3, PDE Build and Athena] projects". But seeing its current stability, its ease-of-use and all its possible synergies with the existing Maven tooling, I am pretty sure that it will win the race for being the preferred future build infrastructure for Eclipse/OSGi projects.

Kudos to Sonatype, who really put a lot of effort into this and who has torn down the barriers between the two worlds!

Tuesday, 9 March 2010

Choosing a Versioning Control System

When initiating an Open Source project like openHAB, one of the many questions you have to answer before you start is: What VCS should I use?

In the beginning I did not really realize that this is an important question. Being a professional Java developer building commercial products with Eclipse, the use of Subversion with Subversive as an IDE integration just seemed natural to me and not worth any further considerations.

It was more by chance that I noticed questions about using git on other OS projects that were using SVN as well as the activities in the Eclipse community around (E)git. When Ekkehard Gentz started a blog series about DVCS and Eclipse, I eventually decided that I needed to have a closer look.

After having grasped the great advantages of a DVCS, especially for Open Source projects, I then had to decide for one - to keep things simply, I only looked at the most popular ones, Git and Mercurial.

As I am using OSGi and Eclipse, there were quite some strong arguments for Git:
  • With JGit there is a pure Java implementation available
  • EGit is now under the Eclipse umbrella and actively developed by many gifted Eclipse committers.
  • It seems that Git is more hyped than Mercurial (at least that's my personal impression).
  • Git seems to be more powerful and flexible
Hence I installed Git and EGit and gave it a try. After working with it a bit, I noticed that I didn't really feel comfortable with it. It is difficult to say why, but I made out the following reasons:
  •  I am a Mac and Windows user and Git somehow made me feel that its home is Linux. Although there is now a Windows version with msysgit, cygwin used to be the official way of using Git on Windows.
  • Coming from SVN, the Git vocabulary can be confusing - e.g. something like a svn revert is not done with git-revert, but with git-reset. Together with the abundance of commands and functionality of Git, this can easily make people feel lost if it's their first time with a distributed VCS.
  • The standard way for pushing and polling with Git is ssh - but this makes things much more difficult to use, if you are behind a firewall.
  • EGit is still an incubation project and there's still some way to go until it reaches a level like Subversive: There is no support for the "Team Synchronization" view, which I use a lot. It also had some trouble with deletion and renaming of files. Last but not least - it is lacking icons on the context menus. Ha, I know, this is only cosmetics and should not be relevant at all; but still it leaves the impression of being a version to early to be used.
Almost all of the above items felt better on Mercurial (and HgEclipse), so I finally decided to go for it. I guess on the long run, I might reconsider this, once EGit has matured, but for the time being I am happy with this situation. And it is very reassuring that there are plenty of tools around to convert a Mercurial repo into a Git repo and vice versa - so no decision needs to be taken for eternity!

Now I am only waiting for Ekke to finish his series to eventually see to what conclusion he came and which DVCS is the one of his choice :-)

Tuesday, 23 February 2010

Positioning openHAB

As already mentioned before, I have started the openHAB project not because nothing on the market could have provided me the desired functionality, but because I want to build something robust, stable and open with a modern technology stack.

If I were a pure user, I would still stick with Misterhouse as this has matured over the years so much that they are discussing on their mailing list already whether it's better to have a deer head or a magic mirror talking to you.

Well, I am not, and so I take the challenge to build something equally useful on top of a JVM. After Claude's comment I very much considered contributing to the openRemote project, tried to dive into the details of their code base and involved myself in technical discussion on their forum. But at the end, I decided against it, because all the main things that I would like to see covered are still on their todo list. That wouldn't be bad at all as it could have given me a good opportunity to contribute the missing things, but unfortunately - at least that is my impression - it would mean more or less a complete rewrite of openRemote...
Just to give you a few examples of what openRemote IMHO lacks:

  • No rule engine support yet
  • it has a "one-way" protocol, i.e. the client (e.g. iPhone App) is stateless -> it cannot show if lights are on or off, it cannot display values (e.g. temperatures), etc. Version 2.0 will bring a server push, but I am not sure when the client will support this?
  • No states are cached on the server which is definitely a problem for rules and stateful clients
  • No modularization / extension concept yet, it's one brick (the BOSS)
  • No easy protocol to implement for new extensions, see discussion about arduino support
  • No simple way to build from latest sources, so people are desperately waiting for an official build
I don't say that any of this is bad, I just want to highlight that their architectural approach obviously followed other priorities. I can imagine that openRemote and openHAB can cross-fertilize each other and maybe there is someday a possibility to integrate or even merge these projects - time will tell :-)


Sunday, 21 February 2010

openHAB is out!

It took quite some preparation, but finally I can anounce that I have created the envisioned Open Source project for my (and others!) home automation needs!

In order to avoid any brandmark violations, I have reconsidered the name of the project, so that it is now called the open Home Automation Bus (openHAB).

You will find the project hosted at Google Code at http://openhab.org, even an initial codebase is already available. Although it's not doing much at all yet, it should give interested persons an idea of its architecture and show that things are moving and the project is on its way.

I will soon post further background information about the decisions taken, so stay tuned :-)

Sunday, 22 November 2009

Reinventing the Wheel

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. See these screenshots to give you a rough idea, how it looks like:




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!

Friday, 20 November 2009

Accumulated Distraction...

It's a long long time since my last post, but I swear that I haven't been lazy or without impulses. Usually, I like to blog while being at conferences and it is not long ago that I attended the last one: The Eclipse Summit Europe 2009. As usual, it was a great event with many interesting people and lively discussions.

But a few things detered me from directly blogging about my impressions this time. For example, the ESE2009 organizers did not provide any public Wifi access to the attendees this time. I am not sure whether this was because the Wifi used to be heavily overloaded in the past years or if they just wanted to draw attention to the talks; if latter, this might indeed have worked out as I have seen much fewer people typing on their Macs throughout all sessions... Another reason for not blogging at this occasion was that I was invited to an X-Box soccer competition by the Itemis guys until late at night; these chaps seem to always be prepared for everything ;-) Last but not least, I didn't find much time to blog on the last conference day as I was called to hospital for the birth of my second son - well, I hope that at least this can be accepted as an excuse.

Despite all these distractions, I have been working quite eagerly on a new private project that I will very soon blog about; it is quite fascinating and if all goes well, I might present it on a future ESE - let's touch wood!

One last remark: As I missed a few sessions at ESE due to my early departure, I am taking the opportunity to join the Eclipse Demo Camp in Frankfurt next Thursday. There are already more than 60 people registered for it, which is quite astonishing. So if you are around and don't have any other plans - join me there!