Archive for the ‘HA’ Category

OpenHAB Update

Posted: March 5, 2015 in HA
Tags: ,

Searching for some information on Google yesterday returned one of my own posts and made me realise that I’ve not posted anything about my progress with OpenHAB for ages.

OpenHAB is still in daily use and is now happily controlling the various simple scenes that the Veralite originally controlled e.g. turning on and off the dehumidifier. It has now also allowed me to migrate simple scenes to more complex rules based on day of the week, school holidays and even family holidays.

My old Veralite system had a table lamp and some fairy lights turned on at a specific time Mon-Fri and at a different time Sat & Sun as a simple alarm for my daughter. I had to remember to enable and disable the specific timers in the Veralite if it was school holidays or if the timing had to change. This lead to a single scene with 3 or 4 specific ‘ON’ timers and an associated 3 or 4 ‘OFF’ timers.

With OpenHAB I now have a single rule that works on the day of the week and 2 simple true/false switches for school or family holidays to control all the morning wake up alarms. Granted I could probably have done it in Lua, but I much rather work in an IDE that gives me error checking rather than try and do everything in the Lua console on the Veralite.

I also have alerting and messaging capabilities that can tell me when I need to do something. By monitoring the on state of the dehumidifier and the power draw I can tell if the bucket needs emptying. If it does I can send a message out to my phone via Pushover, tweet an alert or even display a message on one or all of the Kodi (nee XBMC) boxes that are in various rooms. Sounds like overkill, but it means that the machine actually gets emptied and gets on with the job rather than relying on random checks by either myself or the wife.

By using the Veralite as simply a Z-Wave (& 433MHz) controller and abstracting the control logic into OpenHAB I have managed to reduce the demands on the Veralite, reduce the number of plugins/addons installed and consequently increase the stability of the Veralite.


Raspberry Pi 2

Posted: February 10, 2015 in HA, Hardware
Tags: ,

By some bizarre fluke I was actually in a position to respond to the email from various suppliers that the new RPi 2 was out and in stock on it’s day of release. This meant that I had in my sweaty palms a brand new RPi 2 the day after it was announced. Migrating OpenHAB across to the new box was a bit of a pain as I had never bothered to document the steps I had taken before, so things would fall over because I had forgotten to install or configure things.

Once it was done I have to say the difference between the original RPi & the new one were astonishing. OpenHAB is an utter dog to get started on the RPi 1. Using the command line and running the ./ it took 2 minutes and 15 seconds to get to the OpenHAB is running message. On the new RPi 2, it took less than 30 seconds.

From a development standpoint it makes a huge difference as the system effectively reloads when you update the rules file… so trying to write rules on a RPi was painful. At least on the RPi2 there’s a lot less waiting.

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……

HA Adventures

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

So the foray into other HA platforms continues. I wrote in November that I was playing with Domoticz. I eventually bought a new Aeon Labs Z-Stick, excluded a couple of sensors and a switch from my Veralite and built up a small Z-Wave system controlled by the Domoticz platform running on a RPi.

Loved the system, clean but usable interface, didn’t seem to struggle running on the RPi. Lots of updates, so obviously still actively developed and the ‘blocky language’ allowed me to build some fairly complex queries and rules without resorting to Lua. I have to say that I came very close to moving everything off of the Veralite and across on to the RPi.

I then managed to throw myself a curveball. EvoHome.

I also wrote about us installing this new heating system and while loitering around various forums I saw that people had managed to persuade their EvoHome systems to spit out the temperature data via simple scripts.

A bit of a play later and I had some JSON with the reported temperatures for every room in the house direct from EvoHome. Niiiice!

The trouble was that I couldn’t figure out how to get the info back into Domoticz. To be honest I didn’t even bother with the Veralite – that just wasn’t going to happen. I hoped that I could create a virtual object or some kind mapping that would allow for the live temperature data to be integrated into the platform. I couldn’t figure out a way to do it without seriously re-writing blocks of the Domoticz source code. I even tried to go around the problem by pushing the data into my Mosquitto MQTT broker on the same device and then trying to access it from there. While I could see the data, I had no way to get it into the system where it could be used.

