Commit Graph

33 Commits

Author SHA1 Message Date
agessaman
7d76ed443b Update dependencies and enhance path handling for multi-byte support
- Updated `meshcore` dependency version to `2.2.14` in both `pyproject.toml` and `requirements.txt`.
- Added multi-byte path support in the `PathCommand`, allowing for 1-, 2-, and 3-byte-per-hop paths.
- Enhanced `MessageHandler` to utilize `routing_info` for accurate path extraction and validation.
- Improved path extraction methods in `MultitestCommand` and `TestCommand` to prefer `routing_info` for node IDs.
- Refactored path handling logic across various commands to ensure consistent multi-byte path processing.
2026-03-05 13:37:38 -08:00
agessaman
4982ba482d Enhance mesh graph handling for multi-resolution prefix support
- Updated `MeshGraph` to support multi-resolution storage of edges, allowing prefixes of 2, 4, or 6 hex chars without truncation.
- Implemented prefix matching logic to ensure distinct links are maintained and accurately retrieved based on prefix queries.
- Refactored methods in `MessageHandler` and `PathCommand` to accommodate variable prefix lengths during graph lookups.
- Enhanced tests to validate prefix match functionality and edge management in the mesh graph.
2026-03-01 20:42:06 -08:00
agessaman
6b624c567a Enhance path handling and database schema for multi-byte prefix support
- Introduced a new utility function `decode_path_len_byte` to decode RF packet path length bytes, supporting both legacy and multi-byte paths.
- Updated various modules to utilize the new decoding logic, ensuring compatibility with configured prefix lengths.
- Modified database schemas to include `bytes_per_hop` and `out_bytes_per_hop` columns for better path management.
- Enhanced path parsing and validation across commands and services to accommodate variable prefix lengths.
- Improved logging and error handling for path-related operations, ensuring robustness during transitions.
2026-02-28 13:03:48 -08:00
Ian Rifkin
36a8a67543 Add transitional support for 2-byte prefixes while keeping legacy 1-byte compatibility
- Update prefix command to accept BOTH legacy 2-char prefixes and
  configured prefix_hex_chars (e.g. 4-char) during firmware transition
- Replace strict length validation with dual-length validation (2 or N)
- Ensure prefix lookups work with either input length via LIKE matching
- Update related SQL prefix extraction to use configured prefix length
- Add fallback handling in path parsing for legacy 2-char route data

Notes:
- This is an interim compatibility change to support mixed networks
  where RF path data is still 1-byte while bot config may be 2-byte.
- Needs additional testing across real multi-hop scenarios and mixed
  bot configurations.
- Translation updates are incomplete: only English strings were updated;
  other translation files still need review.
