My Home Assistant configuration files
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
alarm Automated update at 2018-07-14 20:03 Jul 14, 2018
alerts Automated update at 2018-02-23 21:44 Feb 23, 2018
automation Automated update at 2018-11-17 20:03 Nov 17, 2018
binary_sensors Automated update at 2018-10-09 16:03 Oct 9, 2018
camera Automated update at 2018-01-16 08:03 Jan 16, 2018
climate Automated update at 2018-07-11 12:03 Jul 11, 2018
custom_components Automated update at 2018-05-31 12:03 May 31, 2018
device_tracker Automated update at 2018-10-24 20:03 Oct 24, 2018
etc/nginx/conf.d Automated update at 2018-11-10 17:56 Nov 10, 2018
hadashboard Automated update at 2018-09-01 16:03 Sep 1, 2018
history_graph Automated update at 2018-02-24 12:03 Feb 24, 2018
input_boolean Automated update at 2018-10-08 12:03 Oct 8, 2018
input_number Automated update at 2018-02-23 22:06 Feb 23, 2018
input_select Automated update at 2018-08-14 16:03 Aug 14, 2018
intent_scripts Automated update at 2018-02-23 22:06 Feb 23, 2018
light Automated update at 2018-10-10 21:00 Oct 10, 2018
local/bin Automated update at 2018-07-11 12:03 Jul 11, 2018
media_player Automated update at 2018-08-12 10:46 Aug 12, 2018
notify Automated update at 2018-10-10 00:03 Oct 10, 2018
panel_iframe Automated update at 2018-10-21 00:03 Oct 21, 2018
panels Automated update at 2018-09-06 20:03 Sep 6, 2018
proximity Automated update at 2018-10-03 15:51 Oct 3, 2018
scenes Automated update at 2018-09-17 20:03 Sep 17, 2018
scripts Automated update at 2018-11-11 16:03 Nov 11, 2018
sensors Automated update at 2018-11-11 16:03 Nov 11, 2018
shell_commands Automated update at 2018-02-23 22:06 Feb 23, 2018
switch Automated update at 2018-10-19 12:03 Oct 19, 2018
weather Automated update at 2018-10-30 00:03 Oct 30, 2018
www Automated update at 2018-07-23 00:03 Jul 23, 2018
LICENSE Initial commit Sep 18, 2017
README.md Automated update at 2018-10-22 20:03 Oct 22, 2018
automations.yaml Initial commit for configuration upload Sep 18, 2017
cloud.yaml Automated update at 2018-10-13 20:03 Oct 13, 2018
configuration.yaml Automated update at 2018-10-13 12:03 Oct 13, 2018
customize.yaml Automated update at 2018-10-13 12:03 Oct 13, 2018
floorplan.html Automated update at 2018-01-19 18:34 Jan 19, 2018
floorplan.yaml Automated update at 2018-10-20 20:03 Oct 20, 2018
frontend.yaml Automated update at 2017-11-20 04:03 Nov 20, 2017
google_assistant.yaml Automated update at 2018-03-23 00:03 Mar 23, 2018
groups.yaml Automated update at 2018-10-24 20:03 Oct 24, 2018
new-ui-lovelace.yaml Automated update at 2018-07-12 16:03 Jul 12, 2018
ui-lovelace.yaml Automated update at 2018-11-02 00:03 Nov 2, 2018
zwave_device_config.yaml Automated update at 2018-01-20 20:03 Jan 20, 2018

README.md

Home Assistant (0.80.0) configuration

This is my Home Assistant configuration, I'm currently running 0.80.0. It is installed on a Raspberry Pi 3, using the old All in One installer (effectively a manual install like this, on a 16 GB card, that I've upgraded to Python 3.6. I use a Razberry board for Z-Wave control.

To limit the risk brought by SD card corruption (a known risk with Pi3) I store the Home Assistant database on a USB stick, and use a multi-port USB charger with sufficient power for all ports, but have left one unused. The power cables are short, and high quality, to minimise issues with voltage drop. Of course, I also take many different backups to reduce the risk of losing anything.

This is one of a number of Pi3s I've got, and they're all in a Multi-Pi stackable case, to keep the footprint down. They share an HDMI cable to a nearby monitor, and an old USB keyboard I've got kicking around, because having a Pi fail to respond isn't that uncommon.

Each directory has a short readme explaining what's in there, and the purpose of each file or group of files.

On the Pi itself I run

  • Home Assistant
  • Floorplan for a high level overview
    • Screenshot of floorplan
    • Showing:
      • The blue bin is being collected tomorrow (yellow outline), and the brown bin in 2 or more days (green outline). The grey bin isn't currently scheduled for collection.
      • The background lighting in the lounge is on, as is the light by the house number.
      • The utility door is open, and the garden lights are on. Other exterior doors are closed.
      • The TV and Chromecast are off, as are the Sonos speakers.
      • The TV and X-Box in the family room are on.
      • All the mobiles are home, as is the tablet.
      • Oh, and the printer isn't yet low on consumables.
    • The floorplan was created in Inkscape, by importing the image of the house's floorplan from the purchase paperwork, then drawing over it. If you look at it you'll see that I built it up in layers, one for the foundation (ground), one for the structure, and one for the sensors. I don't really use those currently, other than to ensure that the right things are on top (sensors).
  • nginx to provide remote access, in conjunction with Let's Encrypt

I used to run the following, but don't any more:

  • HA Dashboard for a "finger friendly" interface, but it's been replaced by the new Google Home app
    • Screenshot of HA Dashboard

