Have project with Blynk App on Android controlling some GPIO,s on SparkFun ESP8266 Thing - Dev Board connected to my WiFi. That project has been working great for 6 months. I also have a Raspberry Pi running Node-RED and Mosquitto MQTT Broker connected to my local network. All the nodes in the flow work except for Blynk Write Event. Not sure how to configure Blynk Write Event. Which URL should I use,Blynk cloud or local? The error on the node is disconnected. When I deploy that node is not properly configured. I am using Button virtual pin in the Blynk App project that connects to SF ESP8266. Do I have to create another project? Any help or direction would be greated appreciated.
You don’t say if your Blynk project is on the cloud server or your own local server, but as you’ve not mentioned having a Blynk local server, I’ll assume that it’s on the cloud server.
In the Blynk Write Event node properties, create a new connection using the pencil icon at the side of the box that says “Add a new blynk-ws-client…”
Enter the Blynk Cloud URL and the Auth Code from your project on the phone…
Give this connection that’s the same as the one that you gave the device in the app project - this makes it easier in future. The best way is to copy and paste the auth code from the notification e-mail you received from Blynk, ensuring that you didn’t miss any characters or add any unwanted spaces.
That’s it - deploy the flow and it should say “connected to pin V…” at the bottom of the node.
A couple of things to remember though…
When you add a new Blynk node of any type it will assume that you want to use the same connection. This gets confusing if/when you add more devices, as each will have its own auth code and therefore it’s own connection in Node-Red. You will also need to choose the correct device in the widget properties in the app.
It’s nice and simple with just one device at both the app and Node-Red end, but requires the extra step of choosing the device in the app and the connection in Node-Red when you have more than one device in a project.
If you want to know more about using Node-Red and Blynk then you might find this helpful:
I’ll be adding another installment or two in the next week or so.
Thanks for the information, my Blynk project is on the cloud. This is the information configured for Write Event.(Not sure how to copy image of event node?)
Connection:blynk cloud server
Auth Token from my Blynk project
Using Button Widget with Virtual PIn in App.
This is line of code from project: Blynk.begin(auth, ssid, pass, “blynk-cloud.com”, 80);
Plus my WiFi credentials:ssid,pass.
I have read your home automation project sveral times, great project and good information .
Write Event still shows disconnected.
Do I need to add “blynk-cloud.com”, 80); ?
Should I be using a Read Event? I tried but did not work.
I was able to ping blynk-cloud.com from Raspberry PI, you were correct about the auth code. I inadvertly included quotation marks. The node is now connected and everything works great! The Sniping Tool works great! I dragged the images (PNG) to this reply but they do not show correctly. I will have to work on that. Thank you very much and Happy Holidays.