Using Raspberry Pi and node.js my app, (apparently) while idle throws REARMING DISCONNECT message followed by repeated connecting and connected disconnect messages then crashes.
The app will run for hours to more than five days error free. I issues no more than two requests every thirty seconds. There is another app running on a second RPi connected via sockets that logs activity.
I could really use events telling my app that REARMING is in process and FAILED or COMPLETED if there is not an internal fix for this.
Here is an excerpt from the console log.
Connecting to: blynk-cloud.com 8441
SSL
authorization...
Connected
Authorized
Blynk is Online! << This comes from my app.
— Runs fine for hours to days then
Disconnect blynk << My app does not get an interrupt. see code below.
REARMING DISCONNECT
SSL authorization...
Connected << My app does not get an interrupt on this connection
--- Runs fine for hours to days Repeating the disconnect - reconnect now and then
--- Never offline for more than a few minutes and typically only seconds
--- I have a socket connection to another Raspberry pi that logs data
--- Seems normal with infrequent interruptions
Disconnect blynk
REARMING DISCONNECT
SSL authorization...
Connected
— Runs fine for hours to days then
Disconnect blynk << My app does not get an interrupt. see code below.
REARMING DISCONNECT
Connecting to: blynk-cloud.com 8441
SSL authorization...
Connected << My app does not get an interrupt on this connection
Disconnect blynk
REARMING DISCONNECT
SSL authorization...
Connected
— This cycle repeats more than 150 times. While this is occurring,
— my logging server repeatedly pings this RPi and time.com
— without interruption or significant delay.
error @ line 221 ECONNRESET
events.js:142
throw err;
..... crash! The trace listing only lists Blynk's blynk.js and blynk-node.js modules
My connect / disconnect event code:
The connect code fires and works at initial connect only.
blynk.on('connect', function() {
BLYNK_CONNECTED = true;
console.log('Blynk is Online!');
ledColor(BlynkLED, GRN);
init();
});
The disconnect code works properly when I explicitly close the connection
blynk.on('disconnect', function() {
DATE_TIME = DateTime.create();
EventTimeDisplay.write(DATE_TIME.format('H:M:S') + ' ' + CURRENT_TEMP + 'F');
ActivityDisplay.write('Blynk Disconnected');
ledColor(BlynkLED, RED);
})