Commit Graph

414 Commits

Author SHA1 Message Date
agessaman 1b6f9df489 Improve companion identity handling and persistence
- Introduced `normalize_companion_identity_key` function to standardize identity key formatting by stripping whitespace and removing the optional 0x prefix.
- Updated `RepeaterDaemon` to utilize the new normalization function when processing identity keys, improving consistency and error handling.
- Added a `stop` method in `CompanionFrameServer` to persist contacts and channels before stopping, ensuring data survives daemon restarts.
2026-03-07 14:41:31 -08:00
agessaman 3725d6eb21 Add path hash mode configuration and management
- Introduced `path_hash_mode` setting in `config.yaml.example` to specify the hash size for flood packets.
- Updated `ConfigManager` to re-apply the path hash mode when the mesh section changes, with validation for acceptable values (0, 1, 2).
- Enhanced `RepeaterDaemon` to set the default path hash mode during initialization, ensuring consistent handling of flood packets.
2026-03-07 13:57:46 -08:00
agessaman 5b0359b74b Enhance configuration management and companion node handling
- Added backup functionality for config.yaml during save operations.
- Improved YAML saving to support Unicode characters and increased line width.
- Introduced a mechanism to sync companion node names to the configuration upon updates.
- Updated API endpoints to validate companion node names and persist changes to the configuration.
- Enhanced the RepeaterCompanionBridge to load and save preferences, ensuring consistent state management.
2026-03-05 20:04:17 -08:00
agessaman 0217a49ed2 Refactor RepeaterHandler path management and enhance packet validation
- Removed redundant call to mark_seen() for duplicate packets.
- Added validation to ensure hop count does not exceed the maximum limit before appending to the packet path.
- Updated logic to check for path size constraints when appending hash bytes, improving packet processing efficiency.
2026-03-05 16:52:43 -08:00
agessaman c150b9a9bf Merge upstream/feat/newRadios into dev-companion-v2-cleanup
- Keep our Vite-built assets and index.html script (index-DyUIpN7m.js)
- Remove upstream-only asset chunks and RoomServers-BxQ-0q-x.js
- README: keep two-backend intro, add upstream CAUTION/compatibility table
- manage.sh: keep dialog/gauge UX and .[hardware]; add CH341 udev, sudoers, libusb, polkit, silent upgrade
- sqlite_handler: add crc_errors table, index, and cleanup from upstream
- engine: add validate_packet and mark_seen in direct_forward; keep our path hash_size/hop_count logic
- advert: keep comment, use current_time = now
- api_endpoints: use restart_service() from service_utils
- config merge: strip user config comments before yq merge (upstream)

