Forgive me if this topic has been answered. I did a search but maybe I’m using the wrong search terms.
I’m using a ESP32 Devkit, a capacitive soil moisture sensor, and relay to monitor my tomato plants and water them by opening a solenoid valve when the soil meets a dryness threshhold. So far I’ve only been monitoring, not using the relay.
I’d like to start automating it. I’ve been working on ways to seal the sensor against moisture, but it is still prone to occasional sudden shifts in the reading (voltage output). I don’t want to be away for a few hours and have the sensor shift to a “dry” reading and overwater.
So I would like to, for example, detect that the moisture reading went down more than two percentage points from an hour ago to the present time, then set a flag and disable watering when this happens.
Like I said, I realize I could use millis() and, for example, write readings to an array every minute and compare to the value taken 60 readings ago and keep scrolling them out of the array, but it seems like Blynk is sophisticated enough that there may be a way to query past data and pull it it to the ESP32 to act upon. Is there a way for the microprocessor to query past data periodically and receive it without downloading the CSV somehow or some crappy convoluted workaround like that? The data already exists in Blynk’s server-whatever, so it’s not like it would be adding to Blynk’s storage capacity.
Thanks!
-Rod