Voice Alerts for Wind or Rain Before Watering

Get voice notifications about wind and rain before watering your plants with Node-RED and Alexa automation.

Posted by Tom Becker on May 06, 2025 · 5 mins read

Voice Alerts for Wind or Rain Before Watering

Introduction

As the garden season approaches, many of us are eager to see our plants thrive! However, nothing can derail your watering schedule faster than unpredictable weather. Whether it’s a sudden downpour or gusty winds, knowing what’s happening outside can help you make smart decisions for your garden. If you’re a DIY enthusiast who enjoys tinkering with technology, imagine having a smart solution that alerts you via voice before you turn on the watering system! In this post, we’ll guide you through creating a simple automation with Node-RED and Alexa to notify you of wind or rain, ensuring your garden gets just what it needs.

Step-by-Step Setup Guide

1. Setting Up Your Environment

Before you dive into the fun part, ensure you have the following:

  • A working installation of Node-RED.
  • Your Amazon Alexa device set up and ready to go.
  • A weather API to check for wind or rain. Popular choices are OpenWeatherMap or WeatherAPI. Make sure to sign up for an API key.

2. Install Required Node-RED Nodes

To connect Node-RED with your Alexa device, you’ll need to install the necessary nodes. Go to the Node-RED dashboard and navigate to the palette manager:

  1. Click on the menu (three horizontal lines) in the top right corner.
  2. Select “Manage palette.”
  3. Under the “Install” tab, search for “alexa” and install the node-red-contrib-alexa-home-skill.

3. Creating Your Node-RED Flow

Now let’s create the flow that we need:

  1. Add an Inject Node: This will be responsible for triggering the weather checks at regular intervals.
    • Drag the Inject node onto the workspace.
    • Configure it to repeat every hour or however frequently you want to check for weather changes.
  2. Add a Function Node for Weather API Request: This node will retrieve weather data.
    • Drag a Function node next to the Inject node.
    • In the function editor, add the code that requests data from your chosen weather API.
  3. Parse the API Response: You will need to extract the relevant wind or rain data from the API response. Connect this to a second Function node: if (msg.payload.weather[0].main === 'Rain' || msg.payload.wind.speed > 10) { msg.payload.alert = `Alert! Detectable weather conditions to check before watering the plants.`; } else { msg.payload.alert = `Weather is fine for watering.`; } return msg;

  4. Create the Output Node: Connect to an Alexa announcement node.
    • This will be the node that sends the voice alert to your Alexa.
    • Use the node-red-contrib-alexa-announce to speak out the alert created in the previous step.
  5. Deploy the Flow: Once your nodes are linked and configured, click the Deploy button at the top right corner of Node-RED.

4. Testing Your Setup

Now it’s time for the fun part! Test your entire flow to ensure that it triggers correctly. Switch to your Alexa device, and you should hear voice notifications based on the weather conditions detected by your flow.

Helpful Tip Block

  • Integrate with Home Automation Systems: If you use systems like Home Assistant, consider linking your Node-RED flow to it for additional automation capabilities, like automatically pausing your irrigation system in adverse weather.

  • Enhance Your Alerts: Use different alerts based on time or specific conditions. For example, if it rains in the early morning, you might want a different notification than if it rains in the evening.

Common Issues & Troubleshooting

  • Node-RED Doesn’t Start: If Node-RED fails to start, ensure all dependencies are correctly installed and your Node-RED setup is up to date. Check any logs for specific errors.

  • Alexa Not Responding to Alerts: If your Alexa device isn’t responding, make sure the communication between Node-RED and Alexa is established correctly. Review the setup of the node-red-contrib-alexa-home-skill.

  • API Calls Failing: If you notice a lack of information being relayed, check your API key and ensure you’re following the correct API usage guidelines. A quick check in the API documentation will help you confirm if your request setup is accurate.

Final Thoughts

Implementing voice alerts for wind or rain before watering can greatly enhance your gardening routine, making it smarter and more efficient. By using Node-RED and Alexa, you can easily create a system to ensure your plants receive the care they need without falling victim to unpredictable weather. For those who are new to Node-RED, playing around with flows can be quite rewarding, and soon you’ll find it a valuable part of your home automation toolkit. Happy gardening!