Home Automation Part 1

So I’ve decided to have a crack at home automation. At this stage I’ve only done some simple planning while I try to work out what I want and how to do it. What I want to attempt to do:

  • Lighting control (projector starts, lights turn off, blinds close, lights turn on an off on a timer)
  • Keep use of existing light switches ect. Make sure they still work in the event of a software or hardware failure.
  • Blind control
  • Fan control
  • Front door lock (shake android phone when connected to wifi, door will unlock for 5 minutes)
  • Aircon control (most likely via IR transmitter)
  • Sprinkler System
  • Enviromental probes, light, rain, temp humidity (To know when to trigger sprinkler)

I have started coding an EtherMega Arduino as this provides SD cards, ethernet and a bunch of IO.

For light switches I have decided to use SPDT relays in a double light switch setup so that the Arduino can toggle the light switch and the light switch still remains operational. This however has some issues, the Arduino doesn’t know the state of the light, the relays and extra cable costs more, it takes up more space and harder to wire. To solve the issue of state I am planning on using an current meter to tell when lights are active and what not. It also gives me the ability to calculate how much power is used or what fan speed is currently set. It can even be used to tell if there is a fault, like blown light, broken relay.

Since this will be running on a public IP address I need a way to auth users to stop randoms on the internet unlocking my door. I’m planning on using an MD5 lib for the Arduino to do this with a simple MD5(PSK + challenge + action). This stops wiresniffing, and hash reuse. I’m not a crypto expert, but I hope this makes it harder than just throwing a brick through my window to break in.