Today after some trying to use notification i found a issues :
i used notification when press a button so after run project App doesn’t send any notification and app disconnected from server (maybe server crashed) and app say “reconnect to server” when i remove notification code that work well so what is this issues i’m so worry about this Problems
i remove the App from phone and reinstall it but doesn’t fix !!!
Sounds like you were probably spamming the server so it kicked you off.
Do you have a tiny piece of code that demonstrates what you were doing with the Notification widget.
The sketch work with other account and local server.
and some times work good and more time take erroe and crash server and reconnect server
if(Setting != 1) {
digitalWrite(L3, HIGH);
Blynk.virtualWrite(V3, HIGH);
Blynk.syncVirtual(V3);
if (Notify != 0) {
Blynk.notify("Button pressed");
}
}
else {
}
You can set Local Server to allow more notifications:
But you cannot do that with Cloud Server:
Introduction - Blynk Documentation & https://github.com/blynkkk/blynk-server#advanced-local-server-setup
And what does this do? first you set V3 HIGH then you tell it to process whatever widget/function is on V3 with that setting. So between that and the notification, as well as your sketch possibly trying to quickly repeat this “tiny piece of code” you might be pushing too much to server and causing disconnection.
update status of virtual button pin on app
The Sketch work on another local server and devices.
i did set the frequency to 1 sec.
i’ don’t know why but the notification sometimes work and sometime doesn’t work and after several minutes or seconds it’s pop up all notification together (i.e. popuo 10 notofication together)???
Then you shouldn’t need the Blynk.syncVirtual()
What that does is act as if you pressed the button.
you mean Blynk.virtualWrite(V3, HIGH);
will be update the virtual pin and doesn’t need to Blynk.syncVirtual()
Correct… although I am unsure if you need to use 1 instead of HIGH… try it.
So basicly you were sending two commands immediately back to back, followed by reaction:
-
One resetting a button to 1/ON/HIGH (not necessary if button is in Momentary mode)
-
Followed by the command to act as if you pressed it, probably being processed as 0/OFF/LOW since you just set it 1/ON/HIGH (unless it IS in Momentary mode, then it just went 1/ON/HIGH again)…
-
Followed by your sketch trying to do whatever it is supposed to when you press the button.
AKA possibly too much too fast, particularly for Cloud Server.