Made-with: Cursor
2026-03-05 16:43:14 -08:00
Adam Gessaman 75657ac1b1 Merge pull request #1 from agessaman/dev-companion-v2-cleanup-multibyte-paths
Enhance RepeaterHandler with multi-byte hash support and identity updates
2026-03-05 16:34:40 -08:00
agessaman a6170f70ed Add public key to identity details and enhance companion configuration handling
- Updated IdentityManager to include public key in identity details when retrieving identities.
- Introduced a new method in RepeaterDaemon for adding companions from configuration, supporting hot-reload functionality.
- Enhanced error handling for companion registration, ensuring proper validation of identity keys and settings.
- Updated API endpoints to include configured companions in the response, improving visibility of companion status and configuration.
2026-03-05 16:26:50 -08:00
agessaman b6757a0ca0 Refactor path handling in RepeaterHandler to utilize hash-based representations
- Replaced list-based path storage with hash-based methods for original and forwarded paths, improving efficiency and consistency.
- Updated display logic to format path hashes correctly, ensuring compatibility with new hash size management.
- Adjusted local transmission handling to align with the new hash representation, enhancing clarity in packet processing.
2026-03-05 14:06:43 -08:00
agessaman 0271aa9455 Add support for multi-byte hashes via local_hash_bytes
- Updated the RepeaterHandler constructor to accept local_hash_bytes, improving path handling.
- Implemented checks to ensure packet paths do not exceed MAX_PATH_SIZE when appending hash bytes.
- Refactored direct_forward method to utilize local_hash_bytes for next hop validation and path manipulation.
- Adjusted path length encoding to accommodate changes in path management logic.
2026-03-05 09:39:11 -08:00
Lloyd 136af19178 add loop detection configuration and tests for flood routing 2026-03-05 14:06:28 +00:00
Lloyd c54efa3412 add side bar display of advert blocks etc 2026-03-05 12:56:01 +00:00
Lloyd 2b7d394938 add logging for tracking advert blocking 2026-03-05 11:26:40 +00:00
Lloyd 7eeba4d569 add debugs to advert settings 2026-03-05 11:13:44 +00:00
Lloyd 7dccb7457f Add advertisement configuration options for rate limiting and adaptive settings 2026-03-05 11:12:28 +00:00
Lloyd d5e1b0e714 update stats display 2026-03-05 10:53:34 +00:00
Lloyd 998955ec52 Update minimum advertisement interval to 0 for improved mesh retransmission handling 2026-03-05 10:46:24 +00:00
Lloyd 6a52268b8c Disabl as default advertisement rate limiting and adaptive scaling features in configuration 2026-03-05 10:39:35 +00:00
Lloyd 4285023670 Implement adaptive advert rate limiting and configuration updates 2026-03-05 10:35:15 +00:00
Lloyd dd81bf94a9 log display in management script with styled output and color-coded messages 2026-03-04 12:43:24 +00:00
agessaman 1fbd99d52c Add JSON serialization support for companion preferences
- Introduced a new utility function, _to_json_safe, to ensure companion preferences are JSON-serializable, handling various data types including enums and dataclasses.
- Updated the RepeaterCompanionBridge to use the new serialization method when saving preferences to SQLite.
- Modified SQLiteHandler to ensure companion_hash is consistently converted to a string before database operations.
- Enhanced error handling for preference persistence in the RepeaterCompanionBridge.
2026-03-03 16:20:52 -08:00
Lloyd a0cd83a679 Merge pull request #116 from migillett/feature/docker-support
Feature/docker support
2026-03-03 14:01:21 +00:00
Lloyd 2dc39ce206 Merge pull request #117 from zindello/feat/addUltraPeaterBoards
Feat/add ultra peater boards
2026-03-03 13:56:17 +00:00
Joshua Mesilane 1a645bdbc7 Switching to adding a new preset instead of changing the existing one to prevent arguments 2026-03-03 20:24:01 +11:00
Joshua Mesilane 6c02617729 Adding in Zindello Industries UltraPeater boards pre-release 2026-03-03 20:08:25 +11:00
agessaman 4f94b343cc Modify CompanionBridge integration to support persisting NodePrefs
- Added new methods to SQLiteHandler for loading and saving companion preferences as JSON, improving data persistence.
- Introduced a migration to create a companion_prefs table for storing preferences, ensuring compatibility with existing data.
- Refactored main.py to utilize RepeaterCompanionBridge instead of CompanionBridge, aligning with the new architecture.
2026-03-02 21:28:15 -08:00
Michael Gillett 047f60f416 Merge branch 'rightup:main' into feature/docker-support 2026-03-02 22:45:47 -05:00
Michael Gillett 9ac6630128 Clarify Docker usage instructions in README
Updated wording for clarity in Docker section.
2026-03-02 11:47:22 -05:00
agessaman e54d79d7c2 Refactor message handling in CompanionFrameServer to use a dedicated frame building method
- Removed redundant code for building message frames based on message type.
- Introduced a new method, _build_message_frame, to streamline the process of constructing message frames, improving code readability and maintainability.
2026-03-02 07:52:36 -08:00
Lloyd 1f14dcd9fc Ui Chnages for CRC display 2026-03-02 13:53:46 +00:00
Lloyd 4a05e20172 Add CRC error tracking and API endpoints for error count and history
- Create a new table for storing CRC errors in SQLite.
- Implement methods to store and retrieve CRC error counts and history.
- Update StorageCollector to record CRC errors and expose relevant methods.
- Enhance RepeaterHandler to track and record CRC error deltas from the radio hardware.
- Add API endpoints to fetch CRC error count and history.
2026-03-02 12:36:08 +00:00
Lloyd c2f57c3d0f add tests and more validation to packets, remove crc setting from config as hardcoded. 2026-03-02 11:35:50 +00:00
Michael Gillett 908b1c39db instructions for config.yaml
rework of docker

