MQTT recorder tool
Project description
MQTT Recorder
Simple cli tool for recording and replaying MQTT messages.
Install
pip install mqtt-recorder
Usage
| Argument | Description | Required | Default |
|---|---|---|---|
| -h, --help | Show help | ||
| --host | MQTT broker address | x | |
| --port | MQTT broker port | 1883 | |
| --client_id | MQTT Client ID | ||
| --mode | mode: record/replay | x | |
| --file | output/input csv file | x | |
| --loop | looping replay | false | |
| --qos | Quality of Service that will be used for subscriptions | 0 | |
| --topics | json file containing selected topics for subscriptions | null | |
| -t, --topic | Single topic to subscribe to | null | |
| --enable_ssl | True to enable MQTTs support, False otherwise | False | |
| --tls_insecure | If certs is self-generated, change to True | False | |
| --ca_cert | Path to the Certificate Authority certificate files | None | |
| --certfile | Path to the client certificate | None | |
| --keyfile | Path to the client private key | None | |
| --username | MQTT broker username | None | |
| --password | MQTT broker password | None | |
| --encode_b64 | True to store message payloads as base64 encoded strings | False | |
| --csv_field_size_limit | CSV field size limit | False |
Recording
Subscribing to every topic
mqtt-recorder --host localhost --mode record --file recording.csv
Subscribing to selected topics
mqtt-recorder --host localhost --mode record --file test.csv --topics topics.json
Topics can be selected using a json file.
Example
{
"topics": [
"/myhome/groundfloor/livingroom/temperature",
"USA/California/San Francisco/Silicon Valley"
]
}
Replaying
mqtt-recorder --host localhost --mode replay --file test.csv
Project details
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 mqtt_recorder-1.4.0.tar.gz.
File metadata
- Download URL: mqtt_recorder-1.4.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7f872fe9a29efc3d39287cea6bd47f822e7abfa82ca3f2db69b805e78d8050d
|
|
| MD5 |
c580f39c8c7b71c7444aefc169bc6f6a
|
|
| BLAKE2b-256 |
686cf62d7cb70738ff0a26784f2b12666b6c743408bc39cdd37e3874b2230b2d
|
File details
Details for the file mqtt_recorder-1.4.0-py3-none-any.whl.
File metadata
- Download URL: mqtt_recorder-1.4.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d832e6551315f96ca44f426e582c7b0ff1c1a6df4710ae9f597b2574f685c4f
|
|
| MD5 |
febbf3528ae2debbb9cee085e775984b
|
|
| BLAKE2b-256 |
58391e6c715be2c9e844e94231edbdd999af0a464a6544b84d9b085f4354b166
|