No description
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Lint / lint (push) Successful in 22s
Dev tooling no longer publishes as a [dev] extra and plain uv sync installs it; ruff comes only from the pinned pre-commit rev. pytest-cov added for the test-cov recipe. |
||
| .forgejo/workflows | ||
| fw_nodes_mqtt | ||
| tests | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| justfile | ||
| pyproject.toml | ||
| README.md | ||
fw-nodes-mqtt
MQTT nodes for Flowire workflow automation: trigger workflows from MQTT messages over a persistent broker connection, and publish messages to topics.
Installation
# Production: install from PyPI into the Flowire image/venv
pip install fw-nodes-mqtt
# Local development: clone into the flowire-app workspace
git clone <repo-url> flowire-app/nodes/fw-nodes-mqtt
cd flowire-app && uv sync --all-packages
Any installed package with flowire.nodes entry points is loaded automatically — no env var needed.
Nodes
MQTT Trigger
Starts a workflow whenever a message arrives on subscribed MQTT topic filters. Backed by a persistent broker connection managed by the Flowire Connection Manager.
Inputs:
| Field | Type | Default | Description |
|---|---|---|---|
credential_id |
string | required | MQTT broker credential |
topics |
list[string] | ["#"] |
Topic filters to subscribe to; + and # wildcards supported |
qos |
integer | 0 |
QoS level for subscriptions (0-2) |
Outputs:
| Field | Type | Description |
|---|---|---|
topic |
string | Topic the message was published to |
payload |
string | Message payload decoded as UTF-8 |
payload_json |
any | Payload parsed as JSON when possible, else null |
qos |
integer | QoS level of the message |
retain |
boolean | Whether the message was a retained message |
raw_event |
object | Full raw trigger event |
MQTT Publish
Publishes a message to an MQTT topic (one-shot connect, publish, disconnect).
Inputs:
| Field | Type | Default | Description |
|---|---|---|---|
credential_id |
string | required | MQTT broker credential |
topic |
string | required | Topic to publish to (no wildcards) |
payload |
any | — | Payload: strings sent as-is, dicts/lists JSON-encoded, others stringified |
qos |
integer | 0 |
QoS level (0-2) |
retain |
boolean | false |
Publish as a retained message |
Outputs:
| Field | Type | Description |
|---|---|---|
success |
boolean | Whether the publish succeeded |
topic |
string | Topic the message was published to |
Development
just install # deps
just lint # linter
just format # format
just test # tests
just test-cov # tests with coverage
Dependencies
- aiomqtt - Async MQTT client built on paho-mqtt