Just started experiencing a problem with Blynk and a Raspberry Pi 2, using Raspbian.
When I run my code written in JavaScript and using Node, Blynk says -
OnOff mode
Connecting to SSL: cloud.blynk.cc 8441
Connected
Authorized
But as soon as I start the Blynk App (version 1.7) on my iPhone and run my project page, the Raspberry says -
Disconnect blynk
REARMING DISCONNECT
Note, it did the same using version 1.6 of the App.
It then repeats indefinitely saying -
Connecting to SSL: cloud.blynk.cc 8441
Connected
Disconnect blynk
Connecting to SSL: cloud.blynk.cc 8441
Even when I strip the code back to the simplest, below, I get the same result -
var blynkLib = require(âblynk-libraryâ);
var AUTH = âxxxxxxxxxxxxxxxxxxxxxxxxxxxxxâ;
var blynk = new blynkLib.Blynk(AUTH);
Issue only started in the past week. Worked before that.
I have tried to solve by upgrading the Blynk library, Node, the Blynk App and the Raspberry operating system. Have also tried a new authorization code. No change.
I created a new dash, as you suggested, and the issue appears to have gone. This is good but not good if I need to recreate the dash periodically? Would be great to understand what cause the issue. Any thoughts?
Unfortunately the REARMING DISCONNECT issues has stated on the new dash. I added a 3 x value displays, 2 buttons, 3 x LED and 1 x history graph. Interesting that the LED displays did not function has they previously did. I.e. turn on, before the REARMING DISCONNECT issue reappeared. The other displays worked fine for the short period prior.
Is it possible to run the Blynk local server on a PC running Windows? I donât have a second RPi readily available to act as a server. Any instructions available?
I have also just tried the following without success -
Running the Blynk App on a different iOS device.
Using 4G and not WiFi.
Performing a complete new operating system install on the RPi
In all of the above cases the âREARMING DISCONNECTâ occurred.
I think Iâve found what triggers the âREARMING DISCONNECTâ to occur. When ever I use a Value widget to simply display the state of a GPIO pin on the RPi the issue occurs. If I set the pin to â-â nothing or to a Virtual pin the error does not occur. Iâve have also found that the LED widgets no longer work as they did. These issues only appeared in the past 2 weeks.
Another disconnect issue - Iâve found that if the RPi experiences a short break in Wifi the Javascript/node throws an error and stops executing. Iâm new to JS. How can I prevent the code from exiting, instead have it try to re-establish the Blynk connection?
Iâve included the Javascript/Node error mentioned above here. Every time the internet is disconnected the error happens. My project will have a RPi located in a remote location and internet drop offs will be common. I need the JS code to not crash out, as it does not when this occurs.
Any help would be greatly appreciated!!
events.js:87
throw Error(âUncaught, unspecified âerrorâ event.â);
^
Error: Uncaught, unspecified âerrorâ event.
at Error (native)
at emit (events.js:87:13)
at Blynk.error (/usr/local/lib/node_modules/blynk-library/blynk.js:569:8)
at null. (/usr/local/lib/node_modules/blynk-library/blynk.js:532:48)
at emit (events.js:107:17)
at TLSSocket. (/usr/local/lib/node_modules/blynk-library/blynk-node.js:180:14)
at TLSSocket.emit (events.js:129:20)
at net.js:459:14
at process._tickCallback (node.js:355:11)