Damm, a pretty dramatic intro there. However if you're a keen reader, my first post in question, I mentioned that I'm very much into the whole 'Home Automation' thing. In particular a system called Home Assistant. I stumbled across this around a year back whilst looking for something to manage custom built sensors ranging from temperature and humidity, ... At the time I was on track to use a similar solution called MySensors.

So what is Home Assistant?

I'm not going to go through the hassle of writing a guide as its relevantly easy to setup. All you need is a Raspberry Pi or if you're a bit more technically minded you can set it up on Linux, Windows, Mac, Docker ... Source for more details here.

In regards to how/where I have installed Home Assistant, I've now got it running (Hass.io) on a Raspberry Pi 3B+. I have tossed between many Pis’s and dabbled with Docker (on a Pi and Ubuntu VM) but it mainly came down to the type of sensors I want to use, ZigBee (too big of a rabbit hole to mention here). To control these sensors I am using a RaspBee which is connected via the Pi's GPIO pins (a sort of HAT). More about ZigBee a bit later on...

At the moment I've got Home Assistant setup with the following devices, of which some were manually added but most of them were picked up automatically:

  • NEST
  • Wemo Smart Plugs
    • Living room lamp
    • Front door lamp
  • Media devices
    • Samsung M5 Speaker
    • Plex Media Server
    • ChromeCast
    • Apple TV
    • Playstation
    • Google Home
    • Amazon Alexa
  • ESPHome Sensor
    • ESP8266 - Temp/Humid, PIR
  • RTSP Live Camera Feed
    • UniFi UVC-G3 (2)
    • UniFi UVC-Flex (1)

At the moment it looks rather basic. There is still a shit ton of stuff to build and tweak to get to the end game. So what does the end game look like? Here is a high level idea of what sensors will be placed around the house:

  • Hallway
    • Xiaomi Aqara Door Sensor
    • ESPHome - nodeMCU ESP8266
      • PIR Motion
      • ESP32 Camera
      • Accelerometer

First sensor on the list is the hallway. As the NEST unit is on the wall, there is no need for a temp sensor as it has an in built thermostat and relays this info back to HA already. The nodeMCU will have a PIR to accurately tell when someone has left the house or vice versa. The ESP32 camera and accelerometer work together to check if any post/letters have arrived, snap a photo then send a notification via email or PushBullet/PushOver.

  • Kitchen
    • Xiaomi Aqara Door Sensor
    • Xiaomi Aqara Water Leak Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion
      • WS2818B RGB Lighting
      • Smoke/Flame Sensor

In the kitchen we have two door sensors, one for inside and rear garden door. A water leak sensor will be placed underneath the dishwasher and washing machine to alert me if my dodgy piping finally gave in. There will be sensors to monitor temperature, humidity, smoke and god forbid any flames as well as controlling RGB LED strips placed under the cabinets.

  • Garage
    • Xiaomi Aqara Door Sensor
    • Xiaomi Aqara Water Leak Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion

Similar flex as above. I won't bore you again

  • Guest Lounge

    • Xiaomi Aqara Door Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion
  • Living Room

    • Xiaomi Aqara Door Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion
      • IR Blaster

Only thing to mention here is the IR Blaster. Aiming to 'clone' specific button commands for my TV, Virgin and PlayStaton remotes and replay them, being able to turn on/off, control volume etc.

  • Guest Bedroom

    • Xiaomi Aqara Door Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
  • First Floor Landing

    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion
  • Master Bedroom

    • Xiaomi Aqara Door Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion
      • IR Blaster
      • Load Cell Sensor
      • WS2818B RGB Lighting

Similar to the Living Room sensor, the IR Blaster will be able to turn on TV etc. The Load Cell Sensor (Load Cell Amplifier HX711) will sit under the mattress and detect when someone has got in/out of bed, in turn, ergo, power on the RGB strip

  • Office
    • Xiaomi Aqara Door Sensor
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • PIR Motion
      • IR Blaster
      • Smoke/Flame Sensor
      • WS2818B RGB Lighting

In this instance the IR Blaster will be used to control my Lego Train (see previous posts). The Smoke/Flame sensor is to make sure my data cabinet/server/3D printer doesn't catch fire. That shits expensive.

  • Guest Bedroom
    • ESPHome - nodeMCU ESP8266
      • Door Sensor
      • Temp/Humid
  • Attic
    • ESPHome - nodeMCU ESP8266
      • Temp/Humid
      • Smoke/Flame Sensor

I'm wary that I'm probably babbling on quite a bit. I'm hoping you've managed to get a bit of an idea of what I am trying to do. And how to do it? There are two main types of sensors:

  • Xiaomi Aqara - This range of sensors from Xiaomi originally connect to a hub/gateway via ZigBee radio protocol. In the interest of security, I am using the RaspBee adapter to essentially cut the need for a cloud connection (hub/gateway), and have the ability to control the devices locally. Plus these sensor are pretty well built and cheap (if you wait 6-8 weeks shipping).
  • ESPHome ESP8266 - These will be built using a nodeMCU ESP8266 with several sensors attached then programmed using the Home Assistant addon. Handy as fuck as I planned to build these from scratch and this saves a load of coding hassle. These are also dirt cheap too.

The ideal plan is to have a system which is free from any cloud connections. Some things such as Nest and UniFi depend on a cloud connection to run but for the rest, the aim is to keep it local. Keep an eye out for a future post around setting up a separate network for IoT shit. For now, here is a list of the sensors and what each one does:

Xiaomi Aqara ZigBee Sensors

  • Xiaomi Aqara Door Sensor
    Pretty much explains itself. This type of sensor can also be used on windows, something I may consider in the future.
  • Xiaomi Aqara Water Leak Sensor
    Same again. Little sensor that detects water leakage via a sensor on the bottom. This will sit under the dishwasher/washing machine.

nodeMCU ESP8266

  • DHT22 Temp/Humid
    Monitors temperature and humidity
  • PIR AM312 Motion
    Detects motion
  • WS2818B RGB Lighting
    5v 150 LED's per meter, powered by separate PSU
  • MQ2 Smoke/Flame Sensor
    Detects smoke and flames
  • ESP32 Camera
    Camera module. Will be used in 'letterbox' project to capture images of post
  • ADXL335 Accelerometer
    Will be used with 'letterbox' project and maybe on kitchen cat flap
  • IR Blaster
    IR blaster (sender) to control devices in Living Room and Master Bedroom
  • HX711 Load Cell
    Detects 'load' changes, basically when someone gets in/out of bed to trigger LED lighting
  • LDR Light Sensor
    Light sensor to validate when its dark in order to switch on lighting or not

Damm that was alot of typing. For now I am going to leave it there. As you can see, there is a shit ton of stuff still to do. I'll be documenting and posting anything I end up building or configuring in Home Assistant so keep an eye out (ESPHome guide next on the list). Peace!