Do you know how to get date and time with blynk V2 without RTC module ?
Old RTC widget doesn’t work
Do you know how to get date and time with blynk V2 without RTC module ?
Old RTC widget doesn’t work
OK , I answer to myself
better use NTPClient
Sorry how did you get this working. I also had Date and time working on the old app but can’t work out how to display current date and time on the new app?
I use NTPtimeESP lib from the guy with the Swiss accent
void GetTime() {
dateTime = NTPfr.getNTPtime(1.0, 1);
// check dateTime.valid before using the returned time
// Use "setSendInterval" or "setRecvTimeout" if required
if (dateTime.valid) {
NTPfr.printDateTime(dateTime);
my_h = MyPrintDigits(dateTime.hour);
my_m = MyPrintDigits(dateTime.minute);
my_s = MyPrintDigits(dateTime.second);
my_D = MyPrintDigits(dateTime.day);
my_M = MyPrintDigits(dateTime.month);
String Weekday = dayAsString(dateTime.dayofWeek);
Time = my_h + ":" + my_m + ":" + my_s;
Blynk.virtualWrite(V2, Weekday + " " + my_D + " " + my_M);
Blynk.virtualWrite(V1, Time);
}
Fantastic Thank you
I think it should work. You just don’t need to put an actual widget on the dashboard, the functionality is enabled by default.
I might be missing something here but I can’t see the rtc widget listed in the widget box. Is this the issue?
I should clarify that I am using the static authentication token set-up, not full Edgent.
Cheers
Steve
Pete.
Yes but you have to use an external library to convert Unix timestamp to hour min sec and date or I’m wrong
Thanks the guy with the swiss accent, his library do the job with one line code
Doh send me back to reading school
Maybe I am wrong
But the actual documentation don’t explain how to get real human time
Hour() is not available !
I was looking for this answer for 10 days !!
Nobody knows !
Thank you very much Volodymyr
did u got this?
Yes , that works