I’ve Started Automating My Home Using openHAB2!
Earlier this week I was reading a Geekzone thread where someone asked where they could get Belkin WeMo light switches in New Zealand. I was reading along and suddenly someone mentioned using openHAB to integrate this light switch to create an automated home. I decided to do some research on it and halfway through a week of learning through trial and error, I am now in the midst of coding items, rules and sitemaps to create a nice UI where I can control all the smart devices (IoT) in my home through a single app/user interface.
Now to be fair, I don’t have that many smart devices or Internet of Things in my home at the moment, mainly due to the cost of getting some decent hardware. Things such as the Philips Hue Lighting System, Netgear Arlo Security Cameras, Yale Real Living Deadbolts/Smart Locks are all still pretty pricey at the moment. Then there are the DIY soldering and assembling PCBs such as the ESP8266 board which are cheap to get, but timely to get going. I already managed to lose three whole days dedicated to learning and using the openHAB software, and while there are probably still much more stuff to learn about it, it has currently so far been positively rewarding.
What is openHAB?
Taken from their website:
openHAB is a free, open-source software for integrating different home automation systems and technologies into one single solution that allows over-arching automation rules and that offers uniform user interfaces.
To connect different systems such as the Philips Hue system or the Belkin WeMo system to the openHAB software (which I am currently running on my Synology DS216play NAS with no issues at all), it requires you to download Add-Ons also known as ‘bindings’. These ‘bindings’ allow you to find a thing which will contain one or more items. These items are the “data-centric functional atomic building blocks – you can think of it as a ‘capability’.” An item example could be the toggle switch between on and off on a Hue light bulb, which the Hue light bulb is a thing.
With my openHAB setup at the moment, I have set up lighting items, network presence items, defined some rules and made them accessible in the sitemap. For example, in terms of the network presence items, I have defined a rule to turn on a certain group of lights in my lighting items, after sunset and if I am at home. This means the network presence will continuously ping my phone and if it is successful it knows I am home. This doesn’t come without its flaws though because if I have my phone on sleep, the network presence will soon not be able to ping my phone even though I have “Always On WiFi” enabled. My temporary fix for this was that if I wasn’t actively using my phone, I would put it on charge. This kept my phone pingable in the mean time. If anybody has any idea what setting must be changed on the phone, please do holler out.
There are three main UIs for maintaining and using openHAB. BasicUI is for the end-user to control the home automation software that you’ve already configured and coded, PaperUI is the admin interface to connect all your things together and find items through those things, and HabPanel is a new UI designed by customising widgets to your own liking and basically creating a nice touchscreen interface to put on a tablet for the layperson to use in your home. Configuring scripts can be done by either editing them yourself in Notepad, or by downloading their Smart Home Designer IDE. To date, I’ve been coding my items in Notepad, SSH’d into my NAS using WinSCP. For ease of use and debugging, I may download the Smart Home Designer IDE in the future.
For the future, I hope to be able to grab a few more IoT smart devices to connect up to openHAB such as motion detectors, smart power strips, more smart light bulbs etc. I also hope to grab a smart garage door opener such as this and integrate it into my home automation setup. This specific smart garage door opener is a lot cheaper than other smart garage door openers such as GoGoGate. The only notable difference between the two is the more beautiful UI in GoGoGate. I figured since I was mainly going to be controlling it from the openHAB UI, it didn’t really matter as long as it did the job of opening/closing and stating whether the garage door is open or not.
I will also be focusing my efforts next on trying to design a nice custom UI on HabPanel as per the above pictures.
You cannot learn all of OpenHAB overnight, but if you dedicate a few days with it you will most likely get your head around some of the features and coding required to make things work.
If you have any smart ideas to how I could make my openHAB system even smarter, or can suggest some smart products which I can integrate into openHAB, leave a comment down below! I’d love to hear some of your feedback!