MQTT or node red support

Sorry if this is not the right place to post this.

I will have (hopefully soon) a lot of devices in the house, most speaking mqtt to a mosquitto with node red server.

I would love to be able to read and control such devices from the blynk app.

That would mean either the ability to send and receive mqtt packages, or a way of sending and receiving data from some nodered node. Will there be such an API available on the server?

Will I be able to add a widget that will call a http endpoint from the server instead of triggering a gpio on a device?

Cheers

2 Likes

Hello, tzapulica.

Right now we use own binary protocol. But we plan to switch to MQTT in first release as right now our own looks pretty similar to MQTT. But don’t know if we’ll have enough time for that.

Regarding - own widget… I think this not possible, but you will have source code of server. So you will be able to do that on server side.

Regards, Dmitriy.

3 Likes

This is a great idea +1

+1 for mqtt! It would integrate into our system so well!

i now have some esp8266 nodes sending mqtt data. i would love to be able to funnel the mqtt data in the blynk server to see it in the blynk app.

i know it will have an esp firmware, but instead of adjusting my nodes to use a new firmware, that i do not know yet what it would allow me to do, it would be so much better to just be able to add my existing sensors into the blynk ecosystem using a standard (mqtt)

i have looked high and low of an app that would let me display and action on mqtt data and i found nothing that looks 10% as good as the 0.0.3 alpha blynk app…

:smile: just adding my two cents in, again :stuck_out_tongue:

Hello, tzapulica

but instead of adjusting my nodes to use a new firmware, that i do not know yet what it would allow me to do, it would be so much better to just be able to add my existing sensors into the blynk ecosystem using a standard (mqtt)

in that case you’ll need to form MQTT message body according to Blynk App format.

@Dmitriy thanks for the response. That sounds like an interesting possibility.

Would the packets be mqtt standard and i just need to make sure they are being set to the proper topics or would i need to modify the protocol/packets?

Cheers

/edit: are there any docs posted related to this?

Would the packets be mqtt standard

Yes.

i just need to make sure they are being set to the proper topics

Indeed our server is simpler then average message broker. And in current server implementation Blynk connect is similar to MQTT - connect, subscribe(auth_token).

are there any docs posted related to this?

Not yet, cause I didn’t start MQTT yet.

In cas you’re still working on this, Tzapulica… I’m using Blynk server locally and Node-Red. I have the node-red blynk nodes talking to the Blynk server, then via a function node it is easy to send and received MQTT in Node-Red to do whatever you want. The ONLY issue right now - and I have informed the writer of the Node-Red Blynk node, all goes well unless for some reason you stop the Blynk server - at which point the Node-RED nodes disconnect (obviously) but DON’T automatically reconnect to the Blynk server when it comes back on. I’m looking at his code now but I’m not sure I’m up to fixing this - if anyone does fancy their chances modifying the (not THAT complicated node .JS) then please do get in touch.

Using the Raspberry Pi mode, you get 64 virtual pins - which is just as well as a complicated installation could easily run out of the normal 32 pins. Case in point - I run 2 installations of Node-Red and various controllers - and right now they are on separate Blynk servers, well isn’t it a COMPLETE PAIN having to sign out of one and into the other (I’ve mentioned this to the authors) so on the surface of it, simply having ONE Blynk server and have your various Node-Red installations talking to it is great - but if that one Blynk server goes down even for a moment, the whole lot come to a halt. So this node needs fixing - and once it is fixes we have one hell of a powerful way to use Blynk, not least for monitoring multiple site info.

1 Like

thanks @scargill for taking the time to write such a detailed post regarding this, it really is much appreciated.

i am actually the dev of the node-red-contrib-blynk node and have received your bug reports, i will try to sort it as soon as i get a min, no longer than a couple of days i m sure.

the blynk lib itself has some reconnect routines that seem to work fine for when the computer looses connection, but i never tried with the server going down

here s what i see when i loose connection for instace

22 Nov 21:17:32 - [info] [blynk-lcd-print:f629c0bd.775d] disconnected
Connecting to SSL: cloud.blynk.cc 8441
Error ENOTFOUND
Connecting to SSL: cloud.blynk.cc 8441
Connected
Authorized
22 Nov 21:17:38 - [info] [blynk-server:23f12591.81dfba] key: key connected

will try again with a local server
cheers

1 Like

guys, i added a fix in a pull request to blynk-library-js that got included but i think @vshymanskyy would need to bump the ver before we can update to it and have the connections retry in case of server down

1 Like