Nodered + Blynk + LocalServer

Hello everyone.
i just installed NodeRED with node-red-contrib-blynk-ws pallete in order to control my Blynk local server. (I 've been using blynk for personal projects, but alwayd throw Blynk-cloud)

I couldn’t find the way to manage digital pins from websocket nodes. Researching, i found it is possible using GET HTTP request (from network pallete) but just over blynk-cloud URLs, (and not over local-host ones).
I couldn’t find any NODE at BlynkWS pallete which operates over digital pins… just over virtual pins (write and read events)

Do you know about any way to “deploy” over physical outputs from nodeRED?

I was thinking to handle virtual pins (at nodeRED), to convert them lated into hardware, using something like this at IDE:
BLYNK_WRITE(V11) {
int aux = param[0].asInt();
digitalWrite(D1, aux);
}

but nodeRED aplies over Virtual pins just at APP, but not over HARDWARE. Is there any way to force the sync from app to hw?

It is my first post. Sorry for the format, sorry for my english :slight_smile:

Thanks in advance

I use Node-Red and Blynk for all of my projects, but I don’t normally run Blynk code on my devices. Instead, the communication between the device and Node-Red is done via MQTT, and Node-Red then acts as the gateway between Blynk and MQTT.

If you insist on running a Blynk code on your devices then the code example you posted is the way to do it.
In either case, don’t forget to do the pinMode declarations for your physical pins in your void setup.

Pete.

thanks @PeteKnight!
Using your configuration, are you able to use Blynk Apps at mobile devices? --> My wife could kill me if I replace our digital switches and cell-tools (again)

Pobably, it is time to migrate to MQTT. I never used it before, but if all flow samples ends over a “MQTT Out” node, must be a signal.

I suppose Blynk Server/NodeRed/BlynkAPP are going to be usable, and I just need to change the code on my devices, is that correct? I coundn’t figure out how to handle auth() to registrate decives without blynk.ino codes, but I will need to research before ask.

Thank you!

Yes, of course.

Yes, you’ll need to change your code and devise an MQTT device structure.

I’m not sure that I understand the question.

Have you read this topic…

Pete.

thank you very much!
To be honest, initially, I ingnored the topic because I was skipping MQTT topics, but now, reading about your experience, I just decided t follow your steps and begin with MQTT.

Your proyect is Incredible!. I will be in touch showing my progress, and probably, biulding a spanish version :). Thank you!!

I just installed Mosquitto Broker into RPi, I flashed a NodeMCU with Basic ESP8266 MQTT example, I modified my nodes at nodeRED, and IT IS WORKING…

I use Node-Red and Blynk for all of my projects, but I don’t normally run Blynk code on my devices. Instead, the communication between the device and Node-Red is done via MQTT, and Node-Red then acts as the gateway between Blynk and MQTT.

@PeteKnight, you are THE BOSS!

1 Like