Control a wide range of IoT devices using Python on Raspberry Pi, iOS, and Android
Overview
Home Assistant automates homes with rules such as “turn on the porch lights when the sun sets”, etc.
Demo
At https://demo.home-assistant.io Home Assistant presents a clickable dashboard such as:
Previously:
- Demo of Home Assistant integration with Google Assistant by Paulus Schoutsen
Architecture
Home Assistant consists of custom Python 3 scripts running on a Raspberry Pi machine board powered by HassOS (instead of Raspian) operating system. Hass is Docker-based, so one-click update is available.
- Cheaper SD cards degrade over time.
- Upgrade processing power by running on Intel NUC (Next Unit of Computing) mini PCs (models i3/5/7/9) at several hundred dollars on Amazon.
It’s open sourced since 2016 by Paulus Schoutsen, founder, at https://github.com/home-assistant/home-assistant.
Unlike Samsung’s SmartThings Hub and other cloud-based services, Home Assistant does not send data out to the internet. So you have total data privacy and less lag while watching Netflix, perhaps in a home on wheels.
- “Presence detection is a big input … There’s a lot of things that you don’t want to happen if you’re not at home” [13:10] in No Privacy Compromise Home Automation Jun 9, 2017 by Jupiter Broadcasting. “Wi-Fi router can detect your location”
Home Assistant uses the MQTT protocol and supports over 1,400 devices – just about every type of Smart Home device from Google Home, Alexa, Apple HomeKit, Nest, Ecobee, Z-Wave, Hue, Lifx, Belkin WeMo, IKEA Trådfri, Sonos, etc.
- HomeBridge to integrate with Apple HomeKit.
- To communicate with Z-Wave devices, plug in a USB stick that talks that protocol.
- Lifx responds with status, where Phillips devices need to be polled.
Most IOT projects that use the ESP8266 or ESP32 can be tied into this system as easily as connecting to Adafruit.io, IFTTT, or Samsung Smart Hub.
But Home Assistant’s Smart Home Hub also eliminates the (annoying) need to installing multiple apps to control devices.
The iOS & Watch app by Robert Trencheny uses the Home Assistant Cloud. But alas, Apple does not allow it within the US.
Paulus Schoutsen https://www.youtube.com/watch?v=Cfasc9EgbMU at Pycon 2016
Install on Raspberry Pi
Home Assistant is not “plug-and-play” software.
-
Review my article IoT Raspberry Install
-
Download from https://www.home-assistant.io/hassio/installation the latest version, such as:
hassos_rpi4-64-3.5.img.gz
-
Instead of going to https://www.balena.io/etcher
brew install --cask balenaetcher
- Burn 64GB chip using Etcher.
- Power up the Pi.
- http://hassio.local:8123
Alternately, https://github.com/home-assistant/hassio-installer
How to set up Automations in Home Assistant tutorial
Getting Started with Home Assistant Part 7 Customising the UI by Hive Mind Automation
HomeAssitant Dashboard Creation by misperry using the Lovelace UI: https://www.youtube.com/watch?v=QEtX0uboxQA
Data Science
Use JupyterLab to analyze your data at https://data.home-assistant.io/docs/quick_start_index using https://github.com/home-assistant/home-assistant-notebooks
Resources
https://learn.adafruit.com/set-up-home-assistant-with-a-raspberry-pi?view=all
JuanMTech YouTube video channel
https://github.com/geekofweek/homeassistant who also has a fork of Nolan Gilley’s https://github.com/geekofweek/python-ecobee-api
Interview with Paulus Schoutsen on Home Assistant
VIDEO: Home Assistant Beginners Guide: Installation, Addons, Integrations, Scripts, Scenes, and Automations by The Hook Up
Competitors
https://uriotnews.com/iot-around-the-house-sensors-mongodb-and-rest-api-on-the-onesait-platform-part-2/ from Spain https://github.com/onesaitplatform
ioBroker, but its available only in Germany!
https://www.youtube.com/watch?v=rXc_zGRYhLo “I found an Excellent Raspberry Pi Replacement for Home Assistant / IOTstack (incl. Proxmox)” by Andreas Spiess
More on IoT
This is one of a series on IoT:
-
IoT Acronymns and Abbreviations on Quizlet
- IoT Apprentice school curriculum
- IoT use cases
- IoT reminders prevent dead mobile battery
- IoT text to speech synthesis
- IoT AWS button
- Intel IoT
- IoT Raspberry hardware
- IoT Clouds
- Samsung IoT Cloud
NOTE: Pages about GE’s Predix have been removed.