Sometimes I get continuously connect and disconnects in rapid succession, then SSL certificate fail and suddenly everything crashes. Using the JS library.
I don’t know if it is a library’s fault or some problems in the server. Yesterday and today is happening much more frequently, but it might be a coincidence.
Did you measure that statistic with a slider? Are you sure it is not “works 0.99%”
Seriously, I don’t know… but JS is more a Beta+ library then anything official, as far as I can tell… so stability issues might occasionally happen, particularly with the overhead demand of SSL.
By comparing the two examples… Sesame Street stuff… “one of these things is not like the other…”
SSL
var blynk = new Blynk.Blynk(AUTH,
options= { addr:"127.0.0.1", port:8441 }
);
TCP
var blynk = new Blynk.Blynk(AUTH, options = {
connector : new Blynk.TcpClient( options = { addr:"127.0.0.1", port:8442 } ) // NOTE port should now be 8080
});
Connecting to TCP: blynk-cloud.com 8442
Connected
Disconnect blynk
Connecting to TCP: blynk-cloud.com 8442
Connected
Disconnect blynk
and so on forever. At least it is not crashing. I think there is a loop somewhere (I wasn’t able to find it) that when it disconnects, it tries to reconnect and disconnect at the same time going into a loop of disconnection and reconnection. And with SSL I think every time a new instance of something is created, such that every cycle more and more instances are present, leading to a crash when they are too much (memory?).
Or possibly the RPi is just ‘burping’ it’s WiFi? My RPi3 was very unstable with it’s WiFi… I never bothered to troubleshoot as I can, and did, easily plug it into Ethernet on my workbench. Solid connection since.