OpenHAB Redux

Posted: December 16, 2014 in HA, Hacking and playing, Hardware

I had previously looked at OpenHAB when we were playing with some concepts but because the capabilities we wanted weren’t available out of the box, we went with some that did. It’s use at home was also originally limited by the lack of Z-Wave support.

The latest version of OpenHAB (1.6.0) was using the same Open Z-Wave (OZW) libraries that Domoticz had ben using so well. It also had full support for native mqtt and for the MQTTitude geo tracking app. This meant I could use it to read the EvoHome data as well as location tracking data from the excellent OwnTracks apps. Bonus points for Sonos, XBMC, RXFCom, Hue and a host of other systems that I either have or want. OpenHAB basically works by including libraries or bindings that allow it to talk to specific devices or protocols. If I want to talk to Sonos devices, I include the Sonos binding, tell the system where the various Sonos players are and what to call them and then I can interact with those devices directly.

With that in mind I started to dig around some more. My initial thoughts weren’t good, you have to script everything. There is no concept of adding a device by some means of auto-discovery, you literally have to tell the system what everything is. Once you get past that hurdle, the next one is the creation of a ‘sitemap’ that is the basis of the interfaces the system generates. Again, there’s no pretty interface like the Fibaro or Domoticz platform, this is basic jQuery mobile wrapped in a framework. I should add that there are excellent Android and iOS apps for the OpenHAB platform, but they still just render the sitemap you define.

I admit that I have struggled with the platform. While the demo and examples in the Wiki are all good, it seemed that the minute I tried to do something it went wrong. As the platform appears to reload on any submitted change to the items, rules, sitemap or persistence, this gets a little bit frustrating on a RPi that takes a while to get going. As the system is Java OSGi based, the error messages that appear either on screen or in the logs are ‘obscure’ unless you are an experienced Java dev.

After a couple of days playing I had something that worked – GeoTracking was working, EvoHome setpoint and recorded temperature data was being logged and shown on the system. I was now in a position to start thinking about moving the z-wave controller and sensors I had in Domoticz across to OpenHAB. It was then that I had the first eureka moment.

Over at the Vera forums, people had been discussing OpenHAB and several had written a binding for the MiOS system that all Vera devices use. Suddenly I didn’t need a Z-Wave USB controller plugged into my RPi and configured; I can tell OpenHAB to talk directly to the Vera. Vera with it’s better antenna and auto-device inclusion, simple timers and scenes. Every single one of which was now available via OpenHAB.

The Vera still turns on the lamps in my daughter’s room every morning, but now OpenHAB knows that they are on. I can control all of the Vera functionality in the same ways I did before, but any changes are reflected in OpenHAB immediately. It still controls all my 433 devices via the RFXCom USB device as well.

And that was the second eureka moment. The reason I started to get frustrated with the Vera was the pain of setting up complex rules around devices or events. Yet with Vera doing the basic work of managing the Z-Wave devices, the complex rules could be written in OpenHAB and the command to do something sent to the Vera to execute. OpenHAB was the brain while the Vera was the muscle.

OpenHAB has always been designed to be the main bus system for a domestic HA system – OpenHAB means Open Home Automation Bus, but I have been so busy looking at the one device to rule them all mentality, that I missed the sheer significance of this platform and what it could mean for my projects.

Once the dust had settled from that particular moment of D’oh the third and final eureka moment arrived. It didn’t matter that the interface that got generated by OpenHAB looked rubbish (sorry OpenHAB devs, but yuck, really, yuck) because I DON’T HAVE TO USE IT. I use the official Sonos app to control the music and OpenHAB knows it’s in use. If I turn on my lounge XBMC device, OpenHAB knows and if there are issues, OpenHAB will route the alerts to XBMC for display on my TV as well as my phone.

The flashy integrated control of my devices – Sonos, XBMC, Satellite box, amp, lighting, heating and security can all be done somewhere else – OpenRemote, Roomie, DemoPad. So that’s the next project……


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s