12-27-2025, 02:48 AM
I’m trying to build a custom, automated misting system for my small, enclosed patio herb garden to combat this intense summer heat, but I’m hitting a wall with the logic. I have a Raspberry Pi 4, a DHT22 sensor for temp/humidity, a relay module, and a standard 12V misting kit. My issue is writing a Python script that doesn’t just trigger at a simple temperature threshold, but also factors in the recent humidity trend—like if humidity spiked from a recent watering, it should delay misting even if it’s hot. I’m a decent hobbyist coder, but my conditional logic keeps creating loops where it either mists constantly or not at all. I have about two weeks before I leave for a trip and need this running autonomously, with a budget of zero for new parts.