Timer when wifi off

Hi,
On blynk 2.0 timer function working when wifi is off?

Do you mean the use of BlynkTimer in your sketch, or are you talking about the use of the Timer widget, or timers in automations?

Pete.

Dear Pete,
Thanks for answering.Sorry, I am new on blynk sistem, programming and there is no enough information, examples about timer on blynk 2.0. I can say what i am exactly needed.
I want it to control outputs at the appointed hours of the day. On the “Advanced time input” i see that options which I can choose hours or minutes of weekdays, but I don’t know what going to happen when wifi going off? It will continue operate when wifi is off?

Without some programming skills, this is going to be a difficult project.

If the device is not connected to WiFi when you enter the revised time schedule in the app then the device won’t know about these changes. If it later connects, and you tell the device to get the updated schedule when it does connect, then you would be able to ‘download’ the new schedule and apply it.
However, you would need to take care with the way that you connect to Blynk, as the Blynk.begin() method is blocking, and will prevent code execution if the device cannot connect to Blynk.
You can get around this by using Blynk.config and Blynk.connect
If your device regularly loses internet connectivity then you may wish to store the schedule in non-volatile memory - preferably using SPIFFS or LittleFS on a NodeMCU or ESP32.

Pete.

Example : on sonoff Ä°OT devices once time function added devices continue his date even wifi is off. So if date schedule already sett when Wifi is on and during loses internet connecticity do you mean that esp not going to operate his program cause no connections with blynk server?

No, that’s not what I said.
If you write the software correctly, it can work the same way as the Sonoff.

Pete.

If i understand correctly, i must write software inside arduino not on blynk control automations which is always connected to blynk server.

Blynk doesn’t currently support offline automations, so you would need to write your own software (using the Arduino IDE) to store and act upon the time schedule that you input via the Blynk app.

Pete.

1 Like

Thanks for support.

Actually, we do. Currently, this feature is under the testing phase by our big clients.

3 Likes

Offline automations is an interesting feature.

Are there any plans to provide this for FREE or PLUS plans in any reasonably near future?

Looking this video, i think RTC can work without RTC module. Date will be sync when wifi is on, during off condition arduino milis going to calculate date.

It is of course possible to run timed schedules quite long even off line. Either with an external RTC hardware or just running with internal clocks of esp82666/-32. Easy to survive 12-24 hours with good enough precision for most “normal” operations.

But you must implement more yourselves…


If blynk implements this, there will be a gui for it. Which you otherwise have to implement.

You only need a hardware RTC is if you need to be able to know the current date/time after a hardware reboot with no internet connection.

You wouldn’t use millis to maintain the time during an offline period, you would use the Time library, maybe with the Timezone library as well. These libraries use millis in the background, but take all of the hard work out of the process.

Pete.

3 Likes

To set expectations correctly: offline automations will not be included in free or plus plans.

1 Like