I’d start by reading the SimpleTimer documentation.
https://playground.arduino.cc/Code/SimpleTimer/
To be able to delete or disable a timer you need to know it’s ID, so when you initiate a timer , instead of this:
timer.setTimeout(4 * 60 * 60, turn_off_SSR)
you’d do this:
SSR_timeout_timer_ID = timer.setTimeout(4 * 60 * 60, turn_off_SSR)
note that SSR_timeout_timer_ID
needs to be declared as a global integer variable so that you can use it to disable the timer from anywhere in your sketch.
You can then do things like:
timer.disable(SSR_timeout_timer_ID)
or
timer.delete(SSR_timeout_timer_ID)
Does this help?
EDITED TO ADD…
I forgot to mention this bug…
Another glitch in SimpleTimer (of which BlynkTimer is based) is that when using timer ID labels, needed to do things like disable, enable, delete, etc. timers, it seems like the first timer in your code will also get ‘deleted’… I found making your first timer a simple “Sacrificial Timer” that solves that little issue
// "Sacrificial" Timer - needed when deleting timers as using that feature will also kill first timer created...
timer.setTimeout(10L, []() {
// do nothing here, or some other task that needs only run once EG. Blynk.virtualWrite(V0, "START");
}); // END sacrificial Function
#26 - Adjustable pulsing LED that fades in and out with Timers
And now for more Timerception tricks… A variable timed, flashing (pulsing) physical LED that fades in and out, all with nested timers in lambda functions.
One of the lambda tricks I had to discover, via trial and error, was using a “fixed call” interval timer called simply setTimer(long d, timer_callback f, int n) that will run its timed interval course as normal, but only n many times before stopping… the key was finding where to…
Pete.