Home automation in the simplest term is the use of digital devices to control home functions and features automatically or remotely. It is also referred as smart home.
“Every problem is an opportunity to create something new, something fresh and something unique.”
Our Concept — DIY Home Automation
Our vision for Junkiri is to make a useful DIY home automation kit with the simplest of feature — an ability to control lights from our mobile and web apps.
We initially brainstormed for couple of ideas.
- Option #1: Bring light switches at a single place and design a system to control these switches. However, the cost for this option turned out to be expensive.
- Option #2: Create a virtual centralized switching system using an IoT devicethat would integrate with all the electric switch box and communicate with a server. The solution was cheaper and convenient. We could also control the lights from a web and a mobile app.
We brought together a small team of engineers to develop the home automation using I0T system. The team had the freedom to hack around. We had to choose an appropriate IoT device and technology stack.
How we built Junkiri
Right IoT device
Open source and IoT was close to our heart. We have already had played with IoT devices such as Arduino and Raspberry Pi to built some interesting projects. But after further research, we found NodeMCU to be the most affordable option with all the functionalities required for the project.
NodeMCU is a cheap, open source IoT platform. It includes firmware which runs on the ESP8266, Wi-Fi, SoC and hardware based on the ESP-12 module. The term “NodeMCU” by default refers to the firmware rather than the dev kits. It supports MQTT protocol to communicate between IoT devices or any machines.
Supporting server side technology stack
Since NodeMCU follows Nodejs style event-driven API, the obvious choice for back-end became Node.js.
For real-time API, we selected WebSocket over MQTT protocol because its simpler and well-known among front end developers.
WebSocket is a full-duplex communication channels over a single TCP connection. It enables interaction between a browser and a web server with lower overheads, facilitating real-time data transfer from and to the server.
Building a prototype
We built the prototype in a month and deployed Junkiri for our Leapfrog office. Everyone can now switch lights from the comfort of their seat.