- Behavior and UX may need refinement after real-world testing.
2026-02-27 23:48:27 -05:00
agessaman
1b5a3dbd0e Improve message handling across multiple commands to respect per-user rate limits
- Updated the `send_response` method calls in various command classes to include a `skip_user_rate_limit` parameter for message continuations, ensuring that the per-user rate limit applies only to the first message.
- This change improves user experience by allowing seamless message continuations without unnecessary rate limiting.
2026-02-18 09:16:42 -08:00
agessaman
3575d025ba Implement feed manager configuration and refactor command settings
- Added a new [Feed_Manager] section in the configuration to enable or disable RSS/API feed subscriptions, defaulting to false.
- Updated the FeedManager class to handle missing configuration sections gracefully, ensuring compatibility with upgrades.
- Refactored joke command configuration to standardize the use of an `enabled` key, replacing legacy `*_enabled` keys for clarity.
- Adjusted the PathCommand class to enable the "p" shortcut by default, improving user experience.
2026-02-12 22:03:02 -08:00
agessaman
d699ea1cf1 Update configuration handling and validation for bot sections
- Enhanced .gitignore to allow test files in the tests/ directory and committed pytest.ini for test discovery.
- Added checks for missing sections in configuration files, specifically for Admin_ACL and Banned_Users, to prevent errors during bot startup.
- Updated generate_website.py and command_manager.py to handle cases where required sections are absent, returning empty lists instead of raising exceptions.
- Introduced optional dependencies for testing in pyproject.toml, ensuring a smoother development experience.
- Improved localization handling in core.py to default to English when the Localization section is missing, enhancing user experience.
2026-02-12 19:23:35 -08:00
agessaman
ec4b4dbc66 feat: Enhance PathCommand with SNR integration and location validation
- Added SNR (Signal-to-Noise Ratio) data handling to improve zero-hop bonus calculations for repeaters, enhancing selection accuracy.
- Implemented location validation checks to prioritize repeaters with valid geographic data, especially for final hop scenarios.
- Updated scoring logic to apply penalties for repeaters lacking valid location data, ensuring better routing decisions.
- Enhanced logging for SNR bonuses and location penalties to improve debugging and performance tracking.
2026-01-26 17:37:36 -08:00
agessaman
df8dc8cafb feat: Enhance path selection and observation tracking
- Added new configuration options for path selection presets and proximity methods in config.ini.example, allowing users to customize routing behavior.
- Implemented a new database table for storing observed paths, enabling better tracking of paths from advertisements and messages.
- Updated MessageHandler to store complete paths in the observed_paths table, improving path validation and selection accuracy.
- Enhanced the PathCommand class to utilize new proximity and recency settings, optimizing repeater selection based on user-defined criteria.
- Improved web viewer functionality to display multiple paths for contacts, enhancing user experience and interaction with path data.
2026-01-25 10:12:46 -08:00
agessaman
bd2849655c feat: Enhance mesh graph functionality and path validation
- Added a new mesh graph feature for improved path validation, allowing for enhanced routing accuracy.
- Introduced configuration options for recency decay half-life and graph-based validation settings in config.ini.example.
- Updated the PathCommand class to utilize graph-based selection methods, combining graph and geographic scores for better repeater selection.
- Implemented new methods in MessageHandler to update the mesh graph with advertisement paths and trace packet data.
- Created a new database table for mesh connections to support graph-based path validation.
- Enhanced web viewer integration to display mesh graph updates in real-time, improving user interaction and monitoring capabilities.
2026-01-23 20:26:56 -08:00
agessaman
d2abc49048 feat: Enhance command documentation and usage information
- Updated the `generate_html` function to include detailed command usage information, including syntax, examples, and parameters for better user guidance.
- Added CSS styles for improved presentation of command usage and parameters in the generated website documentation.
- Enhanced command classes with structured documentation fields, allowing for consistent and informative command descriptions across the platform.
2026-01-15 20:04:58 -08:00
agessaman
cc3fffeb54 feat: Add command enable/disable configuration for various commands
- Implemented a configuration option for enabling or disabling commands across multiple command classes.
- Each command now checks its enabled state before execution, improving control over command availability.
- Updated the configuration loading mechanism to retrieve the enabled state from the config file for commands like Advert, AQI, Catfact, and others.
2026-01-10 09:33:15 -08:00
agessaman
a34f816af5 bug: fixed path decoding logic in PathCommand
- Improved the path decoding functionality to handle single nodes more effectively by checking for hex values.
- Added regex pattern matching to identify hex values in path parts, allowing for better decoding of repeater names.
- Updated fallback behavior for unknown formats to return the raw path string when decoding fails.
2026-01-04 15:57:56 -08:00
agessaman
e4e70930f9 Update README and enhance command functionality
- Updated README to specify submitting pull requests against the dev branch.
- Added per-trigger lockout tracking in AnnouncementsCommand to prevent duplicate sends within a 60-second window.
- Implemented dynamic maximum message length calculation in BaseCommand for better message formatting.
- Enhanced response handling in PrefixCommand to support message splitting based on calculated length.
2025-12-31 16:54:38 -08:00
agessaman
d446640a50 Enhance channel fetching logic in ChannelManager to include device connectivity checks and implement timeout protection during channel refresh in MessageScheduler. Introduce sender location prioritization in PathCommand and TestCommand for improved repeater selection accuracy. Update logging for better diagnostics on fetch operations and proximity calculations. 2025-12-07 14:02:14 -08:00
agessaman
cc53ab4268 Refactor proximity selection logic in PathCommand and TestCommand to prioritize bot location for the last repeater. Introduce configurable recency and proximity weights for scoring, enhancing the accuracy of repeater selection. Update logging for better debugging of selection scores. 2025-12-06 19:38:03 -08:00
agessaman
82aa5ee160 Add greeter command configuration to config.ini.example and implement greeter functionality in message handling. Introduce favorite status management for repeaters, allowing users to toggle favorite status via API. Update path command and test command to incorporate favorite bias in scoring. Enhance database schema to support star status tracking for repeaters and roomservers. 2025-11-25 17:26:40 -08:00
agessaman
6c660dc14c Enhance configuration and command files to support new distance metrics in message responses. Updated Keywords section to include {path_distance} and {firstlast_distance} placeholders. Refactored distance calculation methods into utils and improved path command logic for better accuracy in distance reporting. Added detailed logging for packet hash calculations and message handling in multitest command. 2025-11-20 21:41:10 -08:00
agessaman
7e2c478662 Implement localization support across various commands and configuration. Added language settings in config.ini.example, integrated translation functionality in command responses, and enhanced error handling with localized messages. Improved fallback mechanisms for missing translations and updated help text for better user guidance. 2025-11-16 20:17:58 -08:00
agessaman
e0df11724f update path command to have an optional p shortcut, enabled via config.ini; updated catfacts to have more and more accurate facts. 2025-11-14 18:40:25 -08:00
agessaman
d963e75473 improvements to geocoding management in repeater_manager and path guessing in path command 2025-11-13 20:43:45 -08:00
agessaman
f162336d44 updated documentation about placeholders in responses, improvements to path data in webviewer 2025-11-11 20:18:01 -08:00
agessaman
fd7f64c346 Add max prefix range configuration and distance filtering in PrefixCommand 2025-11-09 21:14:44 -08:00
agessaman
e114de7947 Implement companion contact purging and configurable recency/proximity weighting
- Added configuration options for companion contact purging, including thresholds for inactivity based on direct messages and advertisements.
- Enhanced the RepeaterManager to support automatic purging of companions when contact limits are exceeded.
- Updated PathCommand to utilize configurable recency/proximity weighting for improved path routing decisions.
- Introduced new commands for purging companions and updated existing commands to handle companion purging logic.
- Added API endpoint for manual geocoding of contacts and improved web viewer functionality for geocoding contacts.
2025-11-06 20:58:52 -08:00
agessaman
4f195b050e added configuration option for path guessing symbols 2025-10-27 14:10:12 -07:00
agessaman
acd17621a6 Enhance RepeaterManager with daily advertisement tracking and statistics
- Added a new 'daily_stats' table for tracking daily advertisement statistics.
- Implemented methods to track daily advertisement counts and retrieve statistics over specified date ranges.
- Updated existing advertisement tracking logic to utilize the new daily statistics.
- Modified web viewer to display advertisement metrics using the new daily tracking data.
- Improved path command logic to prioritize database queries over API cache for path decoding.
2025-10-24 22:27:25 -07:00
agessaman
7bb51f219b Web Viewer Integration
- Add Flask + Flask-SocketIO web viewer with dashboard (modules/web_viewer/app.py and related)
- Add web viewer templates: index, realtime, tracking (contacts), cache, purging, stats (modules/web_viewer/templates/)
- Add integration hooks and utility functions for web viewer (modules/web_viewer/integration.py, modules/utils.py)
- Add command to launch web viewer from bot CLI (modules/commands/webviewer_command.py)
- Update .gitignore: ignore db/log files, test scripts, and web viewer artifacts
- Add restart_viewer.sh helper script for standalone web viewer restart/troubleshooting
- Add guidance and documentation for modern viewer in WEB_VIEWER.md and docs/
- Various code structure and import improvements to core bot and command modules to support integration
- Add ACL support for sensitive commands
- Example config updates

