Correlation
Seeing Red
If you're into events, and you've not tried Node-Red, I think you're missing something. Node-RED is a low-code, browser-based programming tool for visually wiring together hardware devices, APIs, and online services into event-driven applications, especially popular for IoT. It uses a graphical editor where users drag and connect "nodes" (representing functions or endpoints) to create "flows" (automations), making it easy to handle data, automate tasks, and build complex systems without extensive coding, running on Node.js.
I've got an instance running on the Raspberry Pi in the RV (and one at home too). Here's one flow that's responsible for getting the latest weather forecast based on my location.
A little explanation might help. Upper Left, purple "RV GPS" is a node that connects to the MQTT broker and subscribes to the GPS topic. Every time a message arrives on this topic, the node is activated and pushes the message to the next node.
"Once every 15 minutes" is a node that filters out the GPS messages that arrive every minute, discards them, and passes one along every 15 minutes. (The time is configurable. As is to discard or queue messages.) I don't need an updated forecast every minute, one every 15 minutes will do.
"Create NOAA Points URL" is a node with Javascript (thanks ChatGPT) that takes my current latitude and longitude and puts it into a format that NOAA wants. Like this:
In order to get the forecast for my location, I need to call the NOAA public "Points" API first. This call returns a payload that's almost ready to pass to the NOAA Forecast API, but I set the granularity to Hourly. I'm only interested in an hour-by-hour forecast.
The call to the NOAA public Forecast API returns a ton of data. Often 24 hours (or more) of forecast information. I'm only concerned about the next four hours so another Javascript node pares the payload down:
From there, I do more paring down of the forecast data to just the things I care about. Craft a new JSON payload and pass it to a MQTT Node that will publish the data on a topic I've also created:
{
"topic":"WEATHER/FORECAST/NOAA",
"dateTime":"2025-10-03T18:13:18-06:00",
"version":"1.0",
"period":"hourly",
"forecast":[
{
"hour":0,
"startTime":"2025-10-03T18:00:00-06:00",
"isDaytime":false,
"temperature":79,
"humidity":23,
"windSpeed":7,
"windDirection":"NNE",
"description":"Partly Cloudy",
"precipProbability":2
},
{
"hour":1,
"startTime":"2025-10-03T19:00:00-06:00",
"isDaytime":false,
"temperature":75,
"humidity":27,
"windSpeed":6,
"windDirection":"N",
"description":"Partly Cloudy",
"precipProbability":2
},
{
"hour":2,
"startTime":"2025-10-03T20:00:00-06:00",
"isDaytime":false,
"temperature":70,
"humidity":32,
"windSpeed":6,
"windDirection":"NW",
"description":"Partly Cloudy",
"precipProbability":2
},
{
"hour":3,
"startTime":"2025-10-03T21:00:00-06:00",
"isDaytime":false,
"temperature":65,
"humidity":38,
"windSpeed":7,
"windDirection":"WNW",
"description":"Partly Cloudy",
"precipProbability":2
}
]
}
I use Node-Red to do a lot of work. As in:
- insert MQTT events into InfluxDB, a superb time-series database (also running on the Pi)
- throttle and forward events to my home server, in real-time
- call NOAA's Alerts API to see if there are active weather warnings at my location
- process OBD2 messages from the vehicle, calculate MPG and range
- call public Geocoding services to look for gas stations (or other POIs) around my location
And many other things.





