Blynk 2.0 and MQTT

Yes. I am trying to send to Node-Red mqtt node and to blynk app at the same time.

Georgi

I don’t run any Blynk code on my devices, just MQTT code.
I use the Blynk IoT contrib to send/receive data to/from Blynk.

Pete.

Thank you very much I will check this Blynk IoT contrib.
Is it good idea to send the data via Blynk Api GET from the device or your suggestion is to use Node-Red Blynk IoT contrib?

Georgi

I installed this Node-Red Blynk IOT contrib, but I cant connect. Can you help me please?
I am attaching a screenshot of the node config

You must give a name. You’'ll have to select that name in connection in the properties window of the write-node and fill in the right virtual stream, pinmode stays on fixed.

Like this:


btw, i use Node-Red to communicate between Siemens LOGO 8 and Blynk.

1 Like

You can do either (or both) but the advantage of the contrib is that it establishes an open connection to the Blynk server and will trigger a Write Event node whenever a widget in the app changes state. This means that if you have a button widget attached to V1 then the Write Event node attached to V1 will go from 0 to 1 when the app button is turned from off to on.
To achieve the same functionality with a GET API you would need to keep polling each virtual pin to look for status changes.

Have you read this topic…

Pete.

Thank you very much. The problem is that the nodes says disconnected. When i try the same blynk nodes on my localhost Node-Red they are connected properly. When I use Node-Red on Cloud VM blynk nodes can’t connect

Thank you very much very useful topic! My problem now is that the blynk nodes cant connect.

It’s probably resolving the wrong Blynk cloud server.
Read this, and add the full server URL…

Pete.

I am trying to use the full URL, but still disconected

And does the API call still work from this same machine?

Pete.

You’re not giving much info… is your datastream setup right? Did you already try “restart flow” in Node-Red?

Yes, I am using http request node and sent value to blynk iot dashboard successfully.
I am using V1 in datastream.

Open a terminal session and stop NR with node-red-stop then start it again with node-red-start.
Do you see any clues about what may be causing the issue?

Pete.

Then you need to use also V1 in the write node, now you’re using V5?

I am using Node-Red on cloud (digital ocean virtual machine) so I reboot the machine, but nothing.
Also if I run Node-Red locally it connects without problems. Is it possible this issue to be related with Node.js/Node-Red versions?

So you didn’t like this suggestion….

Pete.

I tried it. But it says not such command when I type node-red-stop in the terminal

https://nodered.org/docs/getting-started/raspberrypi

Pete.

So your suggestion is to upgrade Node-Red version?