Blynk Data Transmission Limits

I am trying to better understand the data transmission limits that will result in a disconnect from Blynk.

I have seen guidance that there is a limit of 10 values per second using vitrualWrite commands.

However, I haven’t seen any guidance regarding the LED widget or the Terminal widget.

So I guess my question is…

Does the 10 value per second limit apply only to virtualWrites?

Or does the 10 value per second limit also include data that is transmitted via widget specific commands such as LED.on() and LED.off() and terminal.write("")?

Thanks in advance.

Hello.

You have 10 req/sec per virtual pin and 100 req/sec total per device.
LED.on() is actually an API for virtualWrite, so limits are the same.

Thank you! Very helpful!

Regarding the API comment, I would interpret this to mean that putting LED.on() and LED.off() statements in the main loop() function is not advised?

That said, I currently have an app running with 3 if statements in the main loop. Each if statement turns an LED on or off and I don’t seem to be having any disconnect issues. I did have major issues when I put traditional virtualWrites in the main loop() function.

Does the LED.on()/off() API do something in the background that prevents actual virtualWrites on the LED’s if the limit will be exceeded? Or am I just getting lucky right now and not seeing any disconnects since my program is small?

Correct

That’s not how to structure a good Blynk sketch.
Read this:
http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-basics/keep-your-void-loop-clean

Pete.

Thanks Pete. I have read that and am aware. This was a test program I made trying to work out what the actual limits were (in particular for the LED calls) before Dmitriy explained them.

Anyways, to answer my own question, I added some serial print statements in each if statement where I was calling the LED API. Turns out each statement was executing 4-5 times per second. So 4-5 sends per second per virtual for a total of 12-15 sends per second on all 3 virtuals. This was below the 10 req/sec per virtual and 100 req/sec total limits that Dmitriy spelled out, thus why I wasn’t getting disconnected from Blynk. Clearly not sustainable as programs get bigger.

Anyways, thanks for all the help. I think this one can be closed!