Update a value when device wake up from deepsleep

Hi All,
after checked several sites and topics I could not find an adequate solution so I need some help.

I built a temperature logger with DHT22 and ESP 8266 (ESP-01). Code is working fine:startup, measure, send to Blynk, go to sleep for 3 minutes, wake up again, measure, etc… Superchart also super.

I would like to change the sleep time variable (between 1 and 30min) from Blynk app, with a Slider widget but my device is in offline almost always. I have tried use BLYNK_WRITE(Vxx) but it is working only when device is online. (Blynk app always run on my smartphone.)

Is there any way to read a virtual variable value (which may changed during the device was offline) from Blynk app when my device connecting again to Blynk server or it is possible only with continuous online device?

Now I send the measured values (temperature, humidity, battery voltage, wifi signal strenght) in BLYNK_CONNECTED() {…} and it is working fine, but I don’t know how can I read a virtual value from Blynk app during my device is online.

HW and SW details :
• Hardware model + communication type: ESP8266, ESP-01
• Smartphone OS: Android 5.1
• Server: Blynk server
• Blynk Library version: v0.5.1

Thanks in advance!
Regards,
aquarius

I guess you’re going to have to do a sync with the server to get the new value:

http://docs.blynk.cc/#blynk-main-operations-state-syncing-for-hardware

The problem is that this will probably add to the uptime needed, which will hit your battery life.

Pete.

Thank you Pete, good idea but not working unfortunately.
I have tried Blynk.syncAll() and Blynk.syncVirtual(Vxx) too in BLYNK_CONNECTED() section.

I will try to find another method, may do some timing variations.
Regards,
aquarius