Problems with blynk local server

i’m thinking about using Blynk to visualize data pushed from a Photon device at a rate of 512 mesages per second. for that purpose, i’ve installed a local server (seever-0.21.8) on a windows host and configure the file with user.message.quota.limit=512, and the .ino file for the Photon device with BLYNK_MSG_LIMIT = 512. At first, i’ve configured the timer with a period of 10ms (higher than the 2ms period for 512mssg/sec), as can be seen:

// This #include statement was automatically added by the Particle IDE.
#include <SparkCorePolledTimer.h>

// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>

#define BLYNK_PRINT Serial
#define BLYNK_MSG_LIMIT      512

char auth[] = "xxx";

SparkCorePolledTimer myTimer(10);  //Create a timer object and set it's timeout in milliseconds

void setup()

//  Blynk.begin(auth);
//  Blynk.begin(auth, "your_host"); //or
  Blynk.begin(auth, IPAddress(xx,xx,xx,Xx));


void sendUptime()
  Blynk.virtualWrite(V5, millis()/100);

void loop()
{; // all the Blynk magic happens here

However, when running the server, and trying to visualize the data on the blynk app, the result is that after displaying the values for a short period of time, the message “Device is disconnetcted” appears on the app, and this behaviour is consinuosly repeated …where is the problem?. any help will be appreciated. thanks

It is late (early) here and I should be dreaming, not typing… but one last semi-assist :stuck_out_tongue:

Without trying to go through your code… I am going to take a stab at the whole 512 msgs per second bit… even with Local Server, perhaps you are simply overloading things? Blynk still needs time to do heartbeat or connection checks :wink:

Reduce the messages, and/or increase the timing… test until stable, then slowly increase until you get to the limits of whatever it is you are trying to do.

… thanks for your answer … for the test i’m running, the rate is just 100 msg/sec (since the timer period is 10ms), and from the blynk docs, it is supposed to suport “hundreds of requests” … have a good night :wink:

PS. i’ve increased the BLYNK_MSG_LIMIT value, and it seems to work much better, so a new question arises … which parameter does BLYNK_MSG_LIMIT define? which is the unit of this parameter?. thanks

@fbto particle photon is not capable for such loads. You need to consider another hardware for such high request rate.

Hi @Dmitriy … thanks. well, in case i’m interpreting correctly the results from my first attempt, i obtained a quite satisfactory behaviour, at least from the data values locally stored, which shows that a message is sent each 2ms from the Photon device:


… and from the rate/user shown in the admin panel:

Any comment about BLYNK_MSG_LIMIT will be appreciated. thanks

Yes. But right after your particle dropped connection. As soon as connection is not able to accept data you’ll get buffer overflow and hardware connection drop.

It is stated in docs and in config file. This is maximum allowed messages per second for hardware.

… yes, of course, in that case, i agree with your comment.