Thinking about Home Automation
My friend and I are in the process of buying a house. It's a big step, but for me it means one main thing: wiring. It has resulted in me spending quite a bit of time thinking about what I'm going to do with the place. The most obvious place to start is routing CAT5e or CAT6, depending on what I can afford, throughout the house. There is a very convenient cupboard under the stairs which has decent linkage to all of the rooms in the house. Some trunking may be required in some rooms, but I'm hoping that in most places I'll just be able to drop it down the wall cavity.
I want to do a bit more than this though. Ethernet throughout the house is very useful, but I've done that before in my parent's home. This time it needs to be something more fun. I have the following things in mind:
- 1wire temperature sensors. I don't know why, but I've also wanted this. Ideally I would like one sensor in each room of the house, as well as sensors attached to various parts of the plumbing, such as incoming water temperature, central heating water temperature, and running water temperature.
- Possibly use the average (weighted?) temperature to switch the central heating on and off.
- Automatic garden irrigation. The garden is not very big at all… In fact, it's pretty much just two long beds either side of a slabbed garden. However, I'm planning to have potted and wall hanging plants, and use the beds for growing vegetables.
- Something with the doorbell.
wallnotification in my terminals?
- Magnetic reed switches on each door so we can see which doors are open, remotely.
Hopefully I'll think of some more things over time. There are lots of things we can do. I'll point out from the start that I'm not that interested in any commercial solutions that require an internet connection. Everything needs to be self contained.
I may have to go for a star configuration to get into each room. 1wire can work really well, or go very wrong. Using a star configuration means it's more likely to go wrong. However, we can calculate the radius and the weight of the 1wire network, which will make it simpler to get things working. The radius of the network is the distance between the master (probably a Pi or Arduino) and the furthest slave (probably a temperature sensor). The weight however is the accumulated length of all cable in the network. The weight of the network allows us to calculate the rise time of signals on the network, and the radius allows us to calculate the slowest reflection. This is better explained in more detail on this Maxim Integrated page.
For the sake of redundancy, and to avoid confusing any boiler repair guy/girl, the thermostat needs to remain. However, if they are wired in series, we can use the thermostat as a fail safe, set slightly higher than we would want the house… Then the "house computer" can take control, until it (inevitably) crashes.
This one should be fairly simple. Solenoid water valves are quite cheap, maybe £20, and one can just be hooked up to a relay on a 12v power supply. Things might get a bit more complicated if I decide to have zones, which I probably will given time.
I love terminals. So, it's going to be text driven. Controlling a house from a VT420 sounds quite stylish in my opinion. If I end up using a Raspberry Pi instead of a PLC, it will probably end up being a bunch of shell scripts and crontab entries.
One of my main concerns is if/when I move out in a few years, the buyer is going to be very complicated. But this will be fun, so I'm going to do it… I'll just have to deal with tidying up later on in life. I will think of it as loaning happiness. Getting all of this to work is a fairly large amount of work, and buying furniture is the priority. However, writing this has given me a bit more of an idea of what I want to do. Next I need to decide how I'm going to do it.
Update <2016-08-06 Sat 15:03>
I've been browsing eBay and ordered a few parts. I might as well keep track of what I've ordered on here. I already have a couple of Raspberry Pis.
- 20 DS18B20 1wire temperature sensors for £11. These are most likely clones given that they were so cheap, so I ordered quite a few in case some didn't work.
- Bag of 100 2 wire jelly telephone crimps for £5.99. I'll use this to splice the temperature sensors into a piece of telephone cable (which I haven't got yet).
- 4 channel relay board for £3.95. I should be able to switch this on and off from the Pi's GPIO pins. Hopefully the Pi can provide enough power to activate all of the relays at the same time.
- 10m of two pair telephone cable for £3.50, for the 1wire bus. I don't think 10m is going to be enough, but I will buy more if I need to.
- 12way terminal block for £1.50. I don't know if I'll actually need this.
- 140x190x70mm project box for £7.99. Hopefully I'll be able to get the pi, relay board and terminal strip in here, as well as the wires connecting the parts.
There a few other things which I am going to need to get.
- Water solenoid valve, possibly two or three depending on how many watering zones I decide to have.
- 12v power supply to power the irrigation valve.
- Various irrigation bits, such as pipe, connectors and drippers.
Update <2016-08-07 Sun 22:10>
By the way, while I have always been very interested in this sort of thing, it was heavily inspired by a video I saw a few years ago. I'll embed it here for reference.