Skip to content

peterhinch/micropython-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

MQTT is an easily used networking protocol designed for IOT (internet of things) applications. It is well suited for controlling hardware devices and for reading sensors across a local network or the internet.

It is a means of communicating between multiple clients. A single server, also known as a broker, manages the network. Clients may include ESP8266, ESP32 and Pyboard D modules and other networked computers. Typical server hardware is a Raspberry Pi or other small Linux machine which may be left running 24/7. Public brokers also exist.

An effective PC client and server is mosquitto.

This repository

This now contains one project, a driver providing a "resilient" asynchronous, non-blocking MQTT client.

The "resilient" driver

This is an alternative to the official driver. It has been tested on the following platforms.

  1. ESP8266
  2. ESP32, ESP32-S2 and ESP32-S3
  3. Pyboard D
  4. Arduino Nano Connect
  5. Raspberry Pi Pico W

The principal features of this driver are:

  1. Non-blocking operation for applications using uasyncio.
  2. Automatic recovery from WiFi and broker outages.
  3. True qos == 1 operation with retransmission.
  4. Improved WiFi range because of its tolerance of poor connectivity.

It has the drawback of increased code size which is an issue on the ESP8266. Run as frozen bytecode it uses about 50% of the RAM on the ESP8266. On ESP32 and Pyboard D it may be run as a standard Python module.

About

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published