Interface between MQTT broker and ASGI
Project description
asgimqtt is a simple MQTT interface for ASGI.
Usage
Connect the server to a running MQTT broker:
asgimqtt --host localhost --port 1883 django_project.asgi:channel_layer
In your Django code:
# routing.py channels_routing = [ route("mqtt.sub", mqtt_consumer), ]
Note: you can only receive messages published in MQTT broker (channel mqtt.sub).
The keys are:
host: host of the MQTT broker
port: port of the MQTT broker
topic: topic of the MQTT message
payload: payload of the MQTT message
qos: quality of service of the MQTT message (0, 1 or 2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asgimqtt-0.2.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for asgimqtt-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8be9ee5e422b74e9842747ba0944c18ae8ff4cb9586c78bbc45b3c54baf1b0e7 |
|
MD5 | 2ced63f25c07fb2bfe5efd30f6b936d4 |
|
BLAKE2b-256 | 38174396c47064df5d99b6a3cc64f250b270d1e5d114d51ff3e4976f17824441 |