Commit Graph

215 Commits

Author SHA1 Message Date
dmduran12
2ab4a62011 feat(api): Add POST /api/update_radio_config endpoint
Adds a new endpoint to update radio and repeater configuration via HTTP API,
supporting both persisted storage and live in-memory updates.

Supported settings:
- Radio: tx_power (2-30 dBm)
- Delays: tx_delay_factor, direct_tx_delay_factor, rx_delay_base
- Repeater: node_name, latitude, longitude, max_flood_hops,
  flood_advert_interval_hours, advert_interval_minutes

Features:
- Validates all input parameters with appropriate ranges
- Saves to config.yaml for persistence
- Updates daemon's in-memory config for immediate effect (no restart needed)
- Returns live_update status so clients know if restart is required

This enables web dashboards like pyMC Console to configure the repeater
without requiring SSH access or service restarts for most settings.

Co-Authored-By: Warp <agent@warp.dev>
2025-12-27 19:47:49 -08:00
dmduran12
e74e062fe5 feat(api): Expose additional config values in /api/stats
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>
2025-12-27 19:46:29 -08:00
Lloyd
fbe4e4e2bc bug:Skip already-evicted clients during eviction checks in RoomServer 2025-12-22 13:23:34 +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
6d82936987 add LBT stats to Packet table and details screen 2025-12-21 21:41:15 +00:00
Lloyd
24866707f4 retransmission handling to await completion and extract LBT metadata 2025-12-21 21:31:36 +00:00
Lloyd
9834ae7059 Add LBT metadata extraction and logging after packet transmission 2025-12-21 21:22:49 +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
7da569f4b1 LBT metrics extraction in packet 2025-12-21 20:45:10 +00:00
Lloyd
9a56c03ae7 Add LBT metrics to packet storage and logging in RepeaterHandler 2025-12-21 20:41:22 +00:00
Lloyd
d9119d3b92 Refactor text message handling to prioritize CLI command processing before storing room server messages 2025-12-20 22:34:42 +00:00
Lloyd
dbec76917a Fix neighbor listing format to ensure seconds ago and SNR are integers, stupid 2025-12-20 22:18:33 +00:00
Lloyd
61eaec6cf4 Implement advert scheduling delay and update neighbor listing format to match C++ specifications 2025-12-20 22:12:37 +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
6c2c2a13aa Refactor advert scheduling in MeshCLI: update to match C++ behavior by scheduling advert sends without waiting for completion. 2025-12-20 21:54:17 +00:00
Lloyd
1a56b64dad Refactor Mesh CLI handler: rename RepeaterCLI to MeshCLI, initialization with identity type and region support, and update command handling for room servers. 2025-12-20 21:46:16 +00:00
Lloyd
dbe925e26a update to GUI for room server 2025-12-18 22:16:58 +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
3f57e78d6a Add debug logging for repeater security configuration in LoginHelper 2025-12-18 15:44:22 +00:00
Lloyd
c98a33eda5 Refactor security configuration handling: update LoginHelper to retrieve security settings from the correct config path and adjust max_clients default value; modify APIEndpoints to ensure distinct admin and guest passwords, and enhance identity key validation logic in API responses. 2025-12-18 15:02:23 +00:00
Lloyd
ccc908ce32 Update server message handling: use room server's public key for system messages and improve identification for clients 2025-12-18 13:35:22 +00:00
Lloyd
d51f9cae0f Enhance client activity tracking: update timestamps during posting to prevent eviction and improve synchronization logic for active clients 2025-12-18 13:05:01 +00:00
Lloyd
e8c1ba27e9 Fix push timing for evicted clients in RoomServer to ensure proper synchronization intervals 2025-12-18 12:57:51 +00:00
Lloyd
1dc6b59c39 Enhance API documentation: rename packet history endpoint, improve ACL info response structure, and update descriptions for clarity 2025-12-18 12:54:48 +00:00
Lloyd
36a730f656 Refactor Swagger UI integration: load HTML template from file and remove inline styles 2025-12-18 12:28:50 +00:00
Lloyd
8ee83d70c7 Add ACL endpoints for managing access control lists and client information 2025-12-18 12:22:01 +00:00
Lloyd
c08d72a247 Remove custom styling for the Swagger UI topbar in API documentation 2025-12-18 12:10:43 +00:00
Lloyd
f068ca5db2 API documentation: update OpenAPI spec with new endpoints for packet statistics, noise floor history, CAD calibration, and room messaging; improve response schemas and descriptions 2025-12-18 12:06:21 +00:00
Lloyd
289922e91b Update OpenAPI spec: add new endpoints for duty cycle management and room message retrieval, enhance existing paths with detailed descriptions and examples 2025-12-18 11:40:42 +00:00
Lloyd
59a34205cd Encode OpenAPI spec and error messages in UTF-8 for proper response handling 2025-12-18 11:23:35 +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
1458ae00c6 typo sqlite handler reference in RepeaterDaemon initialization for room server database 2025-12-18 10:46:32 +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
02d3cbc396 Enhance ACL: add sync_since handling for room server clients and log timestamps 2025-12-17 23:01:29 +00:00
Lloyd
57047cf652 update ui with room server 2025-12-17 22:45:27 +00:00
Lloyd
174c1309fc identity management: update security handling in room servers to use settings section and improve identity key update logic 2025-12-17 22:30:36 +00:00
Lloyd
d85244b7e0 Enhance identity management: consolidate registration logic and add auto-generation for identity keys 2025-12-17 22:09:18 +00:00
Lloyd
2dce072124 Add ProtocolRequestHelper for handling protocol requests and update related components 2025-12-17 16:20:16 +00:00
Lloyd
82f1a20f44 Add PathHelper for processing PATH packets and update routing logic 2025-12-17 14:06:16 +00:00
Lloyd
a8cc36abf3 Implement CLI reply handling in TextHelper with TXT_MSG datagram support 2025-12-17 11:17:44 +00:00
Lloyd
1bb2d39940 Refactor LoginHelper and TextHelper to implement per-identity ACLs add CLI command handling 2025-12-17 11:08:14 +00:00
Lloyd
4b97c7b439 Implement text message handling and identity registration for room servers 2025-12-17 10:38:23 +00:00
Lloyd
73d5250560 Add identity management endpoints for API 2025-12-16 22:58:14 +00:00
Lloyd
5df266c83e Implement access control and login management for identities
- Added security settings in config.yaml.example for managing authenticated clients.
- Introduced ACL class for handling access control and client authentication in acl.py.
- Created LoginHelper class for processing login requests and managing authentication in login.py.
- Added IdentityManager class for managing multiple identities in identity_manager.py.
- Updated main.py to initialize IdentityManager and LoginHelper, and register identities.
- Added packet_router to process ANON_REQ login packets through the LoginHelper.
2025-12-16 22:39:26 +00:00
Lloyd
f37f3e6caf conditional Vue.js assets in HTTPStatsServer 2025-12-16 10:08:10 +00:00
Lloyd
4efa12477e Add support for custom web frontend path 2025-12-16 10:00:11 +00:00
Lloyd
bbfbdcce2f Ensure logging configuration is initialized when log level is provided 2025-12-14 22:35:57 +00:00
Lloyd
2309e3afdb Merge pull request #31 from ppicazo/ppicazo/snr-fix
SNR Fix
2025-12-14 21:39:46 +00:00
Paul Picazo
5656a48b31 Refactor SNR calculation in TraceHelper to use snr_register_to_db utility 2025-12-13 22:04:18 -08:00