While I’m struggling and failing with this particular scenario at home, I’ve been asked to get involved with a discussion about Automated Homes at work. Now I should stress this was without doubt the most painful professional experience of my life – a bunch of “creatives” and “strategists” trying to discuss HA…. and having absolutely sweet bugger all idea of what it is. They obviously have watched Iron Man and decided that J.A.R.V.I.S. was doable on a RPi and wouldn’t it be just fabulous to do it. To be fair, this was almost the same group that I had to help with “gaming” the week before (the second most painful professional experience, although it was the first until this week). That particular meeting started with me having to explain the difference between a console and a PC as a gaming platform, why the XBox (360 & One) weren’t PCs and that Amazon TV wasn’t quite the same as a PS4….. Suffice to say it went downhill from there…..

Anyway, rant aside, one thing I did end up doing as an “action” from that meeting was to compile a list of HA platforms for them to examine (which they will ignore… and then they’ll probably send someone to the US to look at what is available over there, buy a Wink hub and wonder why it doesn’t work anyway…. ). Sorry, you can tell I’m a bit jaded by this whole fiasco.

Bottom line, I ended up looking at the OpenHAB platform again.


Posted: December 16, 2014 in HA
Tags: ,
I’ve been busy…. and things have moved on.
We’ve recently installed a Honeywell EvoHome heating system and apart from a few niggles it has been brilliant. It is amazing how much of a difference you can feel as you walk around the house. Not running the heating upstairs during the day and vice-versa will hopefully save me money in he long term.
The system is expensive…. but it cost me roughly the same amount to install as I spent on gas last year. If I can save even 20% a year, I’ll pay it off in 5 years… and that assumes the gas prices won’t increase. And we all know how likely that is!
More information on the system here and reviews here. Plenty of other reviews are available as well.

HA Issues – MiCasaVerde Revamp?

Posted: November 6, 2014 in HA
Tags: ,

I’m starting to get the hump with the Veralite. The inability of the device to allow for the creation of events comprising 2 or more conditions makes it a bit frustrating. Yes I know I can drop into Lua and programme stuff, but quite frankly, the ability to write a rule that checks for night, movement and then triggers a light if both conditions are true shouldn’t really be that complicated. It wasn’t a problem when PLEG was free, but now that it costs for a certain number of events makes it complicated.

I like the Fibaro take on the ‘scratch blocks’ for event programming, but I don’t like the £500 price that will be incurred. As I’ve now got a Honeywell EvoHome system, the need for a Fibaro to control the heating is even less important.

For various reasons I’m now running a copy of Domoticz on a RPi at work, with another one running at home. While Domoticz is actually designed primarily towards the 433MHz devices and in fact can be purchased with a RFXCom RfxTrx433 device, it also supports z-wave via the OpenZWave library.

It allows for complex event programming via it’s own ‘scratch’ blocks system. It’s very easy to set up multiple condition events and even trigger alerts via email, SMS or mobile device push (Growl, PushBullet etc etc).

I thinking that I might have to exclude a couple of the Z-Wave devices I do have and see how well they work on Domoticz.

Home Automation Adventures

Posted: February 18, 2014 in HA, Hacking and playing
Tags: ,

I couldn’t figure out why it was that the lamp attached to the new dimmer module would be on when I came downstairs in the morning.

I knew that the signal didn’t always get through to the unit as it was temporarily hidden behind a large microwave unit while we wait for the kitchen refurb to be finished. Initial thoughts were that my repeated attempts to test/configure/poll the unit were sending on signals long after I’d gone to bed. But not touching the unit for a day didn’t change the behaviour.

Turned out to be a stupid mistake on my part. The system had joined the dots in my logic and I wasn’t aware of it. While playing with PLEG I set up a set of rules to cover the possibility of the kids getting up to use the toilet at night (night, movement, light level, time and PIR activated). I’d also set up an event of the dimmer to go to 10%. When I’d gone back to test the dimmer I’d inadvertently enabled all the rules, so that when I went upstairs to bed, the conditions had been met and the lamp turned on.

With the hall lamp currently rocking a CFL that can’t be dimmed, the dimmer is controlling a lamp downstairs as part of the testing, so I hadn’t seen the lamp go on when I went upstairs. While this proves that my logic works, it also revealed what I hadn’t done was set up the conditions to turn the damn thing off again!