https://github.com/terrabits/mqtt_publish
A command line utility for quickly publishing a single MQTT message.
https://github.com/terrabits/mqtt_publish
Last synced: 23 days ago
JSON representation
A command line utility for quickly publishing a single MQTT message.
- Host: GitHub
- URL: https://github.com/terrabits/mqtt_publish
- Owner: Terrabits
- Created: 2020-01-12T04:40:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-12T04:41:27.000Z (over 6 years ago)
- Last Synced: 2025-03-03T09:16:39.932Z (over 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mqtt_publish
A command line utility for quickly publishing a single MQTT message.
## Installation
Via pip, with `pip install mqtt_publish`.
## Usage
From `--help`:
```shell
usage: mqtt_publish [-h] [--broker-port BROKER_PORT]
broker_address topic message
Command line utility for quick MQTT publishes
positional arguments:
broker_address
topic
message
optional arguments:
-h, --help show this help message and exit
--broker-port BROKER_PORT
```
## Example
Once installed, the CLI should be available in path (assuming python is in path).
```shell
mqtt_publish home-server.lan bedroom/smart-plug/set on
```
The `mqtt_publish` CLI is available via the python executable with the `-m` flag.
```shell
path/to/python -m mqtt_publish home-server.lan bedroom/smart-plug/set off
```