how to 'backup' data? In fact just one item
Posted: Sun Jul 21, 2019 10:02 am
in one of my projects I'm trying to automate the irrigation for some bucket plants.
I'm topping up an existing irrigation system that waters the plants once every 24h (in fact whenever the system is being connected to mains).
As in high temperatures the plants need more water than when it's cloudy or temperatures are lower, I'm using an ESP to control how often the watering process starts a day.
I created a web page so I can manually control how many times a day the irrigation shall take place.
However, when the mains is down, even just for a few seconds, the last setup vanishs.
As in another project I frequently upload data to ThingSpeak I thought that might be a possible solution: when set via the web page I stored the value in one of the unused fields of an existing ThingSpeak channel. When the ESP starts up again it first reads that last value and off we go.
But there's a big disadvantage: when using a field of an existing channel you're uploading data to for other fields very frequently it's a bit tricky to collect the last value of a field that was seldomly updated. You might have to read thousands of values - not ideal.
The ESP is connected by WiFi to my router (a Fritzbox with a USB drive and a NAS attached) .
I beg there's a simple solution but can't find it.
Do you have any suggestions on how to solve this challenge?
I'm topping up an existing irrigation system that waters the plants once every 24h (in fact whenever the system is being connected to mains).
As in high temperatures the plants need more water than when it's cloudy or temperatures are lower, I'm using an ESP to control how often the watering process starts a day.
I created a web page so I can manually control how many times a day the irrigation shall take place.
However, when the mains is down, even just for a few seconds, the last setup vanishs.
As in another project I frequently upload data to ThingSpeak I thought that might be a possible solution: when set via the web page I stored the value in one of the unused fields of an existing ThingSpeak channel. When the ESP starts up again it first reads that last value and off we go.
But there's a big disadvantage: when using a field of an existing channel you're uploading data to for other fields very frequently it's a bit tricky to collect the last value of a field that was seldomly updated. You might have to read thousands of values - not ideal.
The ESP is connected by WiFi to my router (a Fritzbox with a USB drive and a NAS attached) .
I beg there's a simple solution but can't find it.
Do you have any suggestions on how to solve this challenge?