Hey everyone, I wanted to share a cool setup I’ve been working on using Node-RED and InfluxDB to track daily temperature stats. It’s been a fantastic way to keep an eye on my home’s climate without needing any additional hardware or complex configurations.
I’ve always been a bit of a tinkerer, and when I came across the node-red-contrib-influxdb and node-red-contrib-openhab2 plugins, I knew I had to dive in. The goal was to automatically update the daily minimum, average, and maximum temperatures since midnight. It sounds simple, but getting it all working smoothly took a bit of trial and error.
Here’s how it all came together:
-
InfluxDB Query Setup: I created a function node in Node-RED that generates an InfluxQL query to fetch the necessary temperature data. The query calculates the mean, minimum, and maximum values from my temperature sensor data, starting from midnight.
-
Parsing and Updating: Another function node processes the query results and sends update commands to specific OpenHAB items. This way, I have dedicated items for the min, avg, and max temperatures, making it easy to display them on my dashboard.
-
Flow Automation: I set up a flow that triggers whenever there’s a new temperature reading. This ensures that the daily stats are always up-to-date, even if the temperature fluctuates throughout the day.
It’s been running smoothly for a while now, and I love how it integrates seamlessly with my existing setup. Plus, it’s a great example of how powerful Node-RED can be when combined with other tools like InfluxDB.
If anyone has questions or wants to try something similar, feel free to reach out! I’d be happy to share more details or help troubleshoot any issues you encounter.
Cheers,
[Your Name]