Commit Graph

305 Commits

Author SHA1 Message Date
agessaman
4ecef53eeb feat: Improve error handling and configuration path resolution in web viewer
- Added error handling in the template context processor to ensure templates render without raising exceptions, logging any failures.
- Enhanced the configuration path resolution to support relative paths when starting the web viewer as a subprocess, improving flexibility.
- Implemented logging for unhandled exceptions in Flask routes to aid in debugging and provide clearer error reporting.
2026-02-08 09:45:22 -08:00
agessaman
2acc7e2052 feat: Enhance installation script with Python virtual environment setup
- Added steps to create and manage a Python virtual environment during installation, ensuring dependencies are isolated from system packages.
- Implemented checks for existing virtual environments and upgraded pip before installing dependencies from requirements.txt.
- Updated section headers in the script to reflect the new installation steps and improved clarity in the process flow.
2026-02-08 09:11:57 -08:00
agessaman
a3dfef4901 feat: Update time filter options and improve UI for starred nodes
- Replaced the "Last 7 Days" option with "Last 48 Hours" and "Last 72 Hours" in both edge and node filters for better granularity.
- Enhanced the layout of the "Show Only Starred" checkbox for improved user experience.
- Introduced filtered node maps for efficient edge drawing, ensuring edges are only drawn between nodes within the selected timeframe.
2026-02-08 09:06:29 -08:00
agessaman
097c5a60dd feat: Implement bulk delete functionality for contacts
- Added a button for bulk deletion of selected contacts, enhancing user experience by allowing multiple contacts to be deleted at once.
- Introduced a checkbox for selecting all contacts on the current page, with corresponding updates to the bulk delete button visibility and count.
- Updated the contacts HTML template to accommodate the new bulk delete feature and improved layout for better usability.
- Enhanced the ModernContactsManager class to manage selected contact IDs and handle bulk delete actions effectively.
2026-02-07 22:08:12 -08:00
agessaman
0d54c702e8 feat: Enhance contact data retrieval with optional time filtering
- Updated the API endpoint to accept an optional query parameter `since` for filtering contact data based on the time frame (24h, 7d, 30d, 90d, or all).
- Modified the `_get_tracking_data` method to implement filtering logic based on the `since` parameter, improving performance by limiting the data retrieved.
- Enhanced the contacts HTML template to include a dropdown for selecting the time frame, with the default set to the last 30 days.
- Implemented local storage functionality to remember the user's selected time frame across sessions.
2026-02-07 21:56:22 -08:00
agessaman
e1f3a7ab09 chore: Update database paths and scoring parameters in configuration
- Changed the default database path in config.ini.example and related files from 'bot_data.db' to 'meshcore_bot.db' for consistency across modules.
- Adjusted final hop proximity scoring parameters in config.ini.example to reflect updated distance normalization and thresholds, enhancing scoring accuracy for LoRa networks.
- Updated documentation to clarify the shared database usage between the bot and web viewer.
2026-02-07 21:31:07 -08:00
agessaman
d15c58994e chore: Remove outdated documentation files and update references
- Deleted COMMANDS.md, DOCKER.md, WEB_VIEWER.md, and other related documentation files to streamline the project structure.
- Updated README.md and other documentation references to point to the new locations of the command and Docker instructions.
- Added optional dependencies for documentation generation in pyproject.toml.
2026-02-07 20:10:09 -08:00
agessaman
5edf09f28f chore: Update configuration and documentation files
- Added '*.key' to .gitignore to prevent tracking of key files.
- Changed the default database path in config.ini.example from 'bot_data.db' to 'meshcore_bot.db' for clarity.
- Enhanced documentation files with front matter for better rendering and organization, including Discord Bridge, Feed Management, Map Uploader, Packet Capture, Path Command Configuration, Repeater Management Commands, and Weather Service.
2026-02-07 19:14:30 -08:00
agessaman
500d40c031 refactor: Update database path initialization in BotDataViewer
- Moved the assignment of `db_path` to be loaded from the configuration file, enhancing flexibility and maintainability of the database path management in the BotDataViewer class.
2026-02-04 14:15:56 -08:00
agessaman
28436d92b6 fix: Update Docker build workflow to conditionally enable latest tag
- Modified the Docker build workflow to enable the 'latest' tag only for the main or master branches, ensuring that the latest image is tagged appropriately based on the branch context.
2026-02-03 08:35:16 -08:00
agessaman
e6bec91c2b refactor: Consolidate escape sequence decoding across modules
- Removed the custom `_decode_escape_sequences` method from multiple classes and replaced it with a centralized `decode_escape_sequences` function in the utils module.
- Updated all relevant modules (CommandManager, MessageScheduler, GreeterCommand) to utilize the new function for decoding escape sequences in configuration strings, improving code maintainability and consistency.
- Enhanced the config example to clarify the usage of escape sequences in messages.
2026-02-02 16:18:14 -08:00
Adam Gessaman
248a8da568 Merge pull request #40 from smithpl2000/feature/polish_translate
Feature: Add Polish translation (pl) 80%
2026-02-02 09:30:24 -08:00
Marcin Przybylek
b7f47cbd29 Polish translate for meshcore-bot 80% ready 2026-02-02 01:37:41 +01:00
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