Tracking Daily Max Temperatures for Roof Insulation Testing

Hey everyone, I’m really excited to share my latest project with you all! I’ve been working on a way to monitor the effectiveness of my new roof insulation and I thought I’d document my journey here. Hopefully, this can help someone else looking to do something similar!

So, the background is that I’ve just finished repainting my roof with this new insulating material that’s supposed to make a big difference in temperature regulation. To actually measure the impact, I want to track the daily maximum temperatures both before and after the insulation job. I’ve got a DHT sensor set up, which is already providing me with temperature and humidity data, but I need a way to specifically log the daily max temps.

Here’s how I’ve approached it so far:

  1. Setting Up the Sensor: I’ve configured my DHT sensor to monitor temperature. The setup was pretty straightforward using Home Assistant’s built-in platform:
    yaml
    sensor:
  • platform: dht
    sensor: AM2302
    pin: 18
    monitored_conditions:
    • temperature
    • humidity
  1. Daily Max Temperature Tracking: The challenge was figuring out how to log the maximum temperature each day. After some research, I discovered that I could use Home Assistant’s automation system along with a custom script. The idea is to have the system check the temperature every hour and record the highest value around 4 PM (16:00), which seems to be the peak time in my area.

  2. Automation Setup: I set up an automation that triggers every hour, checks the current temperature, and updates a virtual sensor if it’s higher than the previous max. At the end of the day, this max value gets logged into a timeseries database for easy comparison later.

  3. Visualizing the Data: To make the data easily accessible, I’ve created a simple graph within Home Assistant that shows the daily max temps over time. This will be incredibly useful when I want to compare pre-insulation and post-insulation data.

  4. Lessons Learned: This project has taught me a lot about working with sensors and automations in Home Assistant. One thing I’d recommend to anyone starting out is to test your setup thoroughly before relying on it for long-term data collection. I also found it helpful to log intermediate steps to troubleshoot any issues that came up.

I’m really curious to see how the insulation affects the temperatures over the next few weeks. I’ll definitely be sharing more updates as I go along, and I’d love to hear if anyone else has done something similar or has tips to improve my setup!

Cheers, and happy automating! :rocket: