Bridges MQTT topics to a pseudo-terminal device
Project description
mqtty
mqtty bridges MQTT topics to either your local terminal or a pseudoterminal (PTY), and now also ships log capture and replay helpers for the same serial stream format.
This is useful for debugging, automation, or tunneling serial communication through a networked MQTT broker.
Commands
mqtty mqtt://<host>/<topic> [--pts-only]
mqtty runs in bidirectional terminal mode by default:
- bytes from
stdinare published to.../device_serial_input - bytes from
.../device_serial_outputare written tostdout - if
stdinis a TTY, it is placed into raw mode whilemqttyis running - type
Ctrl-A Ctrl-Xto exit, matching picocom's default exit sequence - type
Ctrl-A Ctrl-Ato send a literalCtrl-A
Use --pts-only if you only want a PTY device:
--pts-only,-p: Print the path to the PTS device and keep it open without attaching local stdin/stdout. Useful for tools or scripts that want to use the virtual serial port.
mqtty-log records .../device_serial_output into replay files:
mqtty-log device mqtt://<host>/<serial-server>/<device> capture.jsonl.zst
mqtty-log prefix mqtt://<host>/<topic-prefix> logs/
devicerecords one full device URL into a single compressed replay file and adds.zstif omittedprefixsubscribes to<topic-prefix>/#, keeps topics ending indevice_serial_output, and rotates per-device logs under<outdir>/<topic-path-below-prefix>/YYYY-MM-DD_replay.jsonl.zst
mqtty-log-replay replays either plain or compressed replay logs:
mqtty-log-replay path/to/replay.jsonl.zst [--raw] [--follow] [--info]
Raw .jsonl logs are still accepted for replay and inspection.
The <topic> segment of the URI is used as the base path for MQTT messages across both live commands:
.../device_serial_inputreceives bytes from local input and sends them to the device.../device_serial_outputcarries device output back to your terminal or PTY
Example
mqtty mqtt://broker.local/mydevice
This connects your terminal directly to mydevice/device_serial_input and mydevice/device_serial_output.
To expose a PTY instead:
mqtty mqtt://broker.local/mydevice --pts-only
This prints the local PTY path and keeps it bridged to the same MQTT topics until interrupted.
To capture a replay log while a device is running:
mqtty-log device mqtt://broker.local/mydevice mydevice.jsonl.zst
To capture every device under one serial-server or a broader base prefix:
mqtty-log prefix mqtt://broker.local/testbench/mark-pantry logs/
mqtty-log prefix mqtt://broker.local/testbench logs/
To inspect or replay that log later:
mqtty-log-replay mydevice.jsonl.zst --info
mqtty-log-replay mydevice.jsonl.zst
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mqtty-0.1.5.tar.gz.
File metadata
- Download URL: mqtty-0.1.5.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d1b0743c0a6bd49c4bd6e9d023fc52ce3b1263ee729dc2724db744954446e6
|
|
| MD5 |
4dbf5e8b0732ab8fe876e51f8436b656
|
|
| BLAKE2b-256 |
5f8e73610d9d06e3cc01a32499052c4f9b7b3fdebb2121cf01689566d5629e2f
|
Provenance
The following attestation bundles were made for mqtty-0.1.5.tar.gz:
Publisher:
release.yml on embeddedTS/mqtty
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mqtty-0.1.5.tar.gz -
Subject digest:
b8d1b0743c0a6bd49c4bd6e9d023fc52ce3b1263ee729dc2724db744954446e6 - Sigstore transparency entry: 1343277988
- Sigstore integration time:
-
Permalink:
embeddedTS/mqtty@99772e0807df7209d7d9dbc8aa4046b34757fb97 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/embeddedTS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99772e0807df7209d7d9dbc8aa4046b34757fb97 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mqtty-0.1.5-py3-none-any.whl.
File metadata
- Download URL: mqtty-0.1.5-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6469b214e42ce79fd86901fcdbd1d87210da07c53954765cdb7631aa3ed5bc52
|
|
| MD5 |
b2fe307e22e05521b29e251484867586
|
|
| BLAKE2b-256 |
b6b5c674be7c5c5c89d126e93b7d1184d6c39307d328a8d8ac8a8104d39287d5
|
Provenance
The following attestation bundles were made for mqtty-0.1.5-py3-none-any.whl:
Publisher:
release.yml on embeddedTS/mqtty
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mqtty-0.1.5-py3-none-any.whl -
Subject digest:
6469b214e42ce79fd86901fcdbd1d87210da07c53954765cdb7631aa3ed5bc52 - Sigstore transparency entry: 1343278019
- Sigstore integration time:
-
Permalink:
embeddedTS/mqtty@99772e0807df7209d7d9dbc8aa4046b34757fb97 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/embeddedTS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@99772e0807df7209d7d9dbc8aa4046b34757fb97 -
Trigger Event:
release
-
Statement type: