Build a unified home automation system

Get the code

Summary

Learn how to create a truly smart home by building a unified interface for interacting with all the connected devices in your home by using the open source Home Assistant project and Watson IoT Platform.

Description

People often have a variety of connected or smart different devices in their homes. These different devices don’t always share common protocols or interfaces. This makes building workflows or automation between devices more difficult. It also means that you often have to interact with several different interfaces to use the devices.

This is where the Home Assistant project comes into play. Home assistant is open source home automation project. It’s designed to be platform agnostic hub for all the different devices you may have in your home (or anywhere really) and provide a unified interface for interacting with all of those devices, and common method for building automation between all the devices.

The Watson IoT Platform provides powerful application access to IoT devices and data to help you rapidly compose analytics applications, visualization dashboards, and mobile IoT apps. This code pattern will describe the process of linking the two together. Enabling you to leverage Home Assistant for connecting all your different devices together behind a shared interface, and then using the Watson IoT Platform to aggregate the data from those devices and enable running analytics on top.

There are two ways that you can connect Home Assistant and Watson IoT Platform:

  1. Leveraging Home Assistant’s built-in MQTT support and writing rules to publish to Watson IoT platform on device updates

  2. Writing a custom module to seamlessly publish devices updates from Home Assistant to Watson IoT platform.

When you have completed this code pattern, you will understand how to:

  • Setup and run Home Assistant
  • Create an instance of the Watson IoT Platform
  • Add devices to the Watson IoT Platform
  • Have Home Assistant report device metrics to the Watson IoT Platform

Flow

Architecture diagram for home automation system using Home Assistant and Watson IoT Platform

  1. Install and use the Home Assistant web or mobile interface to configure Home Assistant.
  2. Connect the IoT devices, IoT hubs, and cloud services to Home Assistant.
  3. Set up Watson IoT Platform.
  4. Create the Watson IoT Platform internal gateway device so that Home Assistant can communicate with Watson IoT Platform.
  5. Connect Home Assistant to Watson IoT Platform.

Instructions

Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README file.