Simple MQTT Client.
Project description
MQTT Client 1.3.0
Install
pip install mqtt-client
Usage
Simple MQTT Client.
Usage:
mqtt-client (publish | subscribe) --config=<config>
mqtt-client publish --host=<host> --topic=<topic> (--payload=<payload> | --interactive) [--username=<username>] [--password=<password>] [--transport=<transport>] [--cert_path=<cert_path>] [--qos=<qos>] [--retain=<retain>]
mqtt-client subscribe --host=<host> --topic=<topic> [--username=<username>] [--password=<password>] [--transport=<transport>] [--cert_path=<cert_path>] [--callback=<callback>] [--command=<command>]
mqtt-client (-h|--help)
mqtt-client (-v|--version)
Commands:
publish Publish to topic from MQTT Broker.
subscribe Subscribe to topic from MQTT Broker.
Options:
-h --help Show this screen.
-v --version Show version.
--config=<config> Config file.
--host=<host> Broker Host. (Example: example.your_broker.com:1883)
--topic=<topic> Topic.
--payload=<payload> Payload to send.
-i --interactive Interactive mode.
--username=<username> Username.
--password=<password> Password.
--transport=<transport> TCP, TCP-TLS, WS, WS-TLS (Default: TCP)
--cert_path=<cert_path> Path cert (Default: ./mqtt_broker_cert.pem)
--qos=<qos> Qos (Default: 0)
--retain=<retain> Retain (Default: false)
--callback=<callback> Use a custom callback for subscriber. (default, raw, command)
--command=<command> Command for callback type command.
Example file config
$ mqtt-client publish --config=example_config.json
{
"host": "mqttbroker:1883",
"topic": "my_topic",
"payload": "Testing Simple MQTT Client 1.3.0",
"interactive": false,
"username": "user",
"password": "pass",
"transport": "TCP",
"cert_path": "",
"qos": 0,
"retain": false,
"callback": "",
"command": ""
}
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
mqtt-client-1.3.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for mqtt_client-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e4f1153fc58474cfee7fa8a40cc1d76fd75fb78b65f2c095c9b7272a39222fa |
|
MD5 | 577a19a248617674fc38a8ba5c1b4e48 |
|
BLAKE2b-256 | 68f9aaeed839aa359d70c26c85182c12db2c44a401766f9a70a06ae7c369c9d4 |