Time sync alternative needed

I’ve checked the threads on time, rtc and sync.

I want to get the unix epoch time from the Blynk server. I can do this if the RTC widget is declared in the UI and using WidgetRTC object alongwith rtc.begin().

Is there anyway of doing this sync with Blynk server without declaring the widget in the UI?

Why? Since you need the App project in the first place, what it wrong with the widget?

No, if you want to use the power of Blynk’s widgets you need to buy them and put them in your project.

The issue is not buying. I’m willing to pay and use. Can the widget be hidden and not take screen space? It has no action from the user while in run mode.

I’m an open source guy for over 25 years and believe we should pay for sustaining such projects. Let us not confuse the two or impute motives please.

Yes, shove it into a tab or drop it lower on the vertically scrolling screen (aka, scroll down in edit mode and move the widget out of view).

Relax… I suspect it was just thought that you (as have some) were trying to see if they can use Blynk without using the App, and thus “paying” for energy (beyond the already free amount provided).

We do get all types here, so it can be tricky to read minds and determine a users motives :stuck_out_tongue:

This is what I did. Is still kludgy… Not a big thing to worry the developers with. If it is a low hanging fruit, maybe will be nice to do.

I bought energy already… :slight_smile:

On the other point, I believe we should pay but also make demands so that the software gets better. I’m exploring how to build a product using the app. It seems like we can build a good single point solution (fixed in features and number of devices) but not have the same app across a range of customers having different number and types of devices. If the app should gain momentum, this would be a good direction to look at.

@mohan_sundaram This is the “free” development side of Blynk… if you want specialised and/or “clean” looking Apps, they can be done for you on the commercial side of Blynk. https://www.blynk.io/

From my understanding WidgetRTC.h relies on TimeLib.h so I guess you could call that library directly from your sketch, skipping the UI widget.

However, setting up a NTP function in your program.might lead to connectivity issues with the Blynk server (I’m really, really guessing about this). Like, there must be a reason to why they created the RTC Widget in the first place! :thinking: :smile:

I’m still trying to figure out your “type” and clandestine motives :rofl:

Technogeeky, hetero, shy but resolute… As for the motivation??.. Me too :stuck_out_tongue: … I originally thought of world domination, but I quickly realised that I need to be more awake and alert for that to work :sleeping:

This is easy enough for a coder but much easier with the RTC widget.

I’ll get there. Not a coder and am not young either :).

@Gunner. Fully agree. I expect all the features would be available in the mobile Blynk dev app. When I want to roll the product out, then I would create the deployment app with the Blynk.io plan. I did not see the features mentioned by me. I want to sign up for the blynk.io plan and will do so sooner than later once I gather some more experience tinkering around Blynk.

I’m saying all this in the context of what will further the growth of blynk.io plan subscriptions. My opinion for what it counts for.The Blynk team ofcourse are the ones holding the can, dedicating their lives and would look at their priorities.

The library uses updation of the widget as the mechanism. Still the same thing.

Probably becasue it is syncing the time from the Blynk Server for Blynk user convenience… much like how BlynkTimer is based on an ‘integrated’ SimpleTimer now.

But if you change to a different NTP source, that generic TimeLib.h library should work fine, just as it would in a bare Arduino sketch.

Don’t assume… some of what ‘we’ get comes from the business development side first :wink: SuperChart and Tiles for example.

No!? How do you intend to use the epoch time?

I get the epoch time and can do a setTime to update the rtc. Without this, calls like now(), hour() etc use the millis counter. The Blynk server rtc sync call used the WidgetRTC library which works only if the widget is declared in the UI. I do understand this is needed to trap the TZ and accordingly set the rtc values.

The NTP code is quite involved. Not worth the effort when the rtc thing works in Blynk. I’m ok if the rtc widget were invisible. This probably is a small thing (that I’m seemingly harping on) amongst other priorities. Best to close this thread here.

3 Likes

Might as well get used to it :stuck_out_tongue: It is not the only widget that just needs to be there for things to work.

Move them out of sight and that should be as good as invisible… works for everyone else.

Aha! I’m a bit slow today :laughing: (no comment about the today part from @Costas or @Gunner is necessary)

1 Like

Hey folks. A year later, this thread was quite helpful to me. I, too, was trying to integrate NTP code into a (new) Blynk application, this time on an ESP32, also unsuccessfully. I need my ESP32 app to always have the right time.

From this discussion, I now use the Blynk WidgetRTC, have the time, and simplified my code. Works fine.
Thanks.

1 Like