New MQTT 5 spec is coming


:large_blue_circle: Blue line represents Blynk library rating on github.
:red_circle: Red is the most popular MQTT library for Arduino.

When we started creating Blynk, there was no adequate MQTT implementations for Arduino. Besides that, we investigated MQTT 3.1.1 and found that it didnā€™t fit our requirements. So we made a decision to create our own protocol.
But weā€™re now waiting for MQTT 5! Good to see that MQTT is getting a lot of features, that weā€™re enjoying at Blynk for 4+ years already :wink:
Maybe, weā€™ll switch to MQTT in the end.
:arrow_right: But it is not for sure, cause it looks like MQTT 5 got bloated so much, it now reminds me of HTTP/2 :rofl:.
In my opinion, it may result in either ā€œheavyā€ protocol implementations, or interoperability issues.
What do you think?

You can find an overview of MQTT 5 here: https://vernemq.com/blog/2018/06/18/is-mqttv5-worth-the-trouble.html
and here: https://dzone.com/articles/mqtt-v5-what-is-on-the-way
The draft spec: http://docs.oasis-open.org/mqtt/mqtt/v5.0/cs02/mqtt-v5.0-cs02.html

If you like Blynk, and forgot to give us a github star - itā€™s high time! Thanks :laughing:
:star: https://github.com/blynkkk/blynk-library

10 Likes

What are these awesome features? Can you highlight a few, please?

1 Like

To name a few (just copied short descriptions from the linked articles):

  • Topic aliases which saves band-with when publishing messages - we use short pin numbers instead.
  • Last Will and Testament with a delay (different in Blynk, but the idea is the same).
  • Request/Response interactions.
  • Negative acknowledgements - makes it a lot easier for a client/server to understand whatā€™s happening.
  • Provisioning features where brokers can tell clients to (re)connect to other broker instances.
  • Pipelining Messages is also possible in Blynk
  • ā€¦

So Blynk protocol turned out to be much more lightweight in terms of data traffic, processing speed, and amount of code/memory usage. It would take a good article to cover all of the differences/similarities :wink:

2 Likes

If changing the underlying protocol will mean that any device can send or receive blynk data via an ā€˜open standardā€™ MQTT server, then yes please.

Under these conditions, itā€™s possible to create apps that receive data originating from a web service, and to share data outside the Blynk app.

Blynk is hands down the best app for getting and setting data on the mobile. But there are other ways one might wish to interract with the data that Blynk does not do.

In general, IoT desperately needs standards. Once they exist, efforts to leverage that standard increase, proper documentation is developed and there will be a larger user-base to share development.

2 Likes

You can use Node.Red + a MQTT broker of your choice to connect any MQTT device to Blynk

2 Likes

Hmmm, I am a little confused. You do realise that the same people who wrote MQ ( that is the industrial version of Message Queueing) and MQTT are the same people? In addition the guys who wrote Node-Red are also in the same team. The original people used to be based in IBMā€™s office in Hursley Park in the UK, although MANY other people have contributed over the years.

Personally, I use Blynk for communicating from a phone to my home server, then use MQTT to communicate between RPis, Arduinos (various forms) and I have found it to be reliable and easy to use for all sorts of date from a single bit to entire photographs.
The way I use Blynk and MQTT together is to use a single Python programme with both Blynk and MQTT libraries loaded and use that for bi-directional messages between my phone and whatever endpoint(s) are involved.

Rather than try and write your own MQTT ā€œthingā€ as an extension to Blynk, why not just do an ā€œapplication noteā€ type of thing with an example of writing say Python (or C or whatever) programme with Blynk and MQTT libraries where the programme will exchange messages between Blynk clients and MQTT queues?
I am happy to post my inferior coding attempts if it will help.

Bruce

PS Just to keep me ā€œup frontā€ I used to work for IBM but not in Hursley and I only met one of the MQ / Node-Red team at an internal meeting - and that was years before I used MQTT

1 Like

Looks like after almost 3 years, MQTT 5 is still barely used

As a newbie here, I have read through quite a bit of the community threads to understand the Blynk protocol better, this kind of broke it down simplistically ( Basics Of Blynk), I like the various options for coding (Arduino, Python etc.) However, looking at product commercialization, and the technologies to connect like NB-IoT, LTE Cat M is it viable to use MQTT as the payload appears to be higher than the current payloadā€¦ maybe I am missing something and not read enough on the Blynk protocol. LwM2M also offers a low payload.

Now one could argue the MQTT / LwM2M vs Blynk, but the low payload is what attracted me to the Blynk platform, I was able to conduct basic testing on a cellular module via AT commands (NB-IoT) compared to about 6 other trial sites.

Suggestion: Would a community driven update / suggestion list not be a better option that will allow for future improvements?

Hi @Vicar, welcome to Blynk.

The discussions around MQTT are mostly because of integrations with other home automation systems such as Home Assistant etc.

Itā€™s not meant to replace the existing protocol over ssl/tls or tcp/ip, or the existing HTTP(S) REST API, but rather as an alternative method of communication with the Blynk server.

BTW, the topic you linked to has a broken link to the documentation. The full Legacy documentation is hereā€¦

Although this is for the Legacy system, the basic protocol is unchanged, but additional protocol definitions have been added.

Personally, I use MQTT and Node-Red for all of my HA projects, with Node-Red providing my logic/rules engine functionality and all devices communication with Node-Red via MQTT messaging.
To facilitate communication with the Blynk server, so that I can use Blynk as my UI front-end, I use the Blynk plug-in for Node-Red, which translates the ssl/tls protocol to MQTT.

It would be far easier if that plug-in wasnā€™t needed, and we could communicate directly via MQTT if we wanted to.
Thereā€™s more info in this more recent postā€¦

Hmmm, weā€™ve had something like this before, and TBH it didnā€™t work.
Blynkā€™s development priorities have always been driven by new business customer requirements, often as part of the onboarding process.
Whilst Blynk are happy to hear suggestions from forum members, a formalised list implies that the idea is somehow in the development pipeline, and leads to ā€œI suggested x three years ago and nothing has happenedā€ type of comments.

Pete.

1 Like

@PeteKnight Thanks for the response, makes sense with having the handlers already pre-defined in plug-inā€™s, I had a look at the upython docs and seems pretty straightforward to implement.

On the suggestions, makes sense and noted. still have lots of reading as I will be building mo own c based file to manage the Blynk interfacing as it is based on propriety software on a module