๐Ÿ  Fully documented Home Assistant configuration for a smart-looking place. ๐Ÿ˜Ž Be sure to โญ๏ธ my repo and copy ideas!
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Documentation code cleanup Dec 19, 2018
appdaemon Documentation code cleanup Dec 19, 2018
automations Documentation code cleanup Dec 19, 2018
cameras Documentation code cleanup Dec 19, 2018
custom_components Upgrade to 0.84 Dec 19, 2018
docker Documentation code cleanup Dec 19, 2018
groups Documentation code cleanup Dec 19, 2018
gtfs Documentation code cleanup Dec 19, 2018
lights Documentation code cleanup Dec 19, 2018
misc Documentation code cleanup Dec 19, 2018
notifications Documentation code cleanup Dec 19, 2018
rtl4332mqtt Documentation code cleanup Dec 19, 2018
scripts Documentation code cleanup Dec 19, 2018
sensors Upgrade to 0.84 Dec 19, 2018
switches Documentation code cleanup Dec 19, 2018
themes Documentation code cleanup Dec 19, 2018
www Upgrade to 0.84 Dec 19, 2018
.HA_VERSION Upgrade to 0.84 Dec 19, 2018
.codeclimate.yml Documentation code cleanup Dec 19, 2018
.gitignore Documentation code cleanup Dec 19, 2018
.gitmodules Integrate Fully Kiosk Browser Mar 15, 2018
.mdlrc Documentation code cleanup Dec 19, 2018
.travis.yml Documentation code cleanup Dec 19, 2018
LICENSE.txt Add license Feb 21, 2018
README.md Merge branch 'release/v2018.12.18' Dec 19, 2018
configuration.yaml Upgrade to 0.82 Nov 28, 2018
custom_ui_update.sh Upgrade to 0.72 Jun 25, 2018
customize.yaml Upgrade to 0.83 Dec 7, 2018
customize_glob.yaml Automate HomeKit start-up Dec 16, 2018
docker-compose.yml Upgrade to 0.84 Dec 19, 2018
markdownlint.rb Documentation code cleanup Dec 19, 2018
secrets-dummy.yaml Monitor printer consumables Aug 22, 2018

README.md

๐Ÿ 
Home Assistant configuration for a smart-looking place!
by Renรฉ-Marc Simard ๐Ÿ˜ƒ

Price License Home Assistant version Hass.io GitHub Release Build Status Tweet

Configuration for Home Assistant running Hass.io on a Raspberry Pi for a one bedroom apartment, offering convenience automations over lights and climate while providing multiple intuitive user controls.

Be sure to โญ๏ธ my repo if you find it useful! ๐Ÿ˜ƒ

Dashboard animation

Wall-mounted interface using /appdaemon/dashboards/.

Security group (Dark theme) Weather group Climate Control group Battery Levels group (Dark theme) Atmospheric Safety group Actions group Ceiling group Public Transit group

Sensor /groups/.

Table of contents ๐Ÿ“‘

  1. TL;DR
  2. Overview
    Goals | Agile development
  3. Key features
    Climate control | Weather report | Lighting control | Presence and basic security | Modes and scenes | General information | Additional human interfaces
  4. Setup
    Supporting hardware choices | Configuration | Systems and bridges | Physical devices | Software | Usage
  5. License
  6. Thanks

TL;DR ๐Ÿƒ

This is a fully documented working configuration for Home Assistant, with screenshots, hints and comments. Browse the code to have a look! ๐Ÿ‘€

๐Ÿ”

Overview ๐ŸŒ…

Goals โšฝ

  • Inconspicuous: I love tech alright, but like any good butlers it should stay out of sight yet stay summonable. Think Fiji villa, not server room.
  • Modular: Both code and devices should be easily replaceable.
  • Internet independent: As much local processing as possible for the essential features.
  • Accessible through multiple ways: Computers, tablet (kiosk), voice, smart phones, wireless buttons, remotes.
  • Intuitive user interfaces: One look at a group of sensors/switches should be sufficient for anyone to understand the current states and how to operate an interface. ๐Ÿ’ก
  • Redundant controls: Multiple interfaces should be able to control devices without interference. State changes from manual interventions or dedicated manufacturer apps should be tracked whenever possible.
  • No information overload: Provide just enough insights to get an idea of what's going on. And no need for data that's best consumed on more interactive devices (like stock prices, Steam community statusโ€ฆ)
  • Not everything should be networked: Bathroom fan, pantry and laundry room lights have their independent motion sensors and that's a good thing. Same independence goes for the smoke detector: I sure don't want to require extensive skin grafts because I forgot an extra space in a YAML file. ๐Ÿ˜ฑ
  • No Alexa/Cortana/Google Voice: I don't want to have advertising agencies, online stores, or other AI-feeding Big Brother tech-monsters listening in to everything we say and do just for the dubious convenience of toggling lights by voice command. Privacy-centered, offline voice-control solutions like Mycroft and Snips look far more appealing.