Benefits:
- Decouples monitoring/UI from bot core process
- Enables real-time browser dashboard and unified contact/repeater tracking
- Easier integration, dev, and troubleshooting
2025-10-21 21:57:00 -07:00
agessaman
f524b3109d removed hardcoded reference to map.w0z.is, updated the path command to try to resolve prefix collisions using proximity and recency 2025-10-18 18:24:22 -07:00
agessaman
4adf9fe301 Updated database schema for complete contact tracking and optimized handling of repeater commands. Revised method for removing contacts from the device to use meshcore.py. 2025-10-18 17:16:50 -07:00
agessaman
fea21b85bd initial update to include proximity-based path resolution 2025-10-18 14:46:31 -07:00
agessaman
17f5665a77 Add geolocation update functionality to repeater command 2025-10-12 19:09:23 -07:00
agessaman
0ced52b2a2 Refactor Path Command to enhance path decoding and response handling 2025-10-04 09:47:40 -07:00
agessaman
025d3d539f Refactor command syntax and enhance test command functionality
- Updated the test command response format to include optional phrases.
- Removed the at_phrase command and its references from the command manager and help command.
- Adjusted configuration examples to reflect the new syntax for message acknowledgments.
- Enhanced the sports command with additional WNBA team support and improved city mappings for team searches.
2025-09-17 21:12:43 -07:00