Node-red-contrib-blynk-ws state is always disconnected

Hello! First time “blynkerer” :smiley:

I have Node Red running on a Raspberry Pi and controlling several Wemos D1 Mini, Tasmota, eWelink stuff.

I wanted to make a Blynk App on Android and connect to the Node Red, so I installed Blynk as a local server, on the same Raspberry Pi.

All my stuff is in containers, but I did not get to install local Blynk as a container also, so I installed manually.

All is running, I access Blynk Admin page, etc.

So I started to try with a simple thing, I have a sensor for temperature and humidity on Node Red, and I wanted to make 2 gauges on the Blynk App to show this info.

In Node Red I installed node-red-contrib-blynk-ws created 2 write nodes, configured the virtual pin and the connection as the documentation showed.

In the app I connected to my local server, created the project, copied the token to the connection on the Node Red, created 2 gauges and configured the virtual pins on it t match the Node Red ones.

My problem is, in Node Red I always get “disconnected” on the write nodes and nothing happens on the Android app.

I installed a second node-red-contrib-blynk-api that has 2 ways of connecting to Blynk, by websockets and API. I only got it to work with API, and it was rather unstable, but it showed values sometimes, so the API managed to communicate with local server.

I read lot’s of post here today, trying to get a clue to this but I was not successful.

If anyone can help, I would be very thankful.

Forgot to say that it’s last version of Blynk server (server-0.41.15) the app is 2.27.28

First of all, the node red ‘device’ will always show as online in NR, provided your NR connection to Blynk is active.

Are you using MQTT to send the data to Blynk?

How have you set-up your gauge widgets in the app? - connected to virtual pins hopefully, which have the same numbers as the Write nodes in NR and connected to the same device (if you’ve created multiple devices in Blynk).

Have you tried a simple inject node to inject a value into the the Write node?

Pete.

Hello. Thank you for your reply.

“Are you using MQTT to send the data to Blynk?”
No, I’m testing with generated values, but even in real environment the values will come out from a function node on Node Red

“How have you set-up your gauge widgets in the app? - connected to virtual pins hopefully, which have the same numbers as the Write nodes in NR and connected to the same device (if you’ve created multiple devices in Blynk).”
Yes, with virtual pins, and the virtual pins on the app match the ones on the Node Red nodes. Both are on the same device.

“Have you tried a simple inject node to inject a value into the the Write node?”
Yes, that how I’m testing the communication.

Okay, so how is your Blynk connection configured in NR?

As I said, the device will show as connected in the app if the connection is configured correctly. How does the device appear in the status bar at the top of the app?

Pete.

Ok, so this is my NR connection, pictures worth 1000 words :smiley:

1 Like

Okay, you’re using wss, which is the SSL connection. Do you have an SSL certificate installed on your Blynk server?>

Personally I use the ws connection.

There’s also some debate about whether the correct url is websocket or websockets
Previously either would work, and then an upgrade to the Blynk server broke the plural version.
I currently use the singular websocket version.

Also in the screenshots your connection doesn’t have a name in the first screenshot, but you are using a connection called “Blynk device-A6d_3”
Is this just the way you did the screenshots, or are you using a different connection?

Pete.

1 Like

I tried both wss and ws none worked. I have self generated certificates, does this work?

I will try your suggestions with the singular version of websockets.

The name is generated by the system if I don’t give a name to the connection.

I will report back with the testing of your suggestions.

Thank you

I guess so, but I don’t use SSL on my system at the moment.

Pete.

I confirm it works!!!

With “ws” and without the plural!

Thank you!

1 Like

Excellent!

Are you an ‘old hand’ at Node-Red, or is this a new adventure?
There aren’t that many of us on here, although that’s not for want of trying to drum-up support myself!

Pete.

Thanks a lot Pete, for your help. The documentation on the node-red plugins always showed the plural “version” and with WSS, so… No clue there for a newbie like me…

I’m starting my Node Red adventure. I only have about 2 months of work into it.

Although it’s a slow “work in progress”, let’s say working effectively on it about 1 month.

