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
- Timer (fire every second)
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).
First Integrations:
- Weather Updates - Wunderground (need free API Key)
- MQTT connected device
TODO:
Resources
- Jupyter Notebooks
- Presentation about how HASS can be utilized in your life. (Teagan)
- Revolv - purchased by Nest in 2014, production soon ended, and service was ended in early 2016.
- YouTuber with good walk-throughs and working examples. (Bruh)
- Podcast - interview of Paulus Schoutsen on TalkPythonToMe.fm
- PyCon 2016 - talk by Paulus Schoutsen
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
- 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
- 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