Thursday, 31 December 2015

Revisiting Home automation

Hello internet, it's been a while!

So, 3 years, 2 cats, and one house remortgage later, I'm finally getting on with some home automation (the whole point of this blog to start with)! I got distracted for a while with work and prioritising decorating and other house related improvements (some of which I've documented on this blog).

I've thought about proper home automation on and off for the last few years, and along the way I've done plenty of research and come across many different methods of doing it. The most popular methods seem to revolve around arduino, raspberry pis, or off the shelf solutions like SmartHome or wink hubs. 

I don't want to be locked into using a particular platform or technology, or pay lots of money for sensors and things, and because I'm a nerd and like electronics I'd like to learn about what I do as I make it. Therefore I'm going to build my own solution using openHab and custom/handmade sensors.

The internet has loads of resources, and other people have done a lot of the initial work in creating open platforms and examples that I can borrow/learn from. I've got loads of links saved, which I'll share as I write more detail in future posts. And I've already got some electronics I can use:
  • Raspberry Pi 2 (nice and fast) with 32Gb MicroSD card
  • Raspberry Pi original model B (slower, but still good)
  • Arduino Uno
  • 1602a 16x2 LCD display and some other random electronics (LEDs, etc)
  • Synology DS415play NAS
  • 2x IP CCTV cameras
  • Nexus 7 (2012) tablet
  • Pebble Time smartwatch
  • Philips LivingColours RGB 1st Gen Lamp
But I'll need a bit more than that for what I have in mind, so recently I ordered:
  • Two NodeMCU LUA / ESP8266 Arduino compatible boards
  • Two C.H.I.P. boards from kickstarter (similar to a raspberry pi, but smaller with built in WiFi, bluetooth and 4Gb Flash memory) 
  • Five DHT22 Temperature sensors (but I may need more)
  • Logitech Harmony Ultimate Remote control + Hub
Home Automation Aims
I will probably start off small and simple and grow the system with more bits and pieces as I go along. 
  • Centralised Home Entertainment (LG Smart TV, Denon Surround Sound amplifier, TiVo, PS3, Xbox One, Wii U) control in the living room
  • Temperature and humidity logging of each room in the house, eventually linked to central heating control 
  • Electricity meter usage logging 
  • Lighting control/scenes across the house (will require new lights and wiring)
  • Presence detection (based on smartphone location) and scene control
  • Multi-room audio in kitchen, living room and bedrooms.
Current Plan/Setup
So far, I've come up with the following basic setup

Living Room
Raspberry Pi 2 - Running OpenHab and Mosquitto (MQTT Broker)
Logitech Harmony Hub and Remote
DHT22 temperature/humidity sensor - physically connected to Raspberry Pi 2
Phillips LivingColours RGB Lamp
Nexus 7 Tablet

Kitchen
3x DHT22 temperature/humidity sensors to measure temp and humidity of kitchen, fridge and freezer - physically connected to Raspberry Pi 2 in Living Room

Hallway
NodeMCU LUA / ESP8266 board - 1x DHT22 sensor to measure temp and humidity of hallway and optical sensor to measure electricity usage

Bedroom 1
NodeMCU LUA / ESP8266 board - 2x DHT22 sensors to measure temp and humidity of bedroom and bathroom

Bedroom 2
Raspberry Pi original - 1x DHT22 sensors to measure temp and humidity of bedroom



Well, thats the rough plan so far.

I've installed OpenHab and mosquitto on the Rpi2, and it works, but it can only connect via HTTP to the TiVo and LG Smart TV.


I'll post again with more plans and details of what will actually work, and what I can do with the new parts when they arrive. Oh, and photos, lots of photos!