Wiretap meme

๐Ÿ˜จ No thanks!

๐Ÿ”

Agile development ๐Ÿ––

This configuration is built with an Agile-like methodology, lead by following main user stories:

  • As a resident I want a reliable home automation platform to handle lights and climate that can easily be controlled and overridden in many intuitive ways.
  • As an apartment dweller I want to have a discrete, non-permanent installation that takes as little space as possible.
  • As a developer I want to use an open-source platform that is feature-rich, accessible, flexible and actively maintained.
  • As a consumer I want to pick and choose which devices I wish to acquire without necessarily being locked into a closed ecosystem.
  • As a couple we want to be able to operate lights and climate-control appliances as well as get quick overview of weather forecasts and public transit schedules through simple to use interfaces.

Tasks are defined in the issue queue and the development progress is managed using a lightweight Kanban board.

๐Ÿ”

Key features โœ…

Climate control ๐ŸŒก

  • Temperature monitoring, averaged and rounded to compensate for sensor calibration issues.
  • Humidity monitoring, also averaged and rounded.
  • Toggle dehumidifier when needed, based on humidity averaged from multiple sensors, and only during the afternoon so not to bother anyone.
  • Turn dehumidifier off when windows/doors are opened, instantly for windows and after a few minutes for doors.
  • Low/High humidity status and alerts, in case something is wrong with the dehumidifier or the humidifier.
  • Mold conditions status and alert, in case dehumidifier is full/overwhelmed or someone transformed the place into a steam room.
Climate Control group Humidity notification

Climate control.

๐Ÿ”

Weather report โ›…

  • Easy to read status and forecasts using Dark Sky data and only showcasing parameters that actually matter, shown in obvious ways.
  • Outdoor quality monitoring with numeric levels and human-friendly categorization for ozone, carbon monoxide, nitrogen dioxide, sulphur dioxide, 2.5ฮผm particulate matter and UV light, averaged from multiple surrounding public local stations.
  • Weather radar and satellite maps for local rain and snow from Environment Canada and regional air masses from the U.S. National Oceanic and Atmospheric Administration.
  • See /groups/ and /appdaemon/dashboards/.
Today's Weather group Weekly Forecast group

Today's weather and weekly forecast.

๐Ÿ”

Lighting control ๐Ÿ’ก

  • Control for all pluggable lights, smart ones at /lights/ and basic ones using /switches/.
  • Nanoleaf Aurora control:
    • Manual theme selection.
    • Automatically rotate through device-based themes based on time of day (unless manually selected above).
  • LIFX Z bed underglow lights and ceiling wash lights control:
    • Manual theme selection.
    • Automatically rotate through cloud-based themes based on time of day (unless manually selected above).
  • Automatically correlated colour temperature (CCT), for f.lux-like white temperature shift to gradually remove blue light based on a custom colour and brightness curve, not simply based on the sun โ€ฆotherwise Canadian winters would be quite yellow!
  • Motion-based nightlights, where strategic lights fade in, dimmed very low, when movement is detected at night, say when someone wakes up to go the bathroom โ€ฆagain.
  • See /lights/ and /automations/.
Lounge group Bedroom group

Lighting controls.

๐Ÿ”

Presence and basic security ๐Ÿ‘ฎ

  • Cellphone device sensing, to check who is currently home or away.
  • Tamper monitoring, in case a perimeter device has been played with.
  • Water leak monitoring, to be able to react quickly when a pipe breaks.
  • Opened door alert, to know if someone left an exteral door open.
  • Opened door indicators where a chime is played and a few lights change colour briefly and subtly when the front door opens/closes, say to indicate an oblivious showering partner that their better half has left or just came in.
Presence group Security Status group

Presence and basic security.

๐Ÿ”

Modes and scenes ๐ŸŒˆ

  • Mode based where unless a blocking mode is set, devices will turn on. Think of a river or a horse: tame it to keep it under control, but release the restraints and they will do their thing: ๐ŸŽ
    • Quiet mode where noise makers know to stop or not to start.
    • Nap time mode that fades out lights in and near the bedroom and enables quiet mode.
    • Night mode fades out all lights outside of bedroom, enabling quiet mode too.
    • Low-power mode where each room knows which device should be on or off to achieve a more economical and calm state.
  • Smart rooms that know which devices should be on or off based on the modes above. No need for heavy centralized control, let local managers handle their teams!
  • Good morning action that releases all blocking modes, allowing all lights to turn on gradually, and noise-making devices are allowed to run if needed.
  • Smart global scenes based on /scripts/ instead of scenes, to allow for sequences and conditions:
    • Movie scene turns on ambiance lighting and dims smart lights when playing a movie, then returns to standard automations when pausing/stopping.
    • Daylight/Gaming/Romantic global scenes fade in and out different lights, select effects and change light colours to set a perfect mood.
