Skip to main content

This library may be useful for testing Meshtastic networks connected to an MQTT server.

Project description

This project is useful for testing Meshtastic networks connected to an MQTT server. Functions can be called in mqttc.py or by using arguments in the command line.

Available functions:

send_nodeinfo(short_name, long_name, hw_model)
send_position(lat, lon, alt, precision)
send_device_telemetry(battery_level, voltage, chutil, airtxutil, uptime)
send_text_message("text")

Available arguments:

  -h, --help             show this help message and exit
  --config CONFIG        Path to the config file
  --message MESSAGE      The message to send
  --lat LAT              Latitude coordinate
  --lon LON              Longitude coordinate
  --alt ALT              Altitude
  --precision PRECISION  Position Precision

Examples:

To publish a message to the broker using settings defined in config.json:

python3 mqttc.py --message "I need an Alpinist"

To publish a message to the broker using settings defined in my-config.json:

python3 mqttc.py --config "my-config.json" --message "I need an Alpinist"

Installation:

git clone https://github.com/pdxlocations/MQTTc-for-Meshtastic.git
cd MQTTc-for-Meshtastic
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Rename config-example.json and edit configuration:

sudo mv config-example.json config.json
sudo nano config.json

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

mmqtt-1.0.6.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mmqtt-1.0.6-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file mmqtt-1.0.6.tar.gz.

File metadata

  • Download URL: mmqtt-1.0.6.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mmqtt-1.0.6.tar.gz
Algorithm Hash digest
SHA256 2a90a5c08cce44e1d03f619e74a213b9f8b172aef15985f363a597ccf21e93e6
MD5 ffd557e0dcf61495c9b3f4db97174bb2
BLAKE2b-256 234c88b8169231fd4203ef53cda17b9ed3e9ab07c4b90841b4d3ee62215e8d04

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmqtt-1.0.6.tar.gz:

Publisher: release.yaml on pdxlocations/mmqtt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmqtt-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: mmqtt-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mmqtt-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 408354b43e3cc3d1581d3caf8e11e6fecb553b363ffcb0b31b86f0ef887f49ab
MD5 904d5193b040823a55eb7582968b5c5e
BLAKE2b-256 8831f47bb747176d5308e2fcedca3c4ff48bfba51d3c77fae781a71769614727

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmqtt-1.0.6-py3-none-any.whl:

Publisher: release.yaml on pdxlocations/mmqtt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page