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.7.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.7-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mmqtt-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 9e3506d72da5bbf43622aaa5afc25621fbfe03b507f2af5c646e89db37725e6b
MD5 21002e40c2af4fa8c2dd63df3ab591bf
BLAKE2b-256 05a1847ff171bc38c633f0ad46d44f9c0413d01646d41b696c7b27ff38ab3850

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmqtt-1.0.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: mmqtt-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8212bdb1bbcf853eff4835f893f71916b67bda98d0ef0dc7e7a6060e7703d51c
MD5 b4daed540501aba3a1be545e94000b7f
BLAKE2b-256 69c2b0ec2ec747d0e017300d47f97fe1381e9479961dad5eeab458a6193a8fca

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmqtt-1.0.7-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