BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Refresh interval does not seem to work

Hi, after some months of break I have started now with a new project. Now it seems that using a display in the app which supports a refresh interval does not send the corresponding events. I have tested it with Python on both macOS and ESP8266 MicroPython. Connection is fine, I can use buttons in the app which write to a virtual pin and I can send data from the device to the app display. However, when setting the refresh interval of a display to some value (1 sec, 2 sec, …) it does not trigger the event in my program.


import blynklib
import random

BLYNK_AUTH = 'xxxxxxx'

# initialize blynk
blynk = blynklib.Blynk(BLYNK_AUTH)


READ_EVENT_PRINT_MSG = "[READ_VIRTUAL_PIN_EVENT] Pin: V{}"

# register handler for virtual pin V11 reading
@blynk.handle_event('read V11')
def read_virtual_pin_handler(pin):
    print(READ_EVENT_PRINT_MSG.format(pin))
    blynk.virtual_write(pin, random.randint(0, 255))


WRITE_EVENT_PRINT_MSG = "[WRITE_VIRTUAL_PIN_EVENT] Pin: V{} Value: '{}'"

# register handler for virtual pin V1 write event
@blynk.handle_event('write V1')
def write_virtual_pin_handler(pin, value):
    print(WRITE_EVENT_PRINT_MSG.format(pin, value))
    blynk.virtual_write(11, random.randint(0, 255))


while True:
    blynk.run()

I would expect that the read_virtual_pin_handler is called every second when the refresh interval of the display in the app project is set to 1 sec.

App is running on iOS 14.0.1 and iPadOS 14.0.1. On device side I use Blynk for Python v0.2.6.

Is this a known behavior? What else could I test? Thanks!

I have the same issue with my application which worked fine for months !
I refresh a lcd display all 1 sec with thé BLYNK_READ() function, this refresh don’t work anymore since this morning. I assume that it is a bug ?

Should be ok for you too now ???

Yes, looks good! :grinning: