Home Assistant

  • demo
  • Uses Python 3 (asyncio)
  • Open-source, MIT License
  • Self hosted
  • Track locations on a map.
  • Track the state of your home.
  • Built-in components and platforms: 791

Architecture

  • Event Bus
  • State Machine
    • ID, State, Attributes, Last Updated, Last Modified.
  • Service Registry
    • Abilities of entities.
  • Timer (fire every second)
    • Time-based components.

Terminology

  • Sensors - many possible values.
  • Switches - typically on/off.
  • Entities - customize: icon, friendly-name, hidden, initial_state, etc...
  • Triggers - start the processing of an automation. (link)
  • Groups - logical preference. (link)
  • Views - group of group(s) displayed as a tab. (Default View = "default_view")
  • Scenes - pre-configured states for entities. (link)
  • Scripts - pre-configured actions for automation. (link
  • Templates - control/form/filter data going to/from (uses Jinja2).

In [ ]:

First Integrations:

  • Weather Updates - Wunderground (need free API Key)
  • MQTT connected device

TODO:


Resources


Home Assistant on a Raspberry Pi

Requirements:

  • Raspberry Pi (3 or 2 Model B)
  • SD Card - at least 8 GB
  • Raspbian OS (or the newer recommended Hass.io)

Installing Rasbian

Detailed instructions

Download and Configure

  • RaspberryPi.org
  • Choose "with Desktop" to get a GUI for the OS.
  • Update pi: $ sudo apt-get update && sudo apt-get upgrade -y
  • Configure pi: $ sudo raspi-config
    • Expand the file system (take up all of the SD card)
    • Set timezone
    • Reboot

Extras

  • Samba (Windows) - access pi files from Windows Explorer
  • DuckDNS (free) - give your IP address a name
  • Let's Encrypt (free) - give you new domain name a certificate (90 days)

Installing Home Assistant

Detailed Instructions

  • Dependencies
    • $ sudo apt-get install python-pip3 python3-dev
    • $ sudo pip3 install --upgrade virtualenv
  • Create User
    • $ sudo adduser --system homeassistant
    • $ sudo addgroup homeassistant
  • Switch to User
    • $ sudo su -s /bin/bash homeassistant
  • Set up Virtual Environment
    • $ virtualenv -p python3 /srv/homeassistant
  • Active Virtual Environment
    • $ source /srv/homeassistant/bin/activate
  • Install Home Assistant
    • (homeassistant)$ pip install homeassistant
  • Run Home Assistant
    • $ sudo -u homeassistant -H /srv/homeassistant/bin/hass

Operating Home Assistant

  • localhost:8123
  • Always Verify your Configuration file!

Customize