Since this night, in France we changed time.
Now we are GMT+2, summer time.
But Blynk timer stayed at winter time until I reset all my ESP modules.
Anybody got same issue?
When I used local server with Blynk legacy, I never got this issues.
Are you using RTC clock in your sketch ?
Yes I am using Blynk RTC
I guess the reset was required to sync your devices time with Blynk cloud.
Yes but it was automatic with local server or NTP server.
setSyncInterval(900 * 1000) didn’t do his job
You can use it inside BLYNK_CONNECTED() function like this
BLYNK_CONNECTED() {
Blynk.sendInternal("rtc", "sync");
}
Not sure it will work because this function is called once a time, at start.
I know that, but I’m not sure what are you trying to achieve.
Try this line
Blynk.sendInternal("rtc", "sync");
With a timer.
I want to synchronize blynk timer each time DST changes.
I can add this line, but I have to wait until winter time to see if it works well
And if it don’t work , I have to wait next summer time
See you next year buddy
By the time you have a tested solution the EU will have finally agreed to end daylight saving time
Pete.
That’s right Pete, but we don’t know when.
The DST end was expected for 2020, since then, no decision has been taken
@Blynk_Coeur so when you did a restart, you get:
BLYNK_CONNECTED() {
Blynk.sendInternal("rtc", "sync");
}
running, that synced your clock with correct time.
What does setSyncInterval
do in your case?
Okey, after looking into a code - setSyncInterval
takes seconds. Not milliseconds.
So 900 * 1000
is a sync once in 10 days.
I found this here - https://github.com/blynkkk/blynk-library/blob/5a2883360b2fb273077e2dd209ea60c300e3f09a/examples/Widgets/RTC/RTC.ino#L94
@vshymanskyy probably should be added to the documentation.
There’s a really neat way to do it.
Let me write it up in the documentation and I’ll share it with you.
Oh !!!
It is the reason why setSyncInterval didn’t work at 2h AM !!
I have to replace it by setSyncInterval(60*10)
Is it better to use Blynk.sendInternal("rtc", "sync");
?
Is the synchronization permanent or only at " blynk connected " .
I don’t use this function, I only use setSyncInterval
I guess you should use
Blynk.sendInternal("rtc", "sync");
With the new blynk as mentioned in the documentation
https://docs.blynk.io/en/blynk.edgent/api/rtc-clock
With setSyncInterval
it should be permanent. But let’s wait for @vshymanskyy to document it. We’re waiting .