All Projects â†’ xavierlesa â†’ channels-asgi-mqtt

xavierlesa / channels-asgi-mqtt

Licence: GPL-3.0 License
Interface between MQTT and ASGI and Channels 2.0 compatible

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to channels-asgi-mqtt

Emqx
An Open-Source, Cloud-Native, Distributed MQTT Message Broker for IoT.
Stars: ✭ 8,951 (+24763.89%)
Mutual labels:  mqtt, mqtt-broker
tutorials.IoT-over-MQTT
📙 FIWARE 203: Provisioning Ultralight with an alternative transport: IoT over MQTT
Stars: ✭ 49 (+36.11%)
Mutual labels:  mqtt, mqtt-broker
Aedes
Barebone MQTT broker that can run on any stream server, the node way
Stars: ✭ 1,007 (+2697.22%)
Mutual labels:  mqtt, mqtt-broker
Hbmqtt
MQTT client/broker using Python asynchronous I/O
Stars: ✭ 667 (+1752.78%)
Mutual labels:  mqtt, mqtt-broker
Iot Harbor
reactor3实现的mqtt库
Stars: ✭ 234 (+550%)
Mutual labels:  mqtt, mqtt-broker
Mqtt.js
The MQTT client for Node.js and the browser
Stars: ✭ 6,723 (+18575%)
Mutual labels:  mqtt, mqtt-broker
Nanomq
Nano MQTT Broker - An Ultra-light and Blazing-fast MQTT Broker for IoT Edge
Stars: ✭ 104 (+188.89%)
Mutual labels:  mqtt, mqtt-broker
Openremote
100% open-source IoT Platform - Integrate your assets, create rules, and visualize your data
Stars: ✭ 254 (+605.56%)
Mutual labels:  mqtt, mqtt-broker
Mqttnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 2,486 (+6805.56%)
Mutual labels:  mqtt, mqtt-broker
Emqx Rel
The Release Project for EMQ X Broker
Stars: ✭ 166 (+361.11%)
Mutual labels:  mqtt, mqtt-broker
Hivemq Community Edition
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Stars: ✭ 562 (+1461.11%)
Mutual labels:  mqtt, mqtt-broker
geiss
An protocol server for django channels 1 written in go
Stars: ✭ 27 (-25%)
Mutual labels:  django-channels, asgi
Mqtt Panel
A web interface for MQTT
Stars: ✭ 315 (+775%)
Mutual labels:  mqtt, mqtt-broker
Thingsboard Gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
Stars: ✭ 796 (+2111.11%)
Mutual labels:  mqtt, mqtt-broker
Gmqtt
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang
Stars: ✭ 290 (+705.56%)
Mutual labels:  mqtt, mqtt-broker
Mqtt
MQTT broker written in D, using vibe.d
Stars: ✭ 59 (+63.89%)
Mutual labels:  mqtt, mqtt-broker
asgi-mqtt
Interface between MQTT and ASGI
Stars: ✭ 34 (-5.56%)
Mutual labels:  mqtt, django-channels
Emitter
High performance, distributed and low latency publish-subscribe platform.
Stars: ✭ 3,130 (+8594.44%)
Mutual labels:  mqtt, mqtt-broker
Mqtt Pwn
MQTT-PWN intends to be a one-stop-shop for IoT Broker penetration-testing and security assessment operations.
Stars: ✭ 156 (+333.33%)
Mutual labels:  mqtt, mqtt-broker
Mosquitto Cluster
a built-in, autonomous Mosquitto Cluster implementation. MQTT集群.
Stars: ✭ 238 (+561.11%)
Mutual labels:  mqtt, mqtt-broker

channels-asgi-mqtt

Interface between MQTT and ASGI and Channels 2.0 compatible

Installation

pip install chasgimqtt

Configuration

First you would to configure a valid channel_layer endpoint to consume and connect between chasgimqtt and channels.

In your_channel_application/asgi.py:

import os
import django
from channels.routing import get_default_application
from channels.layers import get_channel_layer

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "your_channel_application.settings")
django.setup()

# Application
application = get_default_application()

# Layers
channel_layer = get_channel_layer()

Usage

chasgimqtt -H iot.eclipse.org -p 1883 --topic=some_topic:2 your_channel_application.asgi:channel_layer

Options

chasgimqtt -h

usage: chasgimqtt [-h] [-H HOST] [-p PORT] [-v] [-U USERNAME] [-P PASSWORD]
                  [--topic TOPICS] [-n CHANNEL_NAME] [-s CHANNEL_SUB]
                  [-x CHANNEL_PUB]
                  channel_layer

Simple MQTT bridge for ASGI

positional arguments:
  channel_layer         The ASGI channel layer instance to use as
                        path.to.module:instance.path

optional arguments:
  -h, --help            show this help message and exit
  -H HOST, --host HOST  MQTT broker host
  -p PORT, --port PORT  MQTT broker port
  -v, --verbosity       Set verbosity
  -U USERNAME, --username USERNAME
                        MQTT username to authorised connection
  -P PASSWORD, --password PASSWORD
                        MQTT password to authorised connection
  --topic TOPICS        MQTT topics with qos to subscribe --topic TOPIC:QOS
                        --topic /office/sensor:0 --topic /home/sensor:1 If
                        empty (#, 2) is set as default
  -n CHANNEL_NAME, --channel-name CHANNEL_NAME
                        Name of Channels's channel to send and receive
                        messages
  -s CHANNEL_SUB, --channel-sub CHANNEL_SUB
                        Name of Channels's channel for MQTT Sub messages,
                        default is mqtt.pub
  -x CHANNEL_PUB, --channel-pub CHANNEL_PUB
                        Name of Channels's channel for MQTT Pub messages,
                        default is mqtt.sub

HOST: MQTT broker host

PORT: MQTT broker port, default 1883

USERNAME: MQTT username to authorised connection

PASSWORD: MQTT password to authorised connection

TOPICS: MQTT topics with qos to subscribe. This option expect a valid topic name and a QOS value splited by :

To subscribe to a list of topics use the same option --topic.

--topic some_topic:qos --topic another_topic:qos --topic home/kitchen_gas_sensor:2 --topic home/office_air_sensor:0

CHANNEL_NAME : Name of Channels's channel to send and receive messages, this channel_name must to exist in your channel's consumer, default is mqtt.

CHANNEL_SUB : Name of Channels's channel for MQTT Sub messages, default is mqtt.sub.

CHANNEL_PUB : Name of Channels's channel for MQTT Pub messages, default is mqtt.pub.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].