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 | |
--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 | |
--enable_ssl | True to enable MQTTs support, False otherwise | 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 |
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
mqtt-recorder-1.2.0.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file mqtt-recorder-1.2.0.tar.gz
.
File metadata
- Download URL: mqtt-recorder-1.2.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5395356896f18dadc963f35d949816c2c9ab977957c72559d7afb3667015d6d7 |
|
MD5 | 23fcff215a4b529a6297ec9c223105fb |
|
BLAKE2b-256 | e596db4a149fbac8ca2bbd95a60784c81da9f6871bdd4b73aadade4aeaf0f6a6 |
File details
Details for the file mqtt_recorder-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: mqtt_recorder-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7884aa1a359e8a9f0a46cec7f219f0d62a8db5ffdb8dacba3c857b17f0ba767 |
|
MD5 | ec9c53770ba527af495292b9587b24d0 |
|
BLAKE2b-256 | 1141ed8ab42c85dee3b098448487b907e05d3ea7026e48af7925801025543abe |