tzapu / node-red-contrib-blynk

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

contrib blynk does not recover if mqtt broker goes down #20

Open Toshibass opened 8 years ago

Toshibass commented 8 years ago

As title, needed to reboot node-red to fix the issue.

One point because I am testing Node.js version: v0.10.36 re: #18 issue, my mqtt broker is not on the same pi as this node-red instance. I stopped the mqtt broker nothing related to contrib-blynk.

Welcome to Node-RED

5 Dec 22:36:38 - [info] Node-RED version: v0.12.2 5 Dec 22:36:38 - [info] Node.js version: v0.10.36 5 Dec 22:36:38 - [info] Loading palette nodes 5 Dec 22:37:00 - [info] Settings file : /home/pi/.node-red/settings.js 5 Dec 22:37:00 - [info] User directory : /home/pi/.node-red 5 Dec 22:37:00 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json 5 Dec 22:37:00 - [info] Server now running at http://127.0.0.1:1880/ 5 Dec 22:37:01 - [info] Starting flows Connecting to SSL: cloud.blynk.cc 8441 Connecting to SSL: cloud.blynk.cc 8441 Connecting to SSL: cloud.blynk.cc 8441 Connecting to SSL: cloud.blynk.cc 8441 5 Dec 22:37:05 - [info] Started flows 5 Dec 22:37:05 - [info] [mqtt-broker:8084e98a.7f7b18] Connected to broker: mqtt://192.168.0.98:1883 Connected Connected Connected Connected Authorized 5 Dec 22:37:05 - [info] [blynk-server:39b0b4e1.c64f4c] key: Bla bla connected Authorized 5 Dec 22:37:05 - [info] [blynk-server:c3307c50.3ccf8] key: bla bla connected Authorized 5 Dec 22:37:05 - [info] [blynk-server:c1c8f31f.3e371] key: bla bla connected Connecting to SSL: cloud.blynk.cc 8441 Connected Authorized 5 Dec 22:37:09 - [info] [blynk-server:7f2dce8b.80d23] key: bla bla connected 6 Dec 06:04:10 - [info] [mqtt-broker:8084e98a.7f7b18] Disconnected from broker: mqtt://192.168.0.98:1883 6 Dec 06:04:47 - [info] [mqtt-broker:8084e98a.7f7b18] Connection failed to broker: mqtt://192.168.0.98:1883 6 Dec 06:04:55 - [info] [mqtt-broker:8084e98a.7f7b18] Connection failed to broker: mqtt://192.168.0.98:1883 6 Dec 06:05:14 - [info] [mqtt-broker:8084e98a.7f7b18] Connection failed to broker: mqtt://192.168.0.98:1883 6 Dec 06:05:20 - [info] [mqtt-broker:8084e98a.7f7b18] Connection failed to broker: mqtt://192.168.0.98:1883 6 Dec 06:05:29 - [info] [mqtt-broker:8084e98a.7f7b18] Connection failed to broker: mqtt://192.168.0.98:1883 6 Dec 06:05:44 - [info] [mqtt-broker:8084e98a.7f7b18] Connected to broker: mqtt://192.168.0.98:1883 6 Dec 06:56:33 - [info] Stopping flows <--- Note* left it for 50 minutes before rebooting nr

tzapu commented 8 years ago

hi, everything in the log says that mqtt is not connecting, can t see anything about blynk. does it show disconnected in the interface?

Toshibass commented 8 years ago

For sure your right the original problem is that Mqtt disconnects (a problem being chased via the node-red group) note every thing runs for 8 hours before Mqtt fails. however as you can see 06:05:44 Mqtt connects but at this point blynk is not connected and even after 50 minutes blynk fails to reconnect.

tzapu commented 8 years ago

maybe blynk was already dead because of other reasons i ve added a local installation of the blynk server, together with a remote node red and am pushing quite a bit of data through it to see what happens, maybe we ll get to the bottom of this. so far for me it auto recovered from a closed terminal that killed the blynk server... 1 2

Toshibass commented 8 years ago

Note. MQTT disconnects issue has been rectified in the latest node-red update v0.13.3

tzapu commented 8 years ago

so it means we couldn t track this because it was in node red ? weird :)

qm3ster commented 8 years ago

@tzapu this should probably be closed now? And what are those light blue nodes in the middle, with gauges on them?

tzapu commented 8 years ago

@qm3ster emoncms.org nodes

also, disconnection happened to me again, even with 0.13.3

at some point soon, i will advise everyone to move to the websockets version of this it s just a lot more stable and a lot faster