Refactor packet processing: use processed_packet for forwarding and drop reason checks
Fix: Update zero-hop determination logic in AdvertHelper
Fix: Clone packet in process_packet to prevent modification of the original
Fix: Import copy module for deep copying of packets in process_packet
Adds the following fields to the stats API response for MeshCore CLI parity:
- config.repeater.max_flood_hops: Max flood hops setting (for 'get flood.max')
- config.repeater.advert_interval_minutes: Local advert interval (for 'get advert.interval')
- config.delays.rx_delay_base: RX delay base setting (for 'get rxdelay')
These fields are already present in config.yaml but were not exposed via the
stats API, making them inaccessible to web dashboards and CLI tools that
communicate over HTTP.
This enables pyMC Console's Terminal to display these values without
requiring direct config file access.
Co-Authored-By: Warp <agent@warp.dev>
- Updated dependency for pymc_core to use the feat/valid-packets-checks branch.
- Removed neighbor tracking logic from RepeaterHandler and moved it to AdvertHelper.
- Introduced PacketPipeline for centralized packet processing, ensuring all packets flow through repeater logic.
- Created handler helpers: TraceHelper, DiscoveryHelper, and AdvertHelper for better modularity.
- Implemented asynchronous processing of advertisement packets and discovery requests.
- Enhanced logging for better traceability and debugging.
- Cleaned up unused code and improved overall structure for maintainability.
- Introduced a favicon.ico file for the application.
- Created index.html with basic structure, including meta tags, links to Google Fonts, and references to JavaScript and CSS assets for the dashboard.
- Added `SQLiteHandler` for managing packet and advert storage in SQLite database.
- Implemented `RRDToolHandler` for creating and updating RRD databases for metrics.
- Developed `MQTTHandler` for publishing data to MQTT broker.
- Created `StorageCollector` to integrate SQLite, RRDTool, and MQTT functionalities.
- Added methods for recording packets, adverts, and noise floor data.
- Implemented data retrieval methods for packet statistics, recent packets, and noise floor history.
- Established database schema with appropriate tables and indices for efficient data access.
- Included error handling and logging for database operations and MQTT communications.
- Refactored main.py to import HTTPStatsServer from the new path.
- Introduced storage.py to handle SQLite database for packets and adverts.
- Implemented methods for initializing SQLite, RRD, and MQTT.
- Added functionality to record packets and adverts, including storage and metrics updates.
- Created methods for retrieving packet statistics, recent packets, and filtered packets.
- Implemented RRD data fetching and packet type statistics.
- Added cleanup method for old data in the database.
This commit sets up the initial project structure for the PyMC Repeater Daemon.
It includes base configuration files, dependency definitions, and scaffolding
for the main daemon service responsible for handling PyMC repeating operations.