Error connect blynk and node-red

hello blynker … i am looking for a way to connect blynk with red-node … i have read some related articles but have not found a solution … so what should i do
Here I use local server

Well, according to your screenshot your green Blynk Write nodes are connected successfully - it says “connected to pin Vxx”.

I think your issue is that you’re probably sending the wrong type of payload message to these Blynk Write Nodes. You’ve not shown how the nodes on the left (dashboard nodes I guess - I don’t use the Node-Red dashboard myself) are set-up, or what the output from your debug node is.

The Blynk LED widgets need a message payload value from 0 (off) to 255 (on at full brightness). Sending “125” will light the LED widget at half brightness. Sending “1” will light the LED widget very slightly, but it will appear to be off.

You could either configure the nodes on the left to output 0 / 255, or insert a Change Node to change the payload:


thanks … whether according to photo i have wrong configuration ?? I have adjusted it to 0 and 255 … although it has already connected records but when node-red changes blynk remains the same

Do you have more than one project on your phone, or more than one device in your project?

If so, you should check that the LED widget is in the correct project connected to the correct device (the same project auth code and device name that your LED1 node is talking to)


no…I only have 1 project and choose V12 virtual pin in both blynk app and node-red
This is the led 1 configuration

Is port 9443 the port that you have set-up for SSL on your local server?

I use the cloud server, so I’m no expert on this, but I think the port used to be 8441, but it changed to 9443 recently. I believe that you can specify your own custom port numbers, so you could at some point (whether intentionally or not) have chosen to use a different port.
What do you have set-up in the custom server settings of your app?

I have no idea if it would still show as connected in Node-Red if you were using the wrong port setting there, maybe you should experiment a little and see what happens.


That’s right … my port set ssl to 9443 so I don’t understand
thanks for help

What happens if you try the other way around…
Add a button widget in the Blynk app, connected to say V20.

Add a Blynk write node in Node-Red connected to virtual pin 20 and wire it to a debug node and deploy.

When you put the app in Play mode and press the button widget what happens?


blynk and node-red states are heterogeneous even though the value has been sent

Sorry, I don’t quite uunderstand your reply.

Did anything appear in the debug monitor screen in Node-Red when you pressed the button widget in Blynk?


no … actually my problem is your question

Okay, I’m out of ideas.
Maybe @gab.lau can chip-in?


I do not use the node-red dashboard, but I can try and let you know!

Me neither, but he can’t even get a Blynk write node to output to the debug window, but this screen shot seems to show that the data is being received:



But is the 12 pin an LED?
why do you write us true or false?
it should be 0 for off and 255 to on

Yes, you’re correct - they are virtual writes, not reads as I’d thought

@thanh - We need more clarity from you about what happens when you try this:

and what exactly the screenshot you supplied relates to.


OK it works but you have to be careful in configuring the switch UI node!

In blynk app:

  • a button (V6) in switch mode to output 0 and 255
  • an LED (V7)

In node-red

  • a “Write event” not set pin V6 to read from button
  • a “Write” not set pin V7 to write on led
  • a switch UI node, configure with:
    check " If msg arrives on input, pass through to output:"
    When clicked, send:
    on payload as ‘String’ and 255 value
    off payload as ‘String’ and 0 value

IMPORTANT: the switch ui node "accepts as input what it must give in output" so it must be put type "string" because the event node returns a string


So now the button in the app and the switch in the ui will be synchronized

Sample flow below:

        "id": "31d224ca.0dcd7c",
        "type": "ui_switch",
        "z": "487e4c7.38d5eb4",
        "name": "Led switch",
        "label": "switch",
        "tooltip": "",
        "group": "9ed965a1.157dd",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "",
        "style": "",
        "onvalue": "255",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 459,
        "y": 238,
        "wires": [
        "id": "c113077e.15d4e8",
        "type": "blynk-ws-in-write",
        "z": "487e4c7.38d5eb4",
        "name": "Button",
        "pin": "6",
        "pin_all": 0,
        "client": "8096728c.4c64d8",
        "x": 260.5,
        "y": 240,
        "wires": [
        "id": "52b03515.a8e534",
        "type": "blynk-ws-out-write",
        "z": "487e4c7.38d5eb4",
        "name": "Led",
        "pin": "7",
        "pinmode": 0,
        "client": "8096728c.4c64d8",
        "x": 644.5,
        "y": 237,
        "wires": []
        "id": "9ed965a1.157dd",
        "type": "ui_group",
        "z": "",
        "name": "Default",
        "tab": "7dcaad4e.ad6994",
        "disp": true,
        "width": "6",
        "collapse": false
        "id": "8096728c.4c64d8",
        "type": "blynk-ws-client",
        "z": "",
        "name": "Progetto Test",
        "path": "wss://",
        "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "dbg_all": true,
        "dbg_read": false,
        "dbg_write": false,
        "dbg_notify": false,
        "dbg_mail": false,
        "dbg_prop": false,
        "dbg_sync": false,
        "dbg_bridge": false,
        "dbg_low": true,
        "dbg_pins": "",
        "multi_cmd": false,
        "proxy_type": "no",
        "proxy_url": "",
        "enabled": true
        "id": "7dcaad4e.ad6994",
        "type": "ui_tab",
        "z": "",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
1 Like

thanks … i did it … i configured it wrong on the blynk app … i switched the level of the button to 1 instead of 255.
Thanks again for the help @gab.lau @PeteKnight

1 Like

@PeteKnight @gab.lau does this works only with virtual pins ??
i’m using Nodemcu and i couldn’t write or read an event from blynk

it does work if i use MQTT
but i wanted to read DHT-11 sensor values and send orders to relay from node red to blynk directly

i need some help right here