Awesome
Home Assistant (0.111.4) configuration
This is my primary Home Assistant Core configuration, This instance is running 0.111.4 on a VM, using Proxmox on an old laptop (Intel Core i5-3230M), the VM has two cores and 2 GB of RAM allocated. I use a manual Python virtual environment install following this guide.
Each directory has a short readme explaining what's in there, and the purpose of each file or group of files.
Z-Wave
My Z-Wave stack runs 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. The configuration for that instance can be found here.
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.
The key software I run is
- Home Assistant
- Floorplan for a high level overview
- Showing:
- No bins are due for collection otherwise they'd have a yellow outline (collected tomorrow) or red outline (collected today)
- The living room and family room are occupied
- The front door is open, motion has been detected in the downstairs hall, and two windows upstairs is open
- The TV is on in the living room
- The TV in the family room is on
- All the mobiles are home, as is the tablet, and the car
- The office is a bit warm (red temperature), and the humidity in the bathroom and master en-suite is a little high (amber)
- Oh, and the printer isn't a little 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).
- Showing:
- nginx to provide remote access, in conjunction with Let's Encrypt
- Mosquitto for the MQTT broker
- MariaDB for the database
The devices, services, and software I use (with HA)
- Sandisk Extreme micro SD cards (for the Z-Wave Pi)
- 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
- Zigbee, using Zigbee2MQTT running on another system
- A CC2531 coordinator bought from here
- A Zig-A-Zig-Ah! for a new Zigbee 3.0 mesh
- Xiaomi Aqara door/window sensor - one on every external window (yes, that's a lot)
- Xiaomi Aqara motion and light sensor
- Xiaomi Aqara temperature and humidity sensor in the bathrooms
- Gledopto GL-C-008 RGB+CCT LED controller (along with some RGB-CCT LED tape and a 24V power supplly)
- A Hive active smart plug
- A Salus SP600 smart plug
- Lighting
- Yeelight integration 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
- A Flux LED compatible RGBW controller, a roll of RGB-CCT LED tape, and a 24V power supply. I use this with a bunch of Google Home Minis, a couple of Google Home Hubs, and a Lenovo Smart Display
- Media
- Sonos speakers and integration
- Squeezebox Radio as a smart alarm clock, and associated integration
- Notifications:
- Telegram for my notifications, supported by Hangouts Chat using a command line notifier, and the REST notifier for Discord (system status notifications)
- 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:
- Back to using Nmap for device tracking. While I did switch to Fritz!Box device tracking when I upgraded my router, the router ran out of memory
- Monitor on another Pi3, and a Pi Zero W. This has completely replaced the use of the built in Bluetooth device tracker, and more than halved the startup time of HA.
- This works with our mobile phones, tablets, and beacons
- GPS Logger for remote device tracking
- I used to use OwnTracks for device tracking, using the HTTP interface, but not only did it have an annoying bug that caused it to randomly disable reporting, but it had been abandoned by the developer. Version 2.0 of the app solved both of those, but I've seen no reason to go back.
- TransportAPI for information on the local train service with the UK transport integration
- DarkSky for weather data, alongside the Met Office, along with the associated sensor integration
- 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
- Here Travel Time integration, replacing my previous use of the Google Travel Time integration (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)
- 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
- A HiWatch IPC-T140 dome camera, using the generic camera integration. I use MotionEye for motion detection and Doods (in another VM) for object detection.
Custom integrations
Historically I didn't make much use of custom components/integrations, however that's changed. Here are the ones I use, and why:
- HACS for intalling, updating, and finding new custom integrations. All other custom integrations are installed using this.
- Circadian lighting since the built in flux integration isn't as good.
- Fritzbox tools to allow me to track the status of the Internet connection
- Home Assistant Remote for linking my Z-Wave and primary instances. This is more effective than my ugly MQTT hack.
Standard integrations
These are all the standard integrations I've enabled (ignoring all the ones that Home Assistant (Core) itself uses internally), when last I checked. Some of these can only be set up in the UI, so you won't find them mentioned in the YAML here.
alarm_control_panel
alert
automation
binary_sensor
calendar
camera
cast
cloud
default_config
device_tracker
discovery
ffmpeg
geo_location
google
gpslogger
group
history
http
influxdb
input_boolean
input_datetime
input_number
input_select
input_text
light
local_ip
logger
lovelace
media_player
met
mqtt
notify
person
plex
proximity
recorder
rest_command
samsungtv
scene
script
sensor
sonos
ssdp
stream
sun
switch
system_health
telegram_bot
timer
tts
updater
weather
webhook
wwlln
yeelight
zeroconf
zone
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 of the Pis
- rclone for offsite backups
- rsnapshot runs on another system, and pulls backups
- MotionEye for motion detection
- nginx to provide remote access, in conjunction with Let's Encrypt
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 (you can see the journey I took to get there, starting here, with an update here, and another update, and then a fourth update). Short version - I don't merge the trackers (that's going away anyway), but I do use groups again. I've experimented with the Bayesian sensor, but compared to what I can do with the automations, it's not flexible enough for me.
Notes
- These are (automatically) modified versions of my actual configurations
- The goals with Home Assistant have been:
- Minimise human actions, and where that isn't possible streamline those human actions
- Provide voice control where the automations don't get it right (but try to fix that)
- Have a minimal UI to provide manual control (this is currently the Google Home app)
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
- Digital LED strip for the front of the garage
- 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 integration 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 ;)