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 contains two separate projects:
This is an alternative to the official driver. It has been tested on the following platforms.
The principal features of this driver are:
qos == 1
operation with retransmission.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.
This comprises an ESP8266 firmware image and a MicroPython driver. The target
hardware is linked to an ESP8266 running the firmware image using a 5-wire
interface. The driver runs on the target which can then access MQTT. The driver
is non-blocking and is designed for applications using uasyncio
.
The current version of this library is in the bridge
directory and is
documented
It uses the new version of uasyncio
.
An old version is archived to the pb_link
directory, although I plan to
delete this.
The MQTT Bridge replaces this library. It was written a long time ago when the issues around portability were less clear. The client code is substantially revised with API changes. Objectives:
uasyncio
V3.There seems little hope of a portable machine.RTC
class, so setting the RTC
is now the responsibility of the application (if required).
The ESP8266 code has only minor changes.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。