The devices, services, and software I use (with HA)

  • Sandisk Extreme micro SD cards
  • Z-Wave
    • Z-Wave.me Razberry Z-Wave board - it has the advantage of not using a USB port, but does require that the onboard Bluetooth is disabled
    • Aeotec MultiSensor 6
    • Fibaro motion sensor in the living room
    • Fibaro FGK10x door sensors (previous generation, superseded by the FGDW-002) on the garage doors
    • Sensative door/window strips on the external house doors
    • TKB TKB TZ69E - metering wall plugs
    • Foxx Project Smart Switch (which identifies itself as an Aeotec ZW075, aka Smart Switch Gen5). These are cheap, but there's no local switch control for the attached device. Mostly I'm using these as range extenders.
    • NodOn Octan Remote in the master bedroom to provide manual control of the Yeelight. It was originally used by the kitchen door, where the next item is now mounted.
    • NodOn Soft Remote in the second bedroom, to also provide manual control of that room's Yeelight.
    • Z-Wave.me WALLC-S wall controller, to provide a wall switch for the garden lights
  • Lighting
    • Yeelight component and led strips, one mounted behind the headboard in the master bedroom, and one along the wall side of the bed frame in the second bedroom. These provide good enough lighting to read by at night, and also to help wake us in the morning.
    • Outdoor mains 240V LED strip which we turn on and off with one of the wall plugs
    • Philips Hue compatible LED strips built following this guide, using the Gledopto GL-C-008 RGB+CCT LED Controller, a roll of RGB-CCT LED tape, and a 24V power supply
    • Philips Hue bridge (v2)
  • Google Home Mini, with the Google Assistant component
  • Media
  • Notifications:
    • HTML5 push, alongside Pushover for lightweight notifications to phones/tablets, and for rich notifications I'm experimenting with Slack
    • LaMetric for notifications "in person", and it's a clock the rest of the time
    • TTS with the Google Home Mini's, Sonos, and Squeezeboxes
  • Presence detection:
  • TransportAPI for information on the local train service with the UK transport component
  • DarkSky for weather data, alongside the Met Office, along with the associated sensor components
  • Plex for watching media, on TV, tablets and mobiles. I don't currently use the component
  • Xbox Live sensor which uses the XBoxAPI to track when one of us is on the XBox
  • Google Travel Time component which uses the Google Distance Matrix to provide estimated time to home
  • Getmail with a script that acts as the message delivery agent, to parse the recycling collection emails
    • I gave up on the the IMAP email content sensor since it doesn't keep state through restarts (which isn't unique to it, Home Assistant doesn't have a persistence mechanism other than for the input_* entities)
  • A HiWatch IPC-T140 dome camera, using the generic camera component. It's a 4K camera, and the Pi3 can't keep up when I use the FFMPEG component. I use the camera's built in motion detection, writing to a 200 GB SMB share (there's a firmware issue apparently, if the share is above that the camera gets confused and won't write).

Other software

  • PiVPN for remote access to my network
  • Pi Hole for blocking those pesky adverts
  • netdata so I can keep an eye on the performance
  • rpi-clone for bootable backups
  • rclone for offsite backups
  • rsnapshot runs on another system, and pulls backups

Presence detection

  • If you were following along, you'll note I use three different device trackers, two for home (nmap, bluetooth) and one for away (GPSLogger). I explain more about this here, with an update here, and another update (there will probably be a third update). Short version - I don't use groups, or merge the trackers. Both of those approaches have major shortcomings, for the first if you have a misbehaving sensor that's stuck at home you'll never be marked as away. For the second, the last one to update wins, so you can flip flop between two states. I'm experimenting with the Bayesian sensor and some automation logic - so far it's the automation logic that's winning for me.

Notes

  • These are (automatically) modified versions of my actual configurations
  • The goals with Home Assistant have been:
    1. Minimise human actions, and where that isn't possible streamline those human actions
    2. Provide voice control where the automations don't get it right (but try to fix that)
    3. Have a minimal UI (HA Dashboard currently) to provide manual control

Future plans

A large amount of this will require a rewire of the lighting circuits, so that all the light switches have a neutral wire.

Devices

  • Dimmer modules at most light switches, the exception will be the toilet (since there's a fan linked to it) and the outside light
  • Switch modules for the extractor fans
  • Multisensors (light/motion/humidity/temperature) in the bedrooms and bathrooms
  • Multisensors (light/motion/temperature) in all other rooms
  • Lots more door and window sensors, including on the garden gate
  • Some form of distance sensor (ultrasonic or laser) in the garage
  • BLE beacons
  • Digital LED strip for the front of the garage, based upon the Bruh Automation work
  • Analogue LED strips (likely with a Z-Wave controller) for accent lighting and pathway lighting

Automation thoughts

  • Turn on extractor fans when the humidity is more than 5 points above the adjacent room, turning off once they drop to within 5 points
  • During darkness, if a bathroom door is opened, turn the bathroom light on at a low level, turning up to medium when the door closes, turning it off when the person leaves
  • Turn on the outside front light when the front door opens, the doorbell rings, or somebody is less than 5 minutes away, and coming home
  • Other than bedrooms, when the room is in darkness and there's movement turn on the light at a very low level
  • During daytime, if the lights are on for too long turn them off
  • Seasonal use of the digital LED strip
  • Flash the relevant section of the LED strip red if the garage door is opening or closing

Useful links

  • Home Assistant documentation and component list
  • Problems with Z-Wave delays and inconsistencies? Try this script in the dev-states section and you'll see if you've problem devices - shown by an RTT value of 1,000 or more, and retries significantly more than other devices
  • My blog on home automation and other things

Coffee

If I've helped you, and you really want to, you can buy me a coffee, but don't feel obliged - I'm not doing this for free coffee ;)