its ALIVE

disable :ro tag for config.yaml

leave empty line

lets open ports instead of network mode host

run as current user

run as user

nevermind

update readme with instructions

relocate docker section
2026-03-01 21:44:32 -05:00
Michael Gillett d24bcb1f43 starting work on a docker build 2026-03-01 21:44:17 -05:00
Lloyd 0967f899a1 Merge pull request #115 from yellowcooln/feat/newRadios
Make CLI upgrade/start/stop/restart silent by default, keep menu dialogs
2026-03-01 22:12:53 +00:00
yellowcooln 34334c68da Make CLI actions silent while keeping menu dialogs 2026-03-01 17:02:02 -05:00
agessaman d82ebc59b0 Normalize companion_hash format in SQLite migrations to include 0x prefix
- Updated the SQLiteHandler to apply a migration that prefixes companion_hash values with '0x' for consistency with room_hash patterns.
- Adjusted the main.py file to reflect the new formatting for companion_hash when generating its string representation.
2026-02-28 09:06:24 -08:00
agessaman d5fe1e637c Restore deleted AdvertHelper. 2026-02-27 22:18:56 -08:00
agessaman 6fa85a832f Update packet type labels in rrdtool_handler and sqlite_handler for consistency
- Enhanced readability by adding descriptive suffixes to packet type labels in both rrdtool_handler.py and sqlite_handler.py.
- Aligned packet type definitions with the new naming conventions from pyMC_core, ensuring consistency across the codebase.
2026-02-27 21:18:29 -08:00
Lloyd b0158c7682 Merge pull request #106 from MSmithDev/patch-3 2026-02-27 07:12:29 +00:00
Matt 6ebce7d93b PiMesh V2 Change cs_pin value from 8 to -1 in radio settings
Switched to using native SPI CS
2026-02-26 13:35:25 -05:00
Adam Gessaman c78133f175 Refactor CompanionFrameServer for non-blocking message synchronization
- Changed the _get_companion_stats method to be asynchronous, improving responsiveness.
- Added a new async method _cmd_sync_next_message to handle message synchronization without blocking the event loop, enhancing performance during message processing.
- Introduced constants for response codes to streamline message handling in the CompanionFrameServer.
2026-02-25 15:39:18 -08:00
agessaman 789a2f27ea Enhance PacketRouter and CompanionFrameServer for improved packet delivery and contact persistence
- Updated PacketRouter to deliver packets to all companion bridges when the destination is not recognized, ensuring better handling of ephemeral destinations.
- Refactored CompanionFrameServer to separate contact serialization and persistence logic, allowing for non-blocking database operations.
- Introduced a unique index for companion contacts in SQLite to support upsert functionality, enhancing data integrity and performance.
- Improved AdvertHelper to run database operations in a separate thread, preventing event loop blocking and maintaining responsiveness.
2026-02-24 21:51:56 -08:00
Lloyd 0df94a0a91 updated convert_firmware_key.sh to support output format options and improve usage instructions; update _load_or_create_identity_key to prioritize system-wide identity key location. 2026-02-24 20:41:15 +00:00
Lloyd 25f9152a8d Update README to include compatibility details for supported radio interfaces and installation instructions for Proxmox 2026-02-24 14:15:57 +00:00
Lloyd 168d913ab9 Update pymc_core dependency to point to feat/newRadios branch 2026-02-24 12:58:19 +00:00
Lloyd 89ddd14cf8 Merge pull request #103 from rightup/feat/E22p
Feat/e22p
2026-02-24 12:51:45 +00:00
Lloyd 878218346a Add Proxmox installation instructions and CH341 GPIO pin mapping details to README 2026-02-24 12:45:47 +00:00
Lloyd 91d916798b upgrade functions to include conditional polkit installation and improve error handling for missing packages 2026-02-24 12:03:45 +00:00
Lloyd 83a6ae69ae Add sudo and create sudoers directory for service management in install and upgrade functions 2026-02-24 11:36:46 +00:00
Lloyd 74914541f2 Enhance installation and uninstallation scripts with user-friendly messages, add polkit and sudoers configuration for service management, and improve service restart handling in API endpoints. 2026-02-24 11:33:21 +00:00