There’s nothing quite like a deadline to cut through extras and get right at the heart of the problem. Maybe we should all follow Interpreet’s example and stop thinking about automating our homes and just make it in an eight-day hackathon. His talk at the 2019 Hackaday Superconference covers the zero-to-deployment home automation build he finished in the eight days leading up to his move from one continent to another.
Hackaday’s very own Inderpreet Singh found himself pulling up roots and moving from his home in India to teach at Centennial College in Toronto, Canada. He needed a way to keep an eye on his home from afar and the name of the game is IoT. When the only choice is “whatever works right now”, you can learn a lot about simple solutions.
He chose familiar hardware to work with, with the ESP8266 making up the bulk of the nodes and a Raspberry Pi as as a central hub for the setup. He chose to communicate between all the nodes on his system using WiFi because the hardware is robust and available. With security in mind, he keeps the automation system separate from the daily use WiFi system by grabbing an extra access point to serve as the automation network. The Raspberry Pi serves as a router of sorts; its Ethernet port is connected to the IoT device’s AP, while the onboard WiFi is used to connect to the home’s main AP for a connection to the wider Internet.
Software for the system is built on a REST API served by a Python Flask app. Many would advocate for using MQTT but Inderpreet’s testing with that protocol came up short as the broker he intended to use was no longer available. One of the interesting parts of his system design is that all nodes will check in at regular intervals; this allows them to inquire about actions they need to take, but it also allows the system to detect a malfunctioning node immediately. I’ve seen a similar trick used by Elliot Williams where he assigns a “ping” topic to all MQTT devices that causes them to report in with their IP address. Having a system to query and ensure the health of every node is a big tip to take away from this talk.
Installing the system is where a lot of us would get hung up. Inderpreet didn’t have the time to make the system invisible. His mother was not happy with him drilling holes in the walls and gluing parts to door moldings, but the deadline was met and the system was up and running. Aesthetics can be improved with time, and are better left for after you reach the proof of concept.
It’s easy to get stuck in the planning phase of any project. This adventure shows the power of diving in and establishing your foothold with a minimum viable product. Give it a try, you may find you get a lot more projects done in the long run.
11 thoughts on “An Eight-Day Home Automation Hackathon Is Inspiration For Getting More Projects Done”
Hi Inderpreet I’ve been using Mosquitto (MQTT broker) that’s for future reference.
I’m watching the video now.
This is the page for my demo board (my house does work in a similar manner):
I haven’t put everything up there yet but it’s a start. I’ll be using this board for my 2020 Trenton Computer Festival in NJ. I’m still working on this years presentation.
Very cool stuff. Please make sure you share your final build when you are good and ready and reach out if you think I can help in any way. Here is a bit of a tip, long as you don’t intend to use your project in production, don’t worry too much about the security part. MQTT is brilliant for a lot of IoT apps and there are a bunch of MQTT servers available for use for free.
Hope that helps!
A bit offtopic I know, but where did he get that hackaday sticker? As far as I know you don’t actually sell them :(
HaD used to sell them in the HaD Store, before they moved their stuff to Tindie.
I am pretty sure you can get your hands on some jolly-wrencher stickers though I got mine over the years of bugging a lot of people. :)
Could of easily cut it out I suppose using a laser cutter or vinyl cutter depending in if it a real sticker or something more substantial ?!?!?
Maybe you get swag if you write for HAD !!?
They surely had them at Supercon. Hackaday writers also hand them out at other hacker events.
This is fast becoming the de facto architecture for DIY home automation except using MQTT with Node-Red as the rules engine. The main issue I had was securing the external communications. I used secure MQTT with self-signed client side certificates. Self signed works well for this type of application where users are carefully controlled. Then the issue was finding a flexible and easy to use app development environment for the user interface. C++ on Android can do the job but is very time consuming and adding new functionality is not especially easy. I used App Inventor but it needed a hack to support secure MQTT. Thunkable has a MQTT extension but I haven’t tried it yet.
That is indeed true and I have to admit, security is usually an after thought when designing this stuff. As of late though, many developers are using hardware that have encryption accelerators to embed security of some kind from the get-go. Then there is the option to encrypt the payload instead of the communication which is a whole other can-o-worms altogether. Would love to see a quick and easy strategy for this though.
Comic Sans. Nooooooooo
Please be kind and respectful to help make the comments section excellent. (Comment Policy)