So, now that this challenge is close to its end, its time to look back at the project: what did I set out to achieve, what happened on the way and how did it work out in the end. Somehow I actually managed to write one blog entry per week (at least in average), thats better than my normal writing speed...

First I need to thanks Element14 and all the sponsors for giving out such nice tools to work with, and for providing a project that gave me many up and downs, a great learning experience and a nice and useful addition to our household. Especially EnOcean was very helpful and provide additional tools and sensors to me.

I also want to say thanks to all participants in this challenge. There were many great projects, some ideas I will keep in mind and especially many help for all the problems we encountered. I really enjoyed reading everyday about the progress everybody made.

Why did I start this project?

I did set out to solve a problem that probably everybody knows: when you leave the house, you want to make sure all windows and doors are closed. For my family this problem got imminent when went bought our house seven years ago - since it has three floors  checking all windows gets tedious. And it was important since we had a cat back then which must not escape through an open window (apart from keeping all intruders out). That was the reason for my first bigger electronics project, 4 years ago, was already in the context of a more intelligent house. I struggled back then with the hardware not being powerful enough for what I wanted to do - networking was OK, wireless a dream and even a simple web service with its XML parsing was difficult.

And the available computers in a small form factor where also not powerful (and way to bulky to put them in a kitchen). So I ended up with putting a tablet on the kitchen wall, which showed all the information we needed:


(In case you are wondering: the widget to the bottom right will show the next appearance of the ISS space station above our city - its something you need with a 5-year old boy thats fascinated by space).

But even though an Android table can be quite an information machine, it lacked connection to the physical world around it. The original problem - are there any windows open - was still unsolved.

Enter the "Forget me not" challenge.

This time my project did not involve any new electronic circuits (thats why I didn't get to use Eagle, but I did so already with my wireless power project a while ago). The EnOcean sensors and the Raspberry Pi B+ provided everything I needed for my plan. It was just the software that was lacking. I really soon discovered that (at least for my setup) the stock OpenHAB Android client was not what I needed. It does not come with a Widget that I could use on the home screen. Also, updates made to the sensors took a long time to appear in the app.

So the task at hand was writing a new client for the OpenHAB REST API, running on Android. First I tried to re-use the provided samples, using the Atmosphere REST library, but it too did not work properly with the server (probably also the reason for the app to not update properly). So I needed to create a new REST client library as well. Fortunately the Apache HTTP client library (that is also used for Android) did work well for me, so that part went rather smooth.

Then I started on the Android App. Had I knew how different it is from what I'm used in programming, I would probably had started earlier with that. I know the programming language very well, but all the libraries used for basic stuff (showing UI elements, storing preferences and so on) are a completely different world (I work on web-based eCommerce systems in may day job...). But fortunately Google and StackOverflow are good friends with aspiring Android developers (much more than for OpenHAB users...), so I made good progress here.

So what Do I have, now that the challenge is over?

First, its not a finished project for me. There are still some loose ends (see below) to call it finished (stuff that goes into the kitchen needs to be approved by the SWMBO, so it should be polished).

But I already have a state that could go into everyday use. The OpenHAB setup has proven rather stable, and the scripting to handle the sensors was easy enough. the Android application is fully functional now:

  • it reacts well to sensor actions, with a delay of less than a second
  • it also looks already quite OK (at least for my eyes...), and not only shows the aggregated state but also the windows that are open
  • the app can be configured with the server address and the display names for the sensors


(Yes, the ISS should be visible next Saturday evening, provided its not clody during that time)


For better testing I did not mount all sensors right away at their destination, but only the ones that are usually closed. I kept two of the others to be able to open and close them when I need them. The mounting was simple. I used the enclosures from EnOcean, and stuck them with Tesa PosterStrips to the window frame. The same was done to some small power-magnets:


One actually need to care about the orientation of the magnet, since sticking it behind the sensors seems not to be the preferred position for them (from the top they work much better, but there was not enough space to mount them there properly).

So whats left to do?

First, the Android app needs some more testing, to ensure its stable enough (nothing could be worse than it showing all windows as closed when they aren't). It probably also needs some visual polishing, maybe I will also create a widget the is vertically aligned (to have more options to fit everything on the home screen).

Next step would then be cleaning the app and library up, and polish them to be published. Especially the OpenHAB library might find some good use as starting point for others. But code style and documentation are not at a point where they should be.

But I also have ideas for continuing that project. I already have a system in place (based on a mbed) that monitors and logs the temperature in my house, to see when the heating system fails in winter (happened several years ago with -20°C outside). Since I now have EnOcean sensors available I can move this system over to using OpenHAB, since it can easily handle the logging and also some alerting. Doing so will lead to the next software project: I run the OpenHAB server on my home network, and I don't plan to open this up to the outside world. But I still would like to see the temperature data when I'm on vacation. So I want to set up a second OpenHAB server (using a virtual server I have rented), and run it as a slave to my home server. The master at home would push all item changes to the slave, so it should always see the same events.

Last but not least: I have applied to participate in the "In the Air" challenge. I see it as a good continuation of this challenge here - home automation does not need to be reduced to windows and temperature. We will see whats happening. Even when not selected some of the ideas from there might get applied.

But whats actually the most important item on my list: fixing the PC. It just blew up on my yesterday while starting to write this report (and ironing out some bugs in the Android app), freezing and rebooting at random times. Looks like the motherboard is defective. Fortunately for me I kept everything in git and OwnCloud, so I could continue today with my work laptop (after spending a whole evening looking for possible reasons and cursing about hardware - at least you can kick it if it doesn't work