Advanced Users can post their questions and comments here for the not so Newbie crowd.

Moderator: eriksl

User avatar
By davydnorris
#88176 Hi all,

Just thought I would share this with you all. As many of you know, the MQTT library that comes with the ESP8266 SDK is based on the work by tuanpm and, while I don't want to take anything away from his fantastic work, it has a number of serious problems when you need to go to higher level QoS, and also because it's based on the espconn library that has quite a few issues. It also appears to no longer be maintained.

I've been talking to a few people about new libraries, in particular @someburner and I discussed building a new one, but I recently found this library and it looks very promising - in particular it uses low level non-blocking sockets (I really have no idea why the ESP RTOS folks decided to use sockets and even less idea why they would use blocking calls) and will compile against mbedTLS. This makes it a real possible candidate for use with the ESP NonOS SDK (actually against both NonOS and RTOS as it's also thread safe).

Have a look - would be interested in your feedback.

https://github.com/LiamBindle/MQTT-C
PS: I have no involvement in it apart from stumbling over it.
User avatar
By eriksl
#88214 I can't really put my finger on the large interest in MQTT for hobbyists (not calling you one, btw). If I had, I'd probably written an interface for it myself, so maybe it's a question of making me see why it's interesting ;-)
User avatar
By davydnorris
#88231 I guess the main reason is that it's a well adopted standard across most IoT back end platforms, and so having a working MQTT library means it's relatively simple to connect to pretty much any back end. You just need to know the specific format for naming your device and for passing connection info, and if there's any specific topics you need to listen or send on.

The other options are typically a REST or WebSocket API and these are always back end platform specific, which means it's usually a rewrite to connect via them.