I have several “fronts” open in this “war”, I had a lot of SonOff devices and depended 100% on their app/cloud.

I don want that. I bought an rPi4, and am “slowly” transitioning the Sonoff’s to Tasmota, and I have a couple of Wemos D1 Mini made by myself too.

Control is all about Node Red. But although Node Red dashboard in a web enviroment is Ok, in a cellphone/tablet it’s not. So, Blynk to the rescue!! :smiley:

I will come here often and try to help on what I know.

Thank you very much for this helping start bump !! :+1:

I’ve dabbled with Tasmota a few times, but I have to say that I’m not a fan of it.
I prefer to write my own code for my Sonoffs etc and it give much more flexibility.

I have a mixture of the WiFi smart socket devices. I live in the UK and there are fewer options available for us, as out sockets are different to the EU style sockets. I also have a holiday home in Spain, which obviously uses EU sockets, so that give me much more flexibility about choice. I also use some Shelly1 devices, as well as home-built Wemos D1 Mini/Pro based devices.

I also have a door entry system, solar charge monitor, weather station, blinds (persianas) controller, aircon controller etc that all interface with Node-Red and that gives me the option to control them via Blynk, Alexa, Nextion touch screen, 433MHz fobs or raw MQTT commands.

Everything is controlled via MQTT messaging and I have two Node-Red servers, one in the UK and the other in Spain. I’ve been using Blynk cloud for my apps for a few years, but I’m probably going to migrate everything to local servers running on the same RPIs that act as Node-Red and MQTT servers.

I’m not a fan of the Node-Red dashboard, although I haven’t re-visited it for some time and it might be worth a look again. I looked at Blynk for exactly the same reasons as you, and I love it, especially when used in the way that we use it.

Not sure if you’ve seen this topic that I wrote a while ago…

It needs updating a little, but the basics are still valid.

Pete.

1 Like

Wow! That is a lot of experience right there! :smiley:

I will look in that post of yours for sure!! Thanks!

P.S.: I’m from Portugal, Lisbon.

1 Like

OMG! Pete, that post is … a gold mine!!! :smiley:

And I’m just at the beginning!!!

Thank you!

1 Like

@Zalaban i know you’ve withdrawn the question, but I use Mosquitto as my MQTT broker, it runs on the same Pi as Node-Red and Blynk local server.

Pete.

1 Like

Hi, just to say that I also have the same setup, Mosquitto, Node Red and Blynk local server. All run in containers except the Blynk local server.

I looked at dockerising my setup, including trying-out IOTStack, but for me it caused more problems than it solved.

Pete.

1 Like

I have IOTstack. Everything works fine, only the Blynk Local Server, wich exists in IOTstack, did not work, so I opted to make it stand alone.

I may return to that case and try to dockerising the Blynk also, but for now, “it just works” :smiley:

For me, it was the opposite.
I had a test Blynk server running in IOTstack, but couldn’t figure-out how to successfully enable RAW data storage.
Also, the original developer of IOTstack seems to have disappeared and the project has been forked. The forked version seems incompatible with the original version in some key areas, and the documentation seemed quite poor at the time I did these tests.

TBH, it’s quite a simple task to set-up a Pi from scratch with non-dockerised installs of Node-Red, Mosquitto, Blynk server and Webmin (which I use as a management console for the Pi, and can’t be dockerised). Compared to the amount of time is spent trying to get IOTstack working, the Docker benefits are non-existent for me.

Pete.

Yeah… Local Blynk on IOTstack is quite “green”. So I’ve chosen to “KISS” and make it outside the container, it’s, has you said, quite easy to do.

On the other hand, IOSstack for NodeRed, Mosquitto, TasmoAdmin to manage my Tasmota devides, MariaDB to … be a database where to store everything :smiley: and Portainer to controle/manage the containers. They all work flawlessly and where a breeze to setup and use.

This with the easy to manage backups? A great setup I think.

Later I will add the Wireguard container and access all this in security from where I want :smiley: