OpenIoT 2016 - Automating Your Home With Home Assistant
OpenIoT 2016 - Automating Your Home With Home Assistant
1
Introduction
● Paulus Schoutsen
Home Assistant · 2
Challenges with the Internet of Things
Home Assistant · 3
What’s the essence of a hub?
Internet of Things
● There are events happening:
○ State of light has changed
○ Motion detected Home Assistant · 4
What’s the core of home automation?
● Rule based.
Rules
Home
● Triggered by an event. User
Automation
Home Assistant · 5
Rules
Home
User Smart Home
Automation
Home Control
Information Commands
(ie. light is on) (ie. turn light on)
Internet of Things
Home automation platform Host it yourself so your Responsive web app that
running on Python 3. data stays yours. runs great everywhere.
Open-source, MIT license. Track people and Track the state of your
things on a map. house over time.
7
Core Architecture State
Machine
Home Assistant · 8
Light Bulb Motion Detector
State changed
Turn on
events
Call service Motion detected
turn light on events Motion Detector
Service Registry Event Bus
Component
Automation
Component
Interaction between Home Assistant core, components and the Internet of Things Home Assistant · 9
There’s a component
for that.
● Device Types (light, switch, etc)
● Presence Detection
● Entity Organization
● Automation
● Record History
● Export Data
● Exports abstract base class (ABC) that connects to Home Assistant core.
○ Defines information to be exposed (is_on, rgb_color, brightness)
○ Defines methods to be called (turn_on, turn_off)
Home Assistant · 11
Example sensor
platform
Create file as:
<config>/custom_components/
sensor/example.py
In configuration.yaml file:
sensor:
platform: example
<config>/custom_components/
switch/example.py
In configuration.yaml file:
switch:
platform: example
file_path: /tmp/ha_switch
<config>/custom_components/
xor_automation.py
In configuration.yaml file:
xor_automation:
entity_1: switch.ac
entity_2: switch.heater
● 1 or more triggers.
● 0 or more conditions.
○ Time
○ Event
○ State
○ Sun
○ Zone (GPS)
○ MQTT
Home Assistant · 15
Thanks for supporting open-source
Home Assistant · 16
Home Assistant
Try the demo on your phone at
home-assistant.io/demo
Home Assistant · 17