Actions group

Modes and scenes.

๐Ÿ”

General information ๐Ÿ›Ž

  • Local bus schedules with the next 3 departures. See /gtfs/ for optimization hints.
  • Doomsday Clock in case egocentric psychopaths keep on playing Russian roulette with humanity's future.
  • Network status monitoring for latency, upspeed, downspeed, and monthly consumption.
  • Home Assistant status monitoring for geek cred with average load, RAM use, disk use, uptime, and update availability. ๐Ÿค“
  • Daily audio greeting to start the day on a informed, uplifting note. See /automations/notifications/.
System group Public Transit group

General information.

๐Ÿ”

Additional human interfaces ๐Ÿ“ฒ

  • Aeotec Minimote to quickly control global scenes and modes.
  • Flic buttons on nightstand and in the kitchen for triggering modes and controlling localized lights, depending on current states and click types.
  • HADashboard for wall-mounted tablet, featuring indoor sensors reports, transit schedules, weather forecast and radar/sattelite maps, wrapped in an obvious navigation scheme for much UX goodness. Have a look at /appdaemon/dashboards/, you'll like! ๐Ÿ˜
  • Home Assistant Companion iPhone app for full UI access in the palm of my hand. Muahahaha!
  • HomeKit for using some key sensors and devices with iPhones.

๐Ÿ”

Setup ๐Ÿ”ฉ

Home Assistant technology diagram

Technology diagram (PNG, SVG). Made with Draw.io (XML source file).

๐Ÿ”

Supporting hardware choices ๐Ÿงฑ

  • Ubiquiti router and access point because forking over some dough for reliable, rock-solid prosumer networking gear makes everything run smoothly. And because hearing one less complaint (dropped WiFi signal) from the girlfriend is priceless. ๐Ÿค•
  • Uninterruptible power supply to ride over transient power failures.
  • WiFi for its cheapness, omnipresence and non requirement of vendor-specific hubs.
  • Z-Wave for reliability and guaranteed interoperability between vendors (unlike Zigbeeโ€ฆ)

๐Ÿ”

Configuration โš™

  • Dedicated, firewalled VLAN (Virtual LAN) to segregate all IoT devices from other equipment โ€ฆbecause I cannot trust that my vacuum cleaner won't go on a killing spree. Ever seen Runaway (1984) with Tom Selleck? Eek! ๐Ÿ˜ฑ
  • Local static IPs for all devices to minimize random drops.
  • Local development on a local virtual machine using Docker, then pulled with GIT on a Raspberry Pi.
  • Plentiful documentation, for my later self and to help out others.
  • Shareable code with all identifiers kept in a non-committed, secrets file.

๐Ÿ”

Systems and bridges ๐ŸŒ‰

๐Ÿ”

Physical devices ๐Ÿ”จ

Lights ๐Ÿ’ก (see /lights/)

๐Ÿ”

Sensors ๐Ÿ“ก (see /sensors/)

๐Ÿ”

Human interfaces ๐Ÿ•น๏ธ

๐Ÿ”

Switches and other devices ๐Ÿ”Œ

๐Ÿ”

Software ๐Ÿ’ป

  • Docker on local machine (for development). True, Hass.io is Docker-based tooโ€ฆ ๐Ÿ˜‰
  • Fully Kiosk Browser on wallmounted tablet for display and input.
  • Hass.io on Raspberry Pi 3 Model B+ (production setup).
  • LANnouncer on wallmounted tablet for simple audio and text-to-speech messaging.

๐Ÿ”

Hass.io add-ons โž•

๐Ÿ”

Community components and widgets ๐Ÿ˜๏ธ

๐Ÿ”

Usage ๐Ÿ“˜

In an empty directory, type:

git clone --recurse-submodules git@github.com:renemarc/home-assistant-config.git .

echo "secrets.yaml filter=secret merge=keepMine" > .gitattributes

cp secrets-dummy.yaml secrets.yaml

cp appdaemon/secrets-dummy.yaml appdaemon/secrets.yaml

Actual secrets and auto-generated sensitive files are obviously kept off this repo! ๐Ÿ˜‰

๐Ÿ”

License ๐Ÿ“ƒ

๐Ÿ”

Thanks ๐Ÿ’•

Kudos to:

  • The dedicated core team that builds and manages Home Assistant. They work fast and humbly.
  • The horde of volunteer developers of all components and add-ons.
  • The vibrant community, always willing to help and share code samples.
  • The BRUH Automation YouTube channel, Ben's videos got me hooked on using Home Assistant.

Thank you for all your dedication, helpfulness and valuable insights. Cheers! ๐Ÿป๐Ÿ˜ƒ

๐Ÿ”

Don't forget to โญ๏ธ this repo! ๐Ÿ˜ƒ