Make an Outdoor Temperature Alert System

Learn how to set up an outdoor temperature alert system using Node-RED and Alexa.

Posted by Tom Becker on April 24, 2025 · 5 mins read

Make an Outdoor Temperature Alert System

Introduction

As spring rolls in and we start enjoying our outdoor spaces more, keeping an eye on the weather becomes increasingly important. Imagine a scenario where you can receive alerts straight to your phone or speaker whenever the outdoor temperature goes beyond a certain threshold. Whether you’re a garden enthusiast, a DIY project person, or simply want to ensure your plants thrive, an outdoor temperature alert system is a fantastic addition to your smart home landscape.

In this blog post, we’ll guide you step-by-step to set up your own outdoor temperature alert system using Node-RED and Alexa. Don’t worry if you’re a beginner; we’ll make it straightforward and enjoyable!

Step-by-step Setup Guide

What You Need

  1. Raspberry Pi or any computer running Node-RED
  2. DHT11 or DHT22 Temperature Sensor
  3. Jumper wires
  4. Breadboard (optional)
  5. Node-RED and the Node-RED Alexa integration

Setting Up the Hardware

  1. Wiring the Sensor: Connect your DHT11 or DHT22 sensor to the GPIO pins on your Raspberry Pi. The typical connections are:
    • VCC to 5V
    • GND to Ground
    • Data Pin to GPIO pin (e.g., GPIO4)
  2. Access Node-RED: If you haven’t already installed Node-RED, head to nodered.org for installation instructions. Once installed, access the Node-RED interface via your web browser.

  3. Add the DHT Sensor Node:
    • Go to the “Manage palette” option in Node-RED and install the appropriate DHT node package that supports your sensor.
    • Drag and drop the DHT node into your flow and configure it to match the GPIO pin you used for the Data connection.

Creating the Flow

  1. Set Up the Alert Conditions:
    • Connect a function node to your DHT node. This function will check the temperature and determine if it exceeds your desired thresholds.
    • In the function node, use the following JavaScript code:

    if (msg.payload.temperature > 30) { msg.payload.alert = "Warning: High temperature!"; } else if (msg.payload.temperature < 5) { msg.payload.alert = "Warning: Low temperature!"; } return msg;

  2. Integrating Alexa:
    • Connect the output from your function node to a Node-RED Alexa announcement node. This integration will allow you to send announcements directly to your Alexa devices.
    • For detailed setup instructions, check out the documentation on Node-RED Alexa announcements.
  3. Deploy and Test:
    • Click the deploy button in Node-RED to save your flow.
    • You should now start getting temperature alerts sent to your Alexa whenever the temperature crosses your set limits.

Automating Notification Behaviors

To make your alerts more responsive, consider adding a delay node before the announcement node to prevent repeated notifications. This way, if the temperature remains above a set point, you’ll only receive one alert instead of an incessant barrage.

Helpful Tip Block

  • Get Weather Data: If you’re looking for dynamic data (like local weather forecasts), consider incorporating an API node that fetches temperature data from a local weather service. It can serve as an additional layer of information for your alerts.

  • Voice Commands: Once you set up the Alexa integration, you can use voice commands like “Alexa, what’s the outdoor temperature?” to check conditions on demand.

Common Issues & Troubleshooting

  1. Sensor Not Reading Temperature: Ensure that the wiring is correct, and you have the right GPIO pin configured in Node-RED.

  2. No Alerts from Alexa: Check your Node-RED flows for any disconnected nodes. Make sure your announcements node is configured correctly and that your Alexa is linked to the right account.

  3. Inconsistent Readings: Environmental factors can affect the sensor’s accuracy. Try placing the sensor in a shaded area to get the most reliable readings.

Final Thoughts

Creating your own outdoor temperature alert system can be a rewarding project that brings together your gardening passion and tech-savvy skills. With the magic of Node-RED and Alexa, there’s no limit to how much smarter your outdoor experiences can be! Plus, once you have everything set up, you can expand your system to monitor humidity or even integrate more advanced smart garden features.

So, grab your supplies, follow this step-by-step guide, and enjoy being perfectly in tune with nature and technology. Happy gardening!