Commit Graph

62 Commits

Author SHA1 Message Date
agessaman c2f8a2e3cd refactor: companion FrameServer and related (substantive only, no Black)
Reapply refactor from ce8381a (replace monolithic FrameServer with thin
pymc_core subclass, re-export constants, SQLite persistence hooks) while
preserving pre-refactor whitespace where patch applied cleanly. Remaining
files match refactor commit exactly. Diff vs ce8381a is whitespace-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:35:47 -08:00
agessaman d5cabe831c Fix message persistence and deduplication in CompanionFrameServer
- Updated `_persist_companion_message` to clarify deduplication of messages in SQLite.
- Modified `on_message_received` and `on_channel_message_received` to include `packet_hash` for message identification.
- Enhanced `SQLiteHandler` to support deduplication by `packet_hash` when pushing messages, preventing duplicates in the database.
- Added `packet_hash` column to the `companion_messages` table and created an index for efficient lookups.
2026-02-14 20:53:25 -08:00
agessaman 15299bf374 Add companion module and API integration
- Add repeater/companion with frame server and constants
- Extend config, sqlite_handler, mesh_cli, packet_router for companion
- Update api_endpoints and auth_endpoints; adjust main entry

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:07:43 -08:00
agessaman 878ff8dc51 Enhance configuration and setup for KISS modem support
- Added support for Meshcore KISS modem firmware in configuration, allowing users to set `radio_type: kiss` and configure serial port and baud rate.
- Updated `config.yaml.example` to include KISS modem settings.
- Modified `manage.sh` to install with hardware extras for KISS support.
- Enhanced `setup-radio-config.sh` to prompt for radio type and KISS modem settings.
- Updated API endpoints to handle KISS modem configurations and hardware options.
- Improved error handling for missing configuration sections.

This update improves flexibility for users utilizing KISS modems alongside SX1262 hardware.
2026-02-03 16:20:51 -08:00
Lloyd b0e19b13af Add bulk packet retrieval API with gzip compression and pagination support. 2026-02-03 10:21:59 +00:00
Lloyd 0d14884adb broker connection management with JWT reconnection scheduling and error handling 2026-01-23 14:47:29 +00:00
Lloyd 5e4adf62b3 add ed auth to WS 2026-01-20 21:53:24 +00:00
Lloyd 8b95bfb8ba feat: enhance MQTT error handling and add packet stats broadcasting 2026-01-20 20:31:45 +00:00
Lloyd 33e353d215 fix: update reconnection logic to refresh JWT token before connecting 2026-01-19 12:41:54 +00:00
Lloyd 599e4628d9 Changes include:
Features

Neighbour details modal with full info and map view

WebSocket support with heartbeat and automatic reconnection

Improved signal quality calculations (SNR-based RSSI)

Route-based pagination for faster initial loads

UI

Mobile sidebar tweaks (logout, version info, lazy-loaded charts)

Sorting added to the neighbour table

Packet view now shows multi-hop paths

CAD calibration charts respect light/dark themes

Statistics charts now show the full requested time range

Performance

Reduced polling when WebSocket is active

Lazy loading for heavier components

Noise floor data capped to keep charts responsive

Technical

Improved type safety across API responses

Contrast improvements for accessibility

Cleaner WebSocket and MQTT reconnection handling

Additional metrics added to heartbeat stats

Bug fixes

Corrected noise floor history query

Fixed authentication for CAD calibration streams

Nothing major required from users — just update and carry on.
As always, shout if something looks off.
2026-01-18 20:15:50 +00:00
Lloyd 4f22cb1308 Convert public key to uppercase when retrieving from local identity 2026-01-09 17:24:10 +00:00
Lloyd 1a527c761f feat: Refactor LetsMesh handler to use LocalIdentity for key management 2026-01-08 09:11:45 +00:00
Lloyd 1b45060e13 Update key retrieval method in StorageCollector to support both standard and firmware keys 2026-01-08 08:52:02 +00:00
Lloyd 32ce1ff698 Add configurable JWT token expiry and WebSocket transport support for MQTT 2026-01-05 16:50:15 +00:00
Lloyd dfe4adad1c feat: Enhance MQTT configuration with TLS/SSL support and update logging 2026-01-05 10:47:14 +00:00
Paul Picazo 9288e070aa fix: Add missing Dict, Any import to sqlite_handler.py 2026-01-03 14:47:37 -08:00
Paul Picazo 942d4dfe28 Enhance advert storage logic: prioritize direct routes and handle zero-hop measurements
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
2026-01-03 14:35:30 -08:00
Lloyd 7112da98c2 feat: Add authentication endpoints and JWT support
- Implemented JWT authentication with auto-generated secret if not provided.
- Added API token management functionality.
- Created authentication endpoints for login, token refresh, verification, and password change.
- Introduced API documentation endpoints for Swagger UI and OpenAPI spec.
- Enhanced CORS support for API and documentation endpoints.
- Updated OpenAPI specification to include new authentication and system endpoints.
2025-12-30 00:10:48 +00:00
Lloyd 32e13cb40e Enhance LetsMesh broker configuration and connection management
- Added detailed comments and examples for broker selection in config.yaml
- Refactored letsmesh_handler.py to support multiple broker connections
- Implemented connection lifecycle management for individual brokers
- Improved JWT token handling and publishing across all connected brokers
2025-12-22 13:08:30 +00:00
Lloyd 038b4ac58d Handle None values for TX packets in RRD metrics by using 'U' for unknown values 2025-12-21 21:01:58 +00:00
Lloyd 9a56c03ae7 Add LBT metrics to packet storage and logging in RepeaterHandler 2025-12-21 20:41:22 +00:00
Lloyd f5daf41825 MeshCLI and RoomServer initialization with identity and storage handler support; update neighbor listing to filter repeaters and zero hop nodes. 2025-12-20 22:03:02 +00:00
Lloyd 4e1eb888e5 Refactor database connection handling in StorageCollector and reduce log verbosity in RoomServer to minimize spam during idle periods 2025-12-18 22:12:25 +00:00
Lloyd d321612670 Add node name lookup by public key and enhance CORS handling in API endpoints 2025-12-18 21:26:31 +00:00
Lloyd 9cd98cd7ad Add room server messaging endpoints and database functions
- Implemented functions to retrieve, post, delete, and clear messages in room servers.
- Added API endpoints for room message retrieval, posting, and management.
- added OpenAPI documentation to include new room server functionalities.
2025-12-18 11:21:38 +00:00
Lloyd 710ee5b666 Implement room server functionality: add database schema, message handling, and client synchronization 2025-12-18 10:44:00 +00:00
Lloyd b956f69e76 remove lgpio from installation script improve logging output for generated tokens 2025-12-09 09:20:19 +00:00
Lloyd 3de7dfefa6 Neighbors ui update add filters 2025-12-08 22:30:00 +00:00
Lloyd 9b53c5b6de Update packet handling to skip invalid advert packets and update record_packet method to conditionally publish to LetsMesh 2025-12-02 16:09:43 +00:00
Lloyd 58011b4993 Remove debug log for adverts retrieval in SQLiteHandler 2025-12-01 15:44:39 +00:00
Lloyd 52e4f6bef5 add hardware statistics collection to StorageCollector and API endpoints 2025-11-29 23:03:15 +00:00
Lloyd 748ecf33b3 hardware statistics integrate with storage collector 2025-11-29 22:42:15 +00:00
Lloyd 330d97d862 add hardware statistics collection and new API endpoints for hardware stats 2025-11-29 22:13:53 +00:00
Lloyd d4a18a9808 feat: add email and owner fields to node info and JWT payload for TLS connections 2025-11-25 17:24:15 +00:00
Lloyd eebd76609a JWT token refresh mechanism in letsmesh 2025-11-25 09:24:15 +00:00
Lloyd 74f185ce7b start status heartbeat thread upon successful connection preventing race con 2025-11-25 09:07:20 +00:00
Lloyd ae68bc92c1 implement JWT token refresh mechanism in for letsmesh 2025-11-25 08:59:32 +00:00
Lloyd 788db09b59 feat: add delete advert functionality to SQLiteHandler and API endpoints 2025-11-24 21:27:12 +00:00
Lloyd bdc38c5307 fix: standardize packet hash casing to uppercase in RepeaterHandler and RepeaterDaemon 2025-11-24 09:58:13 +00:00
Lloyd 2137e6a1c6 Refactor code structure for improved readability and maintainability 2025-11-22 22:07:46 +00:00
Lloyd 2495f08ab9 Add favicon and index.html for pyMC Repeater Dashboard
- 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.
2025-11-22 13:33:19 +00:00
Lloyd 3f3771d600 feat: implement PacketRecord class for standardized packet handling and update MQTTHandler and StorageCollector to utilize it 2025-11-21 15:35:54 +00:00
Lloyd 08d4e054b0 clean up code formatting and improve readability in letsmesh_handler and storage_collector 2025-11-20 10:11:06 +00:00
Lloyd f0ccf161c9 add disallowed packet types configuration for LetsMesh and implement filtering in storage collector 2025-11-19 15:33:39 +00:00
Lloyd 549696a6c8 feat: enhance payload with model and format client version 2025-11-19 13:55:22 +00:00
Lloyd 3a2466f953 refactor LetsMesh handler initialization and add live stats support 2025-11-19 11:28:00 +00:00
Lloyd 1793973a84 tidy configuration handling by adding get_node_info function 2025-11-19 10:39:14 +00:00
Lloyd 007182deb1 MeshCoreToMqttJwtPusher initialization and packet publishing with node name and radio configuration 2025-11-18 23:36:10 +00:00
Lloyd 8ef2d3997d feat: update raw packet handling in StorageCollector and RepeaterHandler 2025-11-18 23:05:34 +00:00
Lloyd 785cdd60f7 feat: update packet publishing logic in StorageCollector to use 'raw_packet' 2025-11-18 22:45:30 +00:00