Commit Graph

292 Commits

Author SHA1 Message Date
agessaman 9451cd90a0 chore: Update .gitignore to include PyMC test files and configuration
- Added entries for `pymc-test/*` and `config-pymc.ini` to the .gitignore file to prevent tracking of test artifacts and configuration files related to PyMC, improving repository cleanliness.
2026-02-01 16:06:44 -08:00
agessaman 04560c436d fix: Add Weather command mapping in BaseCommand
- Introduced a new mapping for the 'Weather' command to 'Wx_Command' in BaseCommand, clarifying the relationship between legacy and current command names.
- This change enhances command handling by ensuring that the new command structure is recognized while maintaining backward compatibility.
2026-01-31 09:31:21 -08:00
agessaman 01b3114f2c fix: Enforce channel validation in WxCommand execution
- Updated the can_execute method in WxCommand to enforce channel checks before delegating command execution.
- Ensured that [Wx_Command] channels take precedence when using the delegate command, improving command handling accuracy.
2026-01-31 09:26:06 -08:00
agessaman e9a615e120 feat: Add database query execution methods for connection reuse
- Introduced `execute_query_on_connection` and `execute_update_on_connection` methods in DBManager to facilitate executing queries and updates on existing database connections.
- Enhanced the `_recalculate_distance_if_needed`, `_get_location_by_public_key`, and `_get_location_by_prefix` methods in MeshGraph to support optional database connection and location caching, improving performance during batch operations.
2026-01-31 09:25:17 -08:00
agessaman 64e0ffac40 refactor: Change packet logging level from INFO to DEBUG
- Updated the logging level for captured packets to DEBUG to reduce verbosity in service lifecycle logs.
- Maintained detailed packet information output for debugging purposes while ensuring INFO level is reserved for lifecycle events.
2026-01-31 08:16:06 -08:00
agessaman 3c5057d92d feat: Enhance graph view synchronization and node rendering in web viewer
- Added functionality to synchronize the view with the URL hash, allowing direct access to the graph tab.
- Implemented event listeners for hash changes to switch between graph and map views seamlessly.
- Updated the loadData function to conditionally apply filters based on rendering options, improving performance during live updates.
- Enhanced node styling and interaction settings for better visual feedback and user experience in the graph view.
2026-01-30 20:38:36 -08:00
agessaman ab1fe6d841 feat: Enhance node highlighting and styling in web viewer
- Introduced functionality to store and restore original styles for nodes, allowing for dynamic highlighting and shrinking of non-highlighted nodes.
- Implemented smooth zooming and fade animations for markers in the map view, improving user experience during interactions.
- Refactored node styling logic to ensure connected nodes maintain their size while non-connected nodes are significantly shrunk for better visibility.
- Enhanced the clearing of highlights to restore original styles effectively, ensuring a consistent visual state after interactions.
2026-01-27 22:08:37 -08:00
agessaman 6ac2f7f1ff fix: Clean up proximity-related configuration options in config.ini.example
- Removed obsolete proximity calculation settings including `proximity_method`, `path_proximity_fallback`, `max_proximity_range`, and `max_repeater_age_days` to streamline configuration.
- Simplified the configuration file for better clarity and maintainability, focusing on essential parameters for geographic proximity handling.
2026-01-27 20:29:46 -08:00
agessaman a102e6eabe feat: Add automatic device name update feature
- Introduced a new configuration option `auto_update_device_name` in config.ini.example to control whether the device name should automatically match the bot_name on startup.
- Implemented the `set_device_name` method in core.py to check and update the device name based on the configuration, ensuring consistency between the device and bot name.
- Enhanced logging for device name checks and updates to improve debugging and user awareness of the device state.
2026-01-27 20:28:21 -08:00
agessaman 1245ab9ce2 feat: Implement path sorting and rendering enhancements in contacts modal
- Added a new method to sort paths based on length, recency, or frequency, improving user experience in the contacts modal.
- Refactored path rendering logic into a separate method for better maintainability and readability.
- Introduced a dropdown for users to select their preferred sorting method, with the option saved in localStorage for persistence.
- Updated modal content to reflect the sorted paths and ensure accurate display of path data.
2026-01-27 16:13:19 -08:00
agessaman 9423178b33 fix: Improve channel validation logic in BaseCommand
- Added checks for empty channels and normalized channel names for case-insensitive comparison.
- Updated allowed channels validation to ensure consistent handling of channel names, enhancing command execution accuracy.
2026-01-27 15:47:56 -08:00
agessaman ffdc906b22 fix: Update help text for commands to avoid truncation and tx issues 2026-01-26 21:11:36 -08:00
agessaman b50d02aee9 feat: Add command prefix support and enhance message handling
- Introduced a new configuration option for command prefix in config.ini.example, allowing users to customize command invocation.
- Updated CommandManager to load and utilize the command prefix, ensuring commands are processed correctly based on the configured prefix.
- Enhanced message handling logic to check for the command prefix, maintaining backward compatibility with the legacy "!" prefix.
- Improved keyword matching to ensure bot responses are only triggered when the bot is mentioned, refining interaction accuracy.
2026-01-26 21:02:30 -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 1559860dcb feat: Introduce prefix best location feature and enhance message handling
- Added configuration options for the "prefix best <location>" command in config.ini.example, allowing users to enable/disable the feature and customize its behavior.
- Implemented logic in the PrefixCommand class to find the best prefix for a given location, considering neighbor prefixes and user-defined criteria.
- Enhanced MessageHandler to skip processing old cached messages based on connection time, improving message handling efficiency.
- Updated core bot to track connection time, ensuring accurate message processing and cache management.
2026-01-26 17:15:25 -08:00
agessaman d97c0886e7 feat: Refactor multitest command to support user sessions and improve path tracking
- Introduced a new MultitestSession dataclass to manage active multitest sessions per user, enhancing concurrency handling.
- Replaced global variables with session-specific attributes to track listening duration, collected paths, and target packet hashes.
- Updated message handling logic to check active sessions and prevent race conditions during multitest execution.
- Enhanced path collection and RF data scanning to be user-specific, improving accuracy and logging for each session.
- Implemented execution locks to ensure thread safety during multitest command execution.
2026-01-25 20:47:01 -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 ed1e541bed feat: Add Aurora command
- Introduced a new section in configuration files for the Aurora command, allowing users to enable/disable the feature and set default coordinates.
- Updated English translations to include descriptions, usage instructions, and error messages for the Aurora command, enhancing user interaction and support.
2026-01-20 21:38:19 -08:00
agessaman ba33fed1a8 feat: Implement service health checks and restart logic
- Added a new configuration option for service restart backoff timing in config.ini.example.
- Enhanced the MeshCoreBot class to track service health and manage restarts for unhealthy services.
- Introduced a new method for service health checks in the BaseServicePlugin class, allowing for custom health validation in subclasses.
- Updated the PacketCaptureService to include specific health check logic based on connection status.
2026-01-20 20:35:29 -08:00
agessaman 04478acf51 feat: Refactor geocoding and country/state handling in commands
- Updated utility functions to improve country name validation, ensuring accurate identification of country names and US states.
- Enhanced geocoding logic in multiple command classes to handle default state and country configurations more effectively.
- Modified error messages to reflect the correct region based on user input, improving user experience.
- Added short usage descriptions for satellite pass commands in multiple languages, enhancing internationalization support.
2026-01-19 22:01:47 -08:00
agessaman c53bfce4b7 feat: Enhance elapsed time handling in messages
- Updated the message handling logic to format elapsed time more accurately, displaying "Nms" when the device clock is valid or "Sync Device Clock" when invalid.
- Introduced a new utility function `format_elapsed_display` to centralize elapsed time formatting, improving code maintainability.
- Modified configuration examples to clarify the usage of the {elapsed} placeholder.
- Added translations for the "Sync Device Clock" message in multiple languages to support internationalization.
2026-01-19 09:55:31 -08:00
agessaman abe8e57ae3 feat: Update banned user handling to support prefix matching
- Modified configuration examples to clarify that banned users are now identified by sender names using prefix matching.
- Implemented a new method in CommandManager to check if a user is banned based on prefix matching, enhancing the bot's ability to ignore messages from banned senders.
- Updated message handling logic to utilize the new prefix matching functionality for improved user management.
2026-01-18 20:04:50 -08:00
agessaman 93c4004e2d feat: Add unique advert packet tracking and leaderboard functionality
- Introduced a new database table 'unique_advert_packets' for tracking unique advert packets by their hash.
- Enhanced the RepeaterManager to handle unique packet tracking during daily advertisement statistics.
- Updated StatsCommand to include a new subcommand for displaying the leaderboard of nodes with the most unique advert packets in the last 24 hours.
- Modified translations to support the new advert statistics feature, ensuring user-friendly command descriptions and error messages.
2026-01-18 14:16:04 -08:00
agessaman 9a74144a8f feat: Add ZIP code geocoding support to GlobalWxCommand
- Implemented geocode_zipcode_sync to handle US ZIP code queries, ensuring accurate geocoding results.
- Enhanced location handling to prevent foreign matches for ZIP codes, improving the reliability of location-based commands.
- Added error handling for reverse geocoding failures, ensuring robust logging and feedback for invalid ZIP codes.
2026-01-18 08:08:31 -08:00
agessaman aa3951827a feat: Implement command queuing for global cooldowns in CommandManager
- Added QueuedCommand dataclass to represent commands waiting for cooldown expiration.
- Enhanced CommandManager to support queuing commands when near global cooldown expiration, allowing for smoother command execution.
- Implemented background task to process queued commands, ensuring they are executed once cooldowns expire.
- Updated BaseCommand to include a method for retrieving queue threshold seconds, improving flexibility in command handling.
- Adjusted core.py to initiate the command queue processor upon bot startup.
2026-01-17 21:12:24 -08:00
agessaman 951ded4244 feat: Add support for custom WXSIM weather sources in wx_command and wx_international modules
- Introduced functionality to configure custom weather sources in config.ini, allowing users to specify URLs for different locations.
- Enhanced WxCommand and GlobalWxCommand classes to fetch weather data from custom WXSIM sources, improving flexibility in weather reporting.
- Implemented methods to retrieve and parse weather data from specified sources, ensuring compatibility with existing weather command structures.
- Updated documentation in config.ini.example to guide users on configuring custom weather sources.
2026-01-17 16:52:15 -08:00
agessaman 58901a2857 chore: Update docker-setup.sh and documentation for improved serial device handling and logging
- Enhanced docker-setup.sh to ensure device mappings are correctly moved from the volumes section to the devices section in Docker Compose files.
- Added checks for serial device permissions and provided detailed instructions in DOCKER.md for resolving permission issues.
- Updated Dockerfile to add the meshcore user to the dialout group for serial port access, improving compatibility with serial devices.
- Improved logging functionality in core.py to handle log file paths more robustly, ensuring directories are created as needed and handling errors gracefully.
2026-01-17 12:12:33 -08:00
agessaman ce79c382da chore: Enhance docker-setup.sh with verification steps for log and database paths
- Added checks to verify the correct configuration of log_file and db_path in config.ini, ensuring they are set to expected absolute paths.
- Implemented logic to attempt automatic correction of log_file if the update fails, improving robustness of the setup process.
- Updated user prompts to guide through necessary steps after running the script, emphasizing the importance of restarting containers for changes to take effect.
2026-01-17 12:01:54 -08:00
agessaman d9642d41f2 chore: Enhance docker-setup.sh for improved serial device handling and Docker compatibility
- Added logic to resolve symlinks for serial devices, ensuring the actual device path is used for Docker compatibility.
- Updated docker-compose file handling to prefer docker-compose.override.yml and streamline device mapping updates.
- Improved comments and structure for better clarity and maintainability in the script.
2026-01-17 11:54:58 -08:00
agessaman 9ca59fbcee chore: Improve docker-compose.yml and docker-setup.sh for better environment management
- Clarified comments in docker-compose.yml regarding build configuration and updated pull_policy to 'missing' for clearer intent.
- Enhanced docker-setup.sh to ensure .env file creation and updates are more robust, with improved error handling and verification steps for Docker image configuration.
2026-01-17 11:49:57 -08:00
agessaman 0c1131e363 chore: Refine docker-compose.yml for improved build process
- Updated docker-compose.yml to clarify the build configuration, ensuring local builds occur if the image is not present in the registry.
- Added pull_policy to optimize image retrieval, enhancing the overall Docker setup experience.
2026-01-17 11:34:15 -08:00
agessaman 1d60475186 chore: Refine Docker configuration for serial device handling
- Updated docker-compose.yml to clarify device access instructions for Linux and added notes for ARM devices regarding network mode.
- Enhanced docker-setup.sh to resolve symlinks for serial devices, improving Docker compatibility and providing fallback options for device paths.
2026-01-17 10:57:34 -08:00
agessaman 6a1a78cb2a chore: Update Docker configuration for improved image management
- Modified docker-compose.yml to support using a pre-built image from GitHub Container Registry, with automatic tagging based on the current git branch.
- Enhanced docker-setup.sh to detect the current git branch and set the Docker image tag accordingly, creating or updating the .env file with the appropriate configuration.
2026-01-17 10:40:25 -08:00
agessaman 458c920c2b chore: Update GitHub Actions workflow to include 'dev' branch support
- Added 'dev' branch to the trigger conditions for both push and pull_request events in the Docker build workflow, ensuring builds are initiated for development changes.
2026-01-17 10:20:03 -08:00
agessaman f81555f821 chore: Update Docker documentation and optimize Dockerfile for caching
- Revised DOCKER.md to recommend building directly with `docker build` for improved compatibility on ARM devices and clarified the use of host network mode.
- Enhanced Dockerfile to utilize cache mounts for apt and pip installations, improving build efficiency and reducing redundant downloads.
- Updated GitHub Actions workflow to support multi-platform builds for both amd64 and arm64 architectures, ensuring broader compatibility.
2026-01-17 10:10:59 -08:00
agessaman 12c372c9c3 feat: Enhance docker-setup.sh for automatic path updates and improve documentation
- Updated docker-setup.sh to automatically configure database and log paths in config.ini for Docker deployment, including checks for relative paths in specific sections.
- Revised DOCKER.md to clarify that the setup script handles path updates, emphasizing the need for absolute paths for log files.
2026-01-17 09:57:43 -08:00
agessaman c8649ab250 chore: Simplify docker-compose.yml and enhance Docker documentation
- Removed unnecessary version declaration from docker-compose.yml.
- Added detailed troubleshooting steps for build failures on ARM devices in DOCKER.md, including network mode adjustments and Docker daemon checks.
- Updated Dockerfile to maintain consistent casing in the build stage declaration.
2026-01-17 09:48:05 -08:00
agessaman e18b96f3df chore: Update configuration and documentation for Docker setup
- Added new configuration options in config.ini.example for monitoring channels, direct message responses, and banned users.
- Updated docker-setup.sh to clarify build and start commands for Docker containers, including options to avoid pull warnings.
- Revised README and DOCKER.md to reflect changes in Docker commands, emphasizing the importance of building the image before starting the container.
2026-01-17 09:40:16 -08:00
agessaman 21b46e9ee6 fix: Update sed command in docker-setup.sh for improved compatibility
- Modified the sed command in the update_config function to use '|' as a delimiter, enhancing compatibility with paths containing '/'.
- Ensured consistent handling of key updates for both Linux and macOS platforms.
2026-01-17 09:28:39 -08:00
agessaman 9b15d92b2f feat: Enhance Docker setup script for improved configuration and device detection
- Updated the docker-setup.sh script to automatically configure database and log paths in config.ini for Docker usage.
- Implemented platform detection to handle serial device identification for both Linux and macOS, improving compatibility.
- Added functionality to update docker-compose.yml with detected serial devices, ensuring proper device mapping for Docker containers.
- Enhanced user prompts for setup completion and next steps, streamlining the initial configuration process.
2026-01-17 09:25:26 -08:00
agessaman 61445b4811 feat: Update README and .gitignore for Docker deployment
- Added Docker deployment instructions to the README, including steps for creating data directories, updating configuration paths, and starting the application with Docker Compose.
- Updated .gitignore to include a new data directory structure, ensuring user-specific configurations, databases, and logs are ignored while maintaining the directory structure.
2026-01-17 08:34:38 -08:00
agessaman db0db96f7e feat: Add reload configuration functionality and update admin commands
- Introduced a new method `reload_config` to allow dynamic reloading of the configuration without restarting the bot, ensuring seamless updates to settings.
- Added a helper method `_get_radio_settings` to retrieve current radio settings for comparison during reload.
- Updated `admin_commands` in `config.ini.example` to include the new `reload` command, enabling admin users to reload configurations on-the-fly.
- Enhanced the `setup_scheduled_messages` method in the scheduler to clear existing jobs before reloading, preventing duplicates.
2026-01-16 19:55:44 -08:00
agessaman 117b687b0b feat: Add dynamic styling and sample generation for website
- Introduced multiple CSS styles for the generated website, allowing users to select their preferred theme.
- Enhanced the `generate_html` function to accept a style parameter and apply corresponding CSS variables.
- Added a `list_styles` function to display available styles and their descriptions.
- Implemented a `generate_samples` function to create sample HTML files for each style, including an index page for easy navigation.
- Updated command-line interface to support style selection and sample generation options.
2026-01-15 21:51:31 -08:00
agessaman 69d252d173 feat: Implement dynamic styling options for website generation
- Added support for multiple CSS styles in the `generate_html` function, allowing users to select a theme for the generated website.
- Introduced a new `list_styles` function to display available styles and their descriptions.
- Enhanced the command-line interface with options to list styles and generate sample pages for each style.
- Removed the old static `index.html` file, replacing it with a dynamically generated index that links to all available style samples.
2026-01-15 21:51:15 -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 2b3f3489bd feat: Enhance command help functionality with channel restrictions
- Updated the CommandManager to include channel restrictions for help keyword processing, ensuring that help requests are only handled in monitored channels or DMs when enabled.
- Improved the HTML documentation for commands by adding a new "General Commands" section and refining existing command descriptions.
- Added new CSS styles for better presentation of command subcommands in the website documentation.
2026-01-15 17:56:27 -08:00
agessaman 76ba4f1c0e fix: Refine content matching logic in CommandManager
- Updated the content matching logic in the CommandManager to ensure only exact matches are considered, preventing false positives from substring matches.
- Enhanced comments to clarify the purpose of the changes and the importance of accurate timestamp checks in transmission linking.
2026-01-15 17:10:37 -08:00
Adam Gessaman 4bd48e5165 feat: Add sub-command support and usage information retrieval for commands
- Implemented `get_usage_info` method in `BaseCommand` to provide structured usage information, including descriptions, sub-commands, usage patterns, and examples.
- Enhanced `generate_html` function to display sub-commands in the generated HTML output, improving command documentation.
- Updated translations in `en.json` to include sub-command details for various commands, enhancing user guidance and interaction.
2026-01-15 10:04:09 -08:00
agessaman 11dc22ae46 feat: Implement companion location features in weather commands
- Added methods to retrieve companion and bot locations from the database and configuration.
- Enhanced weather command execution to utilize companion location if no user-specified location is provided.
- Improved location handling by supporting coordinates, zip codes, and city names, with reverse geocoding for display.
2026-01-13 21:30:27 -08:00