I thought I’d start this home automation “mega thread”. I’m going to dump all the information, links etc I talked about the other night and add to it when I find cool, new stuff. If you’ve got any questions, problems etc feel free to post here. If you want me to add anything to this list just ask!
#Server Hardware
You need something that is on 24/7 to host all your services that process automations, sensor data etc. Running a computer, or even a laptop 24/7 is quite expensive and can easily add $100+ to your yearly electricty bill. These options are cheap and well supported.
###Raspberry Pi (My personal recomendation for n00bs)
There are a few different models of the raspberry pi. Mainly pi 1, pi2, pi3 and pi zero. The pi v3 can be had for $60 shipped on eBay. If you’re buying one new don’t bother trying to save money and just get a pi 3. The price difference is not much and you’ll thank yourself later. Stay clear of the pi zero and pi 1 as they have very little processing power. This becomes especially apparent the second you start trying to host multiple things.
###Orange Pi
These are basically the same as the raspberry pi. Except they’re designed/made by a chinese manufacturer so the price is much lower and the quality is slightly less. Best OS to run is armbian, the other options are not great. I’ve never had a problem with these devices but the software support is fairly non existent. If you’re a linux or software noob, just buy a pi. If you’re a linux user then you can save some cash by buying one of these.
###VM on NAS or Server
I have a QNAP NAS that I use for backups and general/cctv storage. It also does a bunch of other things, one of them being run virtual machines. I upgraded mine with a spare 8GB RAM I had lying around. I have a 1 core 2GB RAM vm running ubuntu. I have all my home automation services running on this as it’s (almost*) always on. *Between 2am and 6:30am it turns off to conserve power as idle draw is about 40 to 50 watts.
##Platforms and Servers:
###Home Assistant (Open Source)
This is a modern application built in python, and what I personally use. It has a beautiful interface and is mobile friendly, also includes basic voice commands out of the box. Easily extendable and runs on windows, mac and linux. Very nice platform with 700+ integrations like Belkin WeMo, IFTTT, pushbullet, phillips hue etc. Smaller learning curve but configuring it leaves a bit to be desired. (uses text yaml files)
###Open HAB (Open Source)
In my opinion considered a “less modern” application and is built with java so it runs everywhere the jvm does.
Steeper learning curve. I don’t have any experience with this, just know it exists. There are so many conflicting screenshots/images on google I don’t want to supply one here that misrepresents it.
##Protocols:
###MQTT
This is a protocol that IoT devices use to talk to each other. It uses a publish/subscribe model, is super lightweight and specifically designed for IoT devices on slow/unrealiable network connections. This is one of the more popular protocols I’ve come across in the home automation world. I recommend using the Mosquitto broker (tutorial) and reading my blog post about setting up ACLs for security.
###CoAP (thanks @Redhatter)
It’s best explained by their website: “The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things. The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.” It’s like HTTP and based on the REST model.
Some other members have had good results with these switches. I bought one a couple years ago and have had nothing but problems with it. It’s just really slow and unreliable. If you’re still keen to use these my suggestion is to buy one, test it, and make sure it works for you. The main benefit is they’re plug and play and available from lots of local retailers.
Almost Plug ‘n’ Play
These devices are generally easy to set up and use and can be done by anyone, no electrician needed. However, you need to modify them slightly by uploading custom firmware for them to become useful.
These are like Belkin Wemo switches but are 1/3 the price and you can flash custom firmware. I have not confirmed this as I don’t physically have one, but the chinese version should use the same plug as Australia, it’s just flipped upside down.
Wiring by electrician needed
STOP! Do not attempt to wire or install any of these products unless you are a qualified electrician. It’s illegal and very dangerous to do so yourself.
Tips for most DIY sonoffs
Basic/Pow/Dual/etc: If using in a visible/accessible place the casing is not safe enough. If someone trips on the cable or knocks the appliance over it could tear out the cable and expose wires at mains voltages!
You can 3D print or buy a generic project enclosure to encase it in. Make sure you tie knots in the wire/zip tie it inside the case for strain relief. So if it’s yanked it shouldn’t be able to come back through the hole/casing.
The default firmware is less than stellar. Use TASMOTA and you’ll never look back.
These are the cheapest/most basic WiFi enabled switch you can get. They cost about $6 each and can handle a normal 2400W load. Essentially, it’s a little microcontroller (ESP8266), a relay and a 240v>3v regulator on a tiny board with screw terminals for input/output. They also come in a nice case.
Same as the basic with a few differences. These are rated for 16A (or 3800W) and have built in power monitoring. This includes voltage, current and with tasmota even the power factor. These are also nearly twice the size.
These are pretty cool and are designed to replace your light switch. They are basically the guts of an S20 switch put into a light switch. However, they can only switch 2A. These allow you to have wifi controlled lights, but retain a physical (glass, touch sensitive) lightswitch. As soon as the US (rectangle style) drops I’ll be ordering some.
Other Sonoffs
There are a bunch of other types too, and they’re always releasing new ones. Check out the itead website by clicking here.
I found a bunch of magnetic phone/tablet holders in the bone yard. (from phone displays in telcos) I bought a cheap ($100) 7" tablet from JB HiFi. I used two magnetic holders on the tablet to mount it on the hallway/kitchen wall. It’s hard to explain but it’s smack bang in the middle of the lounge room, hallway and kitchen. This allows anyone to see the state of everything and control stuff. It’s plugged into a normal usb wall charger.
The google home is an awesome device. It’s like the amazon echo - it’s a wifi connected smart speaker that is always listening and allows you to talk directly to the google assistant. Currently it only supports a limited amount of “plug and play” automation devices and doesn’t integrate with Home Assistant properly. I’m currently working on a proxy service that will make it work. However, for the time being, it seemlessly integrates with the chrome cast on our TV and I’ve manually setup IFTTT triggers so basic home control commands are supported. I still use it for those things and it works well. Also, the speaker sounds amazing for $200 considering what else it can do!
Another protocol worth looking into is CoAP… it’s used a lot with 6LoWPAN networks and uses UDP messaging, no broker required. It basically is a cut down HTTP for microcontrollers.
It is used a lot with Thread, which Nest are actively developing.
The built in broker always seemed to have issues and it’s more limiting than a separate one. For example, it’s super easy to setup Mosquitto with ACLs (fairly fine grained permissions) but isn’t possible with the built in broker afaik. If it is, it was easier for me to find/setup mosquitto. At the time you also couldn’t use owntracks with the built in broker because of a dodgy implementation of the MQTT protocol or something like that. (this may be fixed now)
I’d suggest giving it a go, if it works for you and does what you need then great. If it doesn’t, setting up mosquitto only takes a few hours at most.