tzapu / node-red-contrib-blynk

Blynk app integration with Node Red
MIT License
17 stars 5 forks source link

Issue after loss of internet #6

Closed Toshibass closed 9 years ago

Toshibass commented 9 years ago

Here's another issue: can be replicated as follows: simple node-red flow - inject node with string 101 and blynk write node to v6 value widget , deploy.

remove internet connection to , press inject node , reconnect internet connection , node-red crashes as follows:

24 Oct 21:21:14 - [info] Node-RED version: v0.11.2 24 Oct 21:21:14 - [info] Node.js version: v0.12.7 24 Oct 21:21:14 - [info] Loading palette nodes 24 Oct 21:21:23 - [info] Settings file : /usr/lib/node_modules/node-red/settings.js 24 Oct 21:21:23 - [info] User directory : /home/pi/.node-red 24 Oct 21:21:23 - [info] Flows file : /home/pi/.node-red/new_file.json 24 Oct 21:21:23 - [info] Server now running at http://127.0.0.1:1880/ 24 Oct 21:21:23 - [info] Starting flows blynk server init bla bla New Blynk connection with key bla bla false Connecting to TCP: cloud.blynk.cc 8442 blynk virtual pin write init 9 24 Oct 21:21:23 - [info] Started flows Connected Authorized Blynk ready. bla bla Blynk connect event on node. input on virtual write 24 Oct 21:22:37 - [red] Uncaught Exception: 24 Oct 21:22:38 - Error: read ECONNRESET at exports._errnoException (util.js:746:11) at TCP.onread (net.js:559:26)

Toshi

snip

Toshibass commented 9 years ago

sorry it should say remove internet connection to Raspberry Pi .... Found this problem because my flows had a timed inject node, my internet connection went down and when it was reset node-red crashed/

tzapu commented 9 years ago

hi, the blynk js library seems to do it s own thing regarding connection and reconnection and fail. I ve got a couple of tickets open with them that I hope they will fix shortly. early days still

tzapu commented 9 years ago

added a pull request to blynk js library regarding this https://github.com/vshymanskyy/blynk-library-js/pull/8 hopefully they will accept it in the mean time you could use my fork of the library

Toshibass commented 9 years ago

When you say "in the mean time you could use my fork of the library" how exactly would I do that ?

tzapu commented 9 years ago

hi try wit this command npm install tzapu/blynk-library-js

tzapu commented 9 years ago

but you should do that wherever the folder of your node-red-contrib-blynk is

tzapu commented 9 years ago

or if installed globally (most likely) try npm install -g tzapu/blynk-library-js

tzapu commented 9 years ago

hi, no more need for that, blynk accepted and released a new version with the above included

Toshibass commented 9 years ago

OK I installed latest blynk library 0.0.22 and node-red-contirb-blynk library, it appears this fixes this issue, however before you close could you just confirm if latest node-red-contirb-blynk is still version 0.0.9 ?

tzapu commented 9 years ago

hi, latest is 0.0.12 cheers