{"id":22140572,"url":"https://github.com/acidvegas/meshtastic-mqtt-json","last_synced_at":"2025-09-07T10:36:56.004Z","repository":{"id":265589050,"uuid":"896297998","full_name":"acidvegas/meshtastic-mqtt-json","owner":"acidvegas","description":"Meshtastic MQTT events in JSON","archived":false,"fork":false,"pushed_at":"2025-01-04T05:48:27.000Z","size":58,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T12:56:04.215Z","etag":null,"topics":["mesh","mesh-networks","meshtastic","meshtastic-python","mqtt","mqtt-client"],"latest_commit_sha":null,"homepage":"https://meshtastic.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acidvegas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-30T01:53:58.000Z","updated_at":"2025-04-04T02:24:11.000Z","dependencies_parsed_at":"2025-04-12T03:15:24.863Z","dependency_job_id":null,"html_url":"https://github.com/acidvegas/meshtastic-mqtt-json","commit_stats":null,"previous_names":["acidvegas/meshtastic_mqtt","acidvegas/meshtastic-mqtt-json"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/acidvegas/meshtastic-mqtt-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidvegas%2Fmeshtastic-mqtt-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidvegas%2Fmeshtastic-mqtt-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidvegas%2Fmeshtastic-mqtt-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidvegas%2Fmeshtastic-mqtt-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acidvegas","download_url":"https://codeload.github.com/acidvegas/meshtastic-mqtt-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidvegas%2Fmeshtastic-mqtt-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026707,"owners_count":25209739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mesh","mesh-networks","meshtastic","meshtastic-python","mqtt","mqtt-client"],"created_at":"2024-12-01T21:06:30.713Z","updated_at":"2025-09-07T10:36:55.890Z","avatar_url":"https://github.com/acidvegas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meshtastic MQTT Parser\n\nA lightweight Python library for parsing Meshtastic MQTT messages into JSON format. This tool makes it easy to build applications that interact with Meshtastic mesh networks via MQTT.\n\n## Overview\n\nThis library connects to a Meshtastic MQTT broker and decodes various message types into JSON format, making it simple to process Meshtastic mesh network data in your Python applications.\n\n## Features\n\n- Connects to any Meshtastic MQTT broker\n- Decrypts encrypted messages\n- Parses all standard Meshtastic message types\n- Outputs clean JSON format\n- Message type filtering support\n- Simple command-line interface\n\n## Installation\n\nInstall from PyPI:\n\n```bash\npip install meshtastic-mqtt-json\n```\n\n## usage\n```bash\nmeshtastic_mqtt_json [options]\n```\n\n```python\nfrom meshtastic_mqtt_json import MeshtasticMQTT\n\n# Create client instance\nclient = MeshtasticMQTT()\n\n# Register callbacks for specific message types\ndef on_text_message(json_data):\n    print(f'Received text message: {json_data[\"decoded\"][\"payload\"]}')\n\ndef on_position(json_data):\n    print(f'Received position update: {json_data[\"decoded\"][\"payload\"]}')\n\nclient.register_callback('TEXT_MESSAGE_APP', on_text_message)\nclient.register_callback('POSITION_APP', on_position)\n\n# Connect to MQTT broker\nclient.connect(\n    broker='mqtt.meshtastic.org',\n    port=1883,\n    root='msh/US/2/e/',\n    channel='LongFast',\n    username='meshdev',\n    password='large4cats',\n    key='AQ=='\n)\n```\n\n### Callback System\nThe library provides a callback system that allows you to register handlers for specific message types. Each callback function receives a JSON object containing the parsed message data.\n\n```python\n# Register a callback\nclient.register_callback('MESSAGE_TYPE', callback_function)\n\n# Unregister a callback\nclient.unregister_callback('MESSAGE_TYPE')\n```\n\nThe callback function should accept a single parameter that will receive the JSON data:\n```python\ndef my_callback(json_data):\n    # json_data contains the parsed message\n    print(json_data)\n```\n\nIf no callback is registered for a message type, the message will be printed to the console by default.\n\n### Command Line Options\n| Option       | Description                   | Default               |\n| ------------ | ------------------------------|---------------------- |\n| `--broker`   | MQTT broker address           | `mqtt.meshtastic.org` |\n| `--port`     | MQTT broker port              | `1883`                |   \n| `--root`     | Root topic                    | `msh/US/2/e/`         |\n| `--channel`  | Channel name                  | `LongFast`            |\n| `--username` | MQTT username                 | `meshdev`             |\n| `--password` | MQTT password                 | `large4cats`          |\n| `--key`      | Encryption key                | `AQ==`                |\n| `--filter`   | Filter specific message types |                       |\n\n### Filter Example\n```bash\npython meshtastic_mqtt_json.py --filter \"NODEINFO,POSITION,TEXT_MESSAGE\"\n```\n\n\n## Supported Message Types\n\nThe library supports parsing of the following Meshtastic message types:\n| Message Type                    | Description                   |\n| ------------------------------- | ----------------------------- |\n| **ADMIN_APP**                   | Administrative messages       |\n| **ATAK_FORWARDER**              | ATAK forwarding messages      |\n| **ATAK_PLUGIN**                 | ATAK plugin messages          |\n| **AUDIO_APP**                   | Audio messages                |\n| **DETECTION_SENSOR_APP**        | Sensor detection data         |\n| **IP_TUNNEL_APP**               | IP tunneling messages         |\n| **NEIGHBORINFO_APP**            | Neighbor information          |\n| **NODEINFO_APP**                | Node information and details  |\n| **PAXCOUNTER_APP**              | People counter data           |\n| **POSITION_APP**                | GPS position updates          |\n| **PRIVATE_APP**                 | Private messages              |\n| **RANGE_TEST_APP**              | Range testing data            |\n| **REMOTE_HARDWARE_APP**         | Remote hardware control       |\n| **REPLY_APP**                   | Reply messages                |\n| **ROUTING_APP**                 | Routing information           |\n| **SERIAL_APP**                  | Serial communication          |\n| **SIMULATOR_APP**               | Simulator messages            |\n| **STORE_FORWARD_APP**           | Store and forward messages    |\n| **TELEMETRY_APP**               | Device telemetry data         |\n| **TEXT_MESSAGE_APP**            | Plain text messages           |\n| **TEXT_MESSAGE_COMPRESSED_APP** | Compressed text messages      |\n| **TRACEROUTE_APP**              | Network route tracing         |\n| **WAYPOINT_APP**                | Waypoint information          |\n| **ZPS_APP**                     | Zone/Position System messages |\n\n\n## Roadmap\n- [ ] Add support for custom node ID \u0026 names for the client\n- [ ] Add support for custom MQTT servers besides the official Meshtastic server\n- [ ] Create a PyPi package for easy import into other projects\n- [ ] Create an examples folder with use cases for the library, such as an IRC relay, cli chat, logging, etc.\n\n___\n\n###### Mirrors for this repository: [acid.vegas](https://git.acid.vegas/meshtastic_mqtt_json) • [SuperNETs](https://git.supernets.org/acidvegas/meshtastic_mqtt_json) • [GitHub](https://github.com/acidvegas/meshtastic_mqtt_json) • [GitLab](https://gitlab.com/acidvegas/meshtastic_mqtt_json) • [Codeberg](https://codeberg.org/acidvegas/meshtastic_mqtt_json)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facidvegas%2Fmeshtastic-mqtt-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facidvegas%2Fmeshtastic-mqtt-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facidvegas%2Fmeshtastic-mqtt-json/lists"}