Yes, I know there is an "easy" solution, but.....
TLDR:
I have an arduino - with RTC - to water my plants.
There is no easy way to change the RTC time. (Stupid me)
It triggers at mid day.
Me, being anal, don't have it always powered. I use a Tasmota powerpoint and turn it on at 11:55 and off at 12:05 each day.
This has a bonus feature that if it is raining, I can not turn it on and the day is skipped.
That was a nice feature I got when I started playing with N-R.
AND there is no "Summer time" adjustment, so I have to have TWO schedules.
One for normal time and one for summer time.
Anyway.....
Until I noticed things weren't adding up.
Long story short: the time on the RTC was drifting.
The workings:
There are 3 modes the flow has:
From mid-night
At the time specified
From Dawn
The first and last:
Every hour it queries the weather and checks if there is rain.
If the total rain for that day exceeds a value, the day is skipped.
The middle one:
At 11:55 the signal is sent and the weather is checked.
If it is pissing down then things are aborted. (as per the other two modes)
Thoughts on how things work:
The first/last ones allow for rainy days to be avoided.
Their start times differ only in that if it is going to be a slow wet day or a somewhat wet day.
That the reading are taken ON THE HOUR was academic - and maybe still is - as their totals are added and though the Mid-day one is not included, I would still get a somewhat of a picture of the rain events leading up to then anyway.
Temporary solution:
I've modified the times so it turns on at 11:40 and off at 11:59 giving a window of 20 minutes rather than 10.
Problem:
1 - The RTC things it is 12:00 at 11:50, so a lot of watering was being missed.
2 - Checking the weather ON THE HOUR.
The one I use most is the middle one: Check at the given time.
Which is easy enough:
Send signal
|
|
check weather
|
|
Enough rain? (Abort)
|
|
Water plants
The other ones are kind of:
Hourly signal starting at determined time depending on mode.
|
|
get weather/rain
|
|
Add cumulative rain
|
|
Mid day
|
|
Enough rain? (Abort)
|
|
Water plants
There is more code but keeping it simple for what I want to do.
But me being me the other ones - on the hour - bug me.
If it is now turning on at time:40 shouldn't I check the weather at those times and not on the hour?
But Adjusting the hourly signal (cron+ node) would not be easy.
I'm over thinking it - aren't I? ![]()
It works as is.
It doesn't need to be THAT in sync with things.
Thoughts?



