MQTT Client
Machine Queue Telemetry Transport
Broker
(host, port=1883)¶Bases: object
A MQTT broker connection
Parameters: |
|
---|
StopHandler
()¶Stop any running loop.
auth
(user, password)¶Set credentials before connect.
Parameters: |
|
---|
connect
(on_connect=None, on_message=None)¶Connect to the service.
Parameters: |
|
---|
publish
(topic, payload)¶Send one MQTT message.
subscribe
(topic='#')¶Subscribe to a topic and echo received messages.
Blocks this thread until app.stop signal to disconnect.