mqttasgi
Skill by sivulich
mqttasgi is an ASGI protocol server that bridges MQTT messages to Django Channels consumers. It is for Django developers building home automation, IoT and real-time device integrations.
Install mqttasgi
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sivulich/mqttasgi /tmp/mqttasgi && mkdir -p ~/.claude/skills && cp -r /tmp/mqttasgi/claude_skill ~/.claude/skills/mqttasgiRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sivulich/mqttasgi /tmp/mqttasgi && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/mqttasgi/claude_skill ~/.gemini/antigravity-cli/skills/mqttasgiAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
mqttasgi is an ASGI protocol server, inspired by Daphne, that connects MQTT through paho-mqtt to Django Channels. Consumers subscribe and publish to MQTT topics, and they can use the Django ORM and Channel Layers. The server is started from the command line and reads broker host, port, credentials, TLS and transport settings from CLI arguments or environment variables.
A consumer subclasses MqttConsumer and handles connect, receive and disconnect events. The source describes an experimental option where a master consumer spawns and kills worker consumers. Testing uses the MqttComunicator class to drive consumers through the ASGI interface without a running broker. The source's examples cover home automation, energy monitoring and garden irrigation. It is aimed at Django developers who want MQTT devices wired into their existing project.
Written from the project's SKILL.md and checked against it.
What it can do
- Subscribe and unsubscribeConsumers subscribe to and unsubscribe from MQTT topics with a chosen QoS.
- Publish messagesConsumers publish MQTT messages with QoS and retain options.
- Channel LayersConsumers and Django views can send messages to each other through Channel Layers.
- Worker spawning (experimental)A master consumer can spawn and kill worker consumers with their own parameters.
- Broker connection optionsSupports TCP or WebSockets transport, TLS certificates, SSL and reconnect retries.
- Configuration via env or .envBroker settings can come from CLI arguments, environment variables or a .env file.
- Consumer testingMqttComunicator tests consumers directly through the ASGI interface, with no broker needed.
What you need
- Python 3.9 to 3.13
- Django 3.2 to 5.x
- Channels 3.x or 4.x
- An MQTT broker to connect to
Try asking
- Write a Django MQTT consumer that subscribes to home/sensor/motion
- Create pytest tests for an MqttComunicator consumer without a broker
- Set up mqttasgi with TLS and websockets transport for my broker
Good to know
- Multiple workers are marked experimental in the source.
- Tests use MqttComunicator and do not require a running broker.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: claude_skill/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to mqttasgi
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
mqttasgi: common questions
Does mqttasgi need a running MQTT broker?
The server connects to an MQTT broker by host and port. The source says the testing helper MqttComunicator works without a broker.
Which Django and Python versions does mqttasgi support?
The source lists Django 3.2 to 5.x, Channels 3.x to 4.x, paho-mqtt 1.x and 2.x, and Python 3.9 to 3.13.
Can I use the Django ORM inside an MQTT consumer?
Yes. The source says consumers have full ORM and Channel Layers support, and its examples use async ORM calls such as acreate.
How do I install mqttasgi?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is mqttasgi free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is mqttasgi safe to use?
It scores 63 of 100. Grades: maintenance C, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to mqttasgi?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
