An Eight-Day Home Automation Hackathon Is Inspiration For Getting More Projects Done

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

  1. Hi Inderpreet I’ve been using Mosquitto (MQTT broker) that’s for future reference.

    I’m watching the video now.

    I have a demo board setup with MQTT (mosquitto), Node-Red, Mosquitto clients (Python libs also). Node-Red (Javascript) is basically the rules engine but you can also hook up Home Assistant or any other HA suite. MQTT makes that pretty easy.

    This is the page for my demo board (my house does work in a similar manner):
    https://ushomeautomation.com/Presentations/TCF_HA-index.html
    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.

    1. Hi,
      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!

  2. 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 !!?

  3. 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.

    1. 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.

Leave a Reply to Ren Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.