Home automation setup using Node-Red and Heroku
Image credits - unknown

Home automation setup using Node-Red and Heroku

Written by Pranav Chakkarwar on 19 Nov 2020 • 4 minutes to read

This is an outdated and infeasible solution for home automation. Take a look at my better approach

Home, Office, Industrial Automation, and control using Node-Red, Heroku, MQTT, Raspberry Pi, other edge IoT devices (like esp8266, Arduino, etc.)

Advantages of using this solution

  1. It is an open-source solution (So you are the one in control of the critical internal data, not a multi-national conglomerate).

  2. The dashboard is available over the internet but password protected. For more security, we can use a free OpenVPN server (in the cloud or on our Raspberry Pi)

  3. It’s free, so why NOT!!! (Except you need to pay for the hardware lol)

  4. Your Node JS app will never sleep.


  1. Access the Control center from anywhere in the world.

  2. Control will be transferred locally to the Raspberry Pi (ex - in case of internet failure)

  3. Easily change automation rules or rewire controls with instant deployment.

  4. Automation rules can get as complex as you like.

  5. It is effortless to integrate third-party APIs like the OpenWeatherMap.




  1. Edge IoT devices (I am using esp-01 for demonstration)

  2. Raspberry Pi for local control and override rules (Note: The Raspberry Pi control center can also be accessed remotely on demand)

  3. Relay boards or Custom PCB boards

  4. And other devices like CCTV’s (optional)

Other Requirements

  1. App platform to deploy the project (I am using Heroku)

  2. MQTT provider (I am using Hive Public MQTT Broker for testing purposes) Not recommended for final deployments

Initial setup and deployment

Final setup

  1. Deploy the app to Heroku using the git deployment method (choose the forked repo)

  2. Once the app build is completed, you can access the node-red editor at the /admin path.

  3. Gather information and learn to use Node-Red.

  4. Next we will install the dashboard and core nodes.

  5. Setup the MQTT connections in Node-Red and click deploy in Node-Red.

  6. Your Control Center/Dashboard will be accessible at yourappname.herokuapp.com

  7. Flash the hardware (in this case esp8266) with MQTTclient program.

  8. Test the connection.

  9. NOTE that the app is deployed internally in Heroku and will not persist across app failures or reboots. (Read helpful notes for a solution to this problem)

Helpful Notes

For any suggestions or queries feel free to send me a message. Now go DIY!

Enjoyed this article?

Get interesting articles in your Inbox 📨


Post a comment

Comments will be approved manually and will take time to reflect.

You may also Enjoy

How to generate a static site with Jekyll

Making the first commit with Jekyll

Published on 06 Jan 2022 • 5 minutes to read

Jekyll is my choice because it claims to be “blog-aware”, offering features that will make it eas... Read more →
Crafting a minimal, fast and yet a feature-rich blog (Introduction)

Crafting a minimal, fast and yet a feature-rich blog (Introduction)

Published on 24 Nov 2021 • 5 minutes to read

Build your identity on the internet using a blog and share your ideas. The internet is open and w... Read more →
Facebook isn't filtering photos, but thoughts

Facebook isn't filtering photos, but thoughts

Published on 29 Oct 2021 • 15 minutes to read

Do you wake up to hate speech, misinformation, and disinformation every day? Are you inclined to ... Read more →
Designing an End-to-End-Encrypted contact form with OpenPGP.js

E2EE Contact Form for a website

Published on 01 Sep 2021 • 7 minutes to read

An end-to-end-encrypted contact will allow communications to stay between a user and you. Email o... Read more →