{"id":29973732,"url":"https://github.com/modulateddreams/meshtastic-bridge-collector","last_synced_at":"2025-08-04T07:04:45.551Z","repository":{"id":305422465,"uuid":"1022843859","full_name":"modulateddreams/meshtastic-bridge-collector","owner":"modulateddreams","description":"Production-ready LoRa bridge collector for Meshtastic mesh networks with direct NODEINFO processing and TimescaleDB integration.","archived":false,"fork":false,"pushed_at":"2025-08-01T23:27:39.000Z","size":53,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T01:19:08.254Z","etag":null,"topics":["bridge-node","grafana","iot","lora","mesh-networking","meshtastic","monitoring","postgresql","python","timescaledb"],"latest_commit_sha":null,"homepage":"http://nswmesh.au","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modulateddreams.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,"zenodo":null}},"created_at":"2025-07-20T00:40:22.000Z","updated_at":"2025-08-01T23:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec89d508-f0f3-46a2-9cf1-4b1a64a6c1a6","html_url":"https://github.com/modulateddreams/meshtastic-bridge-collector","commit_stats":null,"previous_names":["modulateddreams/meshtastic-bridge-collector"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/modulateddreams/meshtastic-bridge-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modulateddreams%2Fmeshtastic-bridge-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modulateddreams%2Fmeshtastic-bridge-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modulateddreams%2Fmeshtastic-bridge-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modulateddreams%2Fmeshtastic-bridge-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modulateddreams","download_url":"https://codeload.github.com/modulateddreams/meshtastic-bridge-collector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modulateddreams%2Fmeshtastic-bridge-collector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268660057,"owners_count":24286008,"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-08-04T02:00:09.867Z","response_time":79,"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":["bridge-node","grafana","iot","lora","mesh-networking","meshtastic","monitoring","postgresql","python","timescaledb"],"created_at":"2025-08-04T07:01:13.743Z","updated_at":"2025-08-04T07:04:45.537Z","avatar_url":"https://github.com/modulateddreams.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meshtastic Bridge Collector\n\n\u003e Production-ready LoRa bridge collector for Meshtastic mesh networks with direct NODEINFO processing and TimescaleDB integration\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![Meshtastic](https://img.shields.io/badge/Meshtastic-Compatible-green.svg)](https://meshtastic.org/)\n\n## 🌐 Overview\n\nA production-ready Python collector that captures local Meshtastic mesh traffic via LoRa and stores comprehensive metrics in TimescaleDB. Designed to complement MQTT-based collection systems for complete mesh network monitoring.\n\n**Part of the NSW Meshtastic monitoring ecosystem: [dash.nswmesh.au](https://dash.nswmesh.au)**\n\n## 🎯 Key Features\n\n- **Real-time LoRa packet capture** with direct NODEINFO processing\n- **Intelligent node discovery** across multi-hop mesh networks  \n- **Official Meshtastic portnum compliance** and complete schema support\n- **TimescaleDB integration** via SSH tunnel for time-series analysis\n- **Production-grade error handling**, logging, and auto-restart capabilities\n- **Grafana-ready data structure** for mesh network visualization\n\n## 📊 What It Captures\n\n- **Node identification** and hardware details\n- **Packet metrics** (SNR, RSSI, hop counts, routing info)\n- **Telemetry data** (battery, GPS, device stats)\n- **Message routing** and store-forward operations\n\n## 🚀 Why Use This?\n\nTraditional MQTT-based Meshtastic monitoring misses local mesh traffic that doesn't reach the internet. This bridge collector captures **everything** your local LoRa device can hear, providing comprehensive mesh network visibility.\n\n### Before vs After\n- **Before**: ~38% node discovery rate (MQTT-only)\n- **After**: 70-90%+ discovery rate (direct NODEINFO processing)\n\n## 📋 Prerequisites\n\n- **Hardware**: Meshtastic device connected via USB\n- **OS**: Debian/Ubuntu Linux (tested on Debian 12)\n- **Database**: TimescaleDB (local or remote)\n- **Python**: 3.8+\n\n## ⚡ Quick Start\n\n1. **Clone and setup**:\n   ```bash\n   git clone https://github.com/yourusername/meshtastic-bridge-collector.git\n   cd meshtastic-bridge-collector\n   \n   # Create virtual environment\n   python3 -m venv venv\n   source venv/bin/activate\n   pip install -r requirements.txt\n   ```\n\n2. **Configure database**:\n   ```bash\n   # Import database schema\n   psql -h your-db-host -U postgres -d meshtastic -f sql/schema.sql\n   ```\n\n3. **Configure collector**:\n   ```bash\n   cp collector/config.example.py collector/config.py\n   # Edit config.py with your database credentials\n   ```\n\n4. **Run collector**:\n   ```bash\n   python3 collector/meshtastic-collector.py\n   ```\n\nFor detailed setup instructions, see [INSTALLATION.md](docs/INSTALLATION.md).\n\n## 📊 Database Schema\n\nThe collector creates two main tables:\n\n- **`node_details`**: Node information (names, hardware, location)\n- **`mesh_packet_metrics`**: Time-series packet data (TimescaleDB hypertable)\n\n## 🔧 Production Deployment\n\nThe collector includes systemd service files for production deployment:\n\n- **SSH tunnel service** for secure database connections\n- **Collector service** with auto-restart and logging\n- **Comprehensive monitoring** and statistics\n\n## 📈 Monitoring \u0026 Visualization\n\nWorks seamlessly with:\n- **Grafana** dashboards\n- **TimescaleDB** time-series queries\n- **Custom monitoring** scripts\n\n## 🤝 Contributing\n\nContributions welcome! Please read our contributing guidelines and submit pull requests.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **Meshtastic Project** for the excellent mesh networking platform\n- **NSW Meshtastic Community** for testing and feedback\n- **TimescaleDB** for powerful time-series data storage\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/yourusername/meshtastic-bridge-collector/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/yourusername/meshtastic-bridge-collector/discussions)\n- **NSW Mesh**: [nswmesh.au](https://nswmesh.au)\n\n---\n\n**Made with ❤️ for the Meshtastic community**\n\n## 🎯 Hardware Model Mapping Enhancement\n\n### New Features\n- **Readable Hardware Names**: Converts numeric hardware IDs to human-readable device names\n- **Complete Device Support**: Supports 85+ Meshtastic hardware models\n- **Improved Dashboard**: Shows \"RAK4631\", \"ESP32_S3_PICO\", \"HELTEC_V3\" instead of numbers\n\n### Performance Improvement\n- **Before**: ~38% nodes with readable hardware names\n- **After**: 98.7% nodes with readable hardware names\n- **Production Tested**: Mesh infrastructure with 239+ nodes\n\n### Supported Hardware Models\n- **RAK Devices**: RAK4631, RAK11200, RAK11310, RAK4631_WISBLOCK\n- **Heltec Devices**: HELTEC_V3, HELTEC_V2_0, HELTEC_WIRELESS_TRACKER, HELTEC_MESH_NODE_T114\n- **ESP32 Variants**: ESP32_S3_PICO, T_DECK, T_ECHO, TBEAM variants\n- **M5Stack Family**: CORE2, CORES3, CARDPUTER, and more\n- **Others**: SEEDSTUDIO_XIAO_S3, TRACKER_T1000_E, PORTDUINO, and 70+ more\n\n### Database Enhancement\nThe hardware_model field now stores readable names instead of numeric enum values\n\n### Implementation\nThe enhancement uses a comprehensive hardware model mapping function that converts Meshtastic protobuf enum values to human-readable device names across all NODEINFO processing paths.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodulateddreams%2Fmeshtastic-bridge-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodulateddreams%2Fmeshtastic-bridge-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodulateddreams%2Fmeshtastic-bridge-collector/lists"}