Integrating Shelly and Node-RED for porch light automation

Hey everyone, I wanted to share my recent project where I integrated Shelly devices with Node-RED to create an automated porch light system. I’m a long-haul trucker, so having a reliable porch light is essential for my peace of mind when I’m away from home.

Initially, I was using a simple setup with a photosensitive light, but it wasn’t ideal because it’s under a long eave and would always be on. I decided to go with Shelly devices because they’re known for their reliability and ease of integration.

I set up a Shelly Plug S to control the porch light and used Node-RED to create a custom automation. The goal was to have the light turn on when I press a button on my phone and turn off in the morning. I also wanted to avoid leaving the light on 24/7, which could signal that I’m away.

Here’s how I did it:

  1. I created a scene in the Shelly app to turn the light on and off.
  2. I used Node-RED to set up a time-based trigger for the morning.
  3. I added a simple button in the Home Assistant dashboard to manually control the light.

I encountered a few issues along the way. For example, when I tried to control the light using the Shelly app directly, it didn’t always work as expected. I found that using Node-RED with the Shelly API provided a more reliable solution. I also had to troubleshoot some connectivity issues, but the Shelly community was really helpful in providing solutions.

One thing I learned is the importance of proper configuration and testing. I also discovered that using Node-RED with Shelly devices opens up a lot of possibilities for custom automation.

If anyone is looking to set up something similar, I’d recommend starting with a simple setup and gradually adding more features. Also, don’t hesitate to reach out to the community for help if you run into any issues.

Happy automating! :rocket: