Connect to MQTT brokers to publish messages and subscribe to topics.
MQTT is a lightweight publish/subscribe protocol, widely used for home automation (e.g. Home
Assistant, Zigbee2MQTT, Tasmota) and IoT devices. Create a client with create(), then
connect() it, and listen for messages with its on() method.
Both MQTT 3.1.1 and MQTT 5 brokers are supported, over plain TCP, TLS, and WebSockets.
Note: this module is new and has not yet been well tested. It has only been tested against a
simple MQTT 3.1.1 test broker, not against real brokers, MQTT 5, TLS or WebSockets. Please report
any problems you find.
Connect to MQTT brokers to publish messages and subscribe to topics.
MQTT is a lightweight publish/subscribe protocol, widely used for home automation (e.g. Home Assistant, Zigbee2MQTT, Tasmota) and IoT devices. Create a client with
create(), thenconnect()it, and listen for messages with itson()method.Both MQTT 3.1.1 and MQTT 5 brokers are supported, over plain TCP, TLS, and WebSockets.
Note: this module is new and has not yet been well tested. It has only been tested against a simple MQTT 3.1.1 test broker, not against real brokers, MQTT 5, TLS or WebSockets. Please report any problems you find.