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 hashes)
Built Distribution
Close
Hashes for mqtt_recorder-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7884aa1a359e8a9f0a46cec7f219f0d62a8db5ffdb8dacba3c857b17f0ba767 |
|
MD5 | ec9c53770ba527af495292b9587b24d0 |
|
BLAKE2b-256 | 1141ed8ab42c85dee3b098448487b907e05d3ea7026e48af7925801025543abe |