IoT: Revolutionizing your home

In the previous post I briefed about IoT and Eclipse IoT. In this post I will explain about home automation and Eclipse SmartHome which is a framework of Eclipse IoT.

Home automation:

Since the beginning of technology, people started automating things and we have come to a point where most of the work is being done with the help of automated machines. Now is an era of automating the automated machines so that they can behave according to external conditions and choice of a particular person. Home automation is part of this evolution. From Wikipedia:

Home automation is the residential extension of building automation and involves the control and automation of lighting, heating, ventilation, air conditioning (HVAC), appliances, and security. Modern systems generally consist of switches and sensors connected to a central hub sometimes called a “gateway” from which the system is controlled with a user interface that is interacted either with a wall mounted terminal, mobile phone software, tablet computer or a web interface.

Home automation: present scenario

Currently the market of home automation systems and IoT gadgets is heavily fragmented. Many big organizations are creating devices for home automation and using their proprietary protocols for connecting those devices to rest of the world. Let’s consider a few such devices:

  • iHome’s SmartPlug is a wifi-enabled SmartPlug. We can connect products such as lamps, fans, or humidifiers into its socket and control them remotely while we’re home or even while we’re not.
  • netatmo’s Weather Station provides weather information of home as well as outside. Its Indoor module measures indoor comfort and provides vital information, alerts us when we need to air out our home to bring down its pollution level. Its outdoor module gives us real-time weather information gathered right at our doorstep.
  • Sonos’s Smart Speaker can stream all our favourite music to any room or every room.

All these devices come with companion apps for Android and iOS platforms and we can communicate with these devices using their respective apps. This way we can control these devices or devices can notify us on occurrence of various events.

Home automation: future

Do you really think the above mentioned system is automated?

Actually it’s not, let me tell you how. In the above scenario, there is no interaction between devices and we need to control all the devices ourselves. Wouldn’t it be nice for us if all of these devices could communicate with each other and react accordingly.
So, for example, if humidity in the room drops below a certain level, weather station could notify it to smart plug and the smart plug could automatically switch on the humidifier. Similarly if air quality is bad, weather station could tell this to Sonos speaker and speaker could actually tell us ‘Hey! better open the window now’.
This way we don’t have to do that ourselves as it could all be automated. It is possible by one of the following two ways:

  •  We can define some universal standards that all devices should implement so that everything is compatible with each other. It’s a nice idea but the problem about this idea is that too many people believe in it and are trying to implement it, which results in:
Standards Proliferate

Courtesy: http://xkcd.com/927/

  •  We need some framework which makes interaction possible across devices and protocol boundaries by creating an abstraction layer over the proprietary solutions. Eclipse SmartHome is one such project.

Eclipse SmartHome:

Eclipse Smart home is an open source project to build Smart Home Gateways. It accepts the fact that there is a vast variety of communication mechanisms for home automation devices, which all have their right to exist so it provides an abstraction and translation framework that makes interaction possible across system and protocol boundaries.Its aim is to provide a simple drop-in server where devices can be connected and driven from a user interface, whilst allowing a general mechanism to control all devices. Although many of these devices may have their own mobile applications but they cannot be integrated together. Using SmartHome as the main hub, the devices can all be controlled with one mobile application or website, and scripts can be set up to drive individual components. Following is the high level interaction model:

Eclipse-SmartHome-29

In this system, physical components like Philips Hue bulb, Sonos speaker etc are represented as OSGi bundles, they all communicate over an event bus, which means that anyone can plug in scripts or bundles that can listen to changes in the environment and modify its data. A persistent item state map builds up a view of the system which changes as the system evolves, which can be used to query the current state of the system instead of just dealing with event-based triggers.

Eclipse SmartHome is a framework(comprised of a set of OSGi bundles), not a ready-to-use solution. It offers a large set of features to choose from and leaves enough possibilities to design a smart home solution specific to our expectations. OpenHAB is one such ready-to-use implementation of Eclipse SmartHome.

OpenHAB (Open Home Automation Bus):

openHAB is an open source software for integrating different home automation systems and technologies into one single solution that allows comprehensive automation rules and offers uniform user interfaces. It is designed to be vendor-neutral as well as hardware/protocol-agnostic and can run on any device that is capable of running a JVM (Linux, Mac, Windows, Raspberry-pi). It comes with different web-based UIs as well as native UIs for iOS and Android.
It focuses on four different functional blocks:

  1. Discovery, setup and configuration: OpenHAB provides a feature to discover different home automation devices available nearby and connected on same LAN. For discovering and controlling these devices, it uses their respective OSGi bundles.
  2. Rule Engine automation: openHAB has a highly integrated, lightweight but yet powerful rule engine included. “Rules” are used for automating processes: Each rule can be triggered, which invokes a script that performs any kinds of tasks. We can define rules to control the devices so that they can react based on environmental conditions and/or our personal choice. An example of rule can be: Light is turned on when there is motion detected and brightness is below threshold. Every one minute, it is checked whether there was motion since the last check, if not then turn light back off.
  3. Data Handling, REST APIs and Persistence: OpenHAB provides mechanism to store data related to devices, expose information to a REST API and send it to a cloud database for further processing.
  4. Modes of interaction: It provides graphical user interfaces for web and mobile devices. It also enables user to interact with devices using voice commands so we can directly use our iOS devices and can use Siri to talk to our home and take control of the things.

To summarise, Eclipse SmartHome and OpenHAB are very modular and extensible home automation solutions which have already started revolutionizing our home although they still have a lot of potential to grow in the near future. You can further explore Eclipse SmartHome and OpenHAB.

Leave a Reply

Your email address will not be published. Required fields are marked *