- Changed the default IATA code from 'LOC' to 'XYZ' in `config.ini.example` and `packet-capture.md` to reflect updated routing requirements.
- Updated the `PacketCaptureService` to use 'XYZ' as the fallback IATA code, ensuring consistency across the application.
- Added support for rotating log files in `core.py` using `RotatingFileHandler`, with a maximum size of 5 MB and up to 3 backup files.
- Updated `config.ini.example`, `config.ini.minimal-example`, and `config.ini.quickstart` to include descriptions of the new log rotation feature.
- Enhanced `data-retention.md` to clarify log file management and retention policies.
- Updated `config.ini.example` and `config.ini.minimal-example` to include optional `local_dir_path` for specifying a custom local plugins directory.
- Enhanced `install-service.sh` to preserve the `local/` directory during installation and create its structure if it doesn't exist.
- Modified `CommandManager` and `MeshCoreBot` to resolve the local commands and services directory based on the new configuration.
- Added validation in `config_validation.py` to check the existence and readability of the specified local plugins path.
- Improved documentation in `local-plugins.md` to clarify the usage of local plugins and the new configuration options.
- Updated `.gitignore` to include local configuration and plugin directories, allowing users to add custom commands and services without modifying core code.
- Enhanced `config.ini.example` with instructions for using local plugins and added sections for local service configurations.
- Refactored `PluginLoader` and `ServicePluginLoader` to support loading local commands and services from specified directories, improving extensibility.
- Updated `mkdocs.yml` to include documentation for local plugins and the check-in API.
- Added tests to verify the discovery and loading of local plugins, ensuring functionality and preventing name collisions with built-in plugins.
- Added support for `{hops}` and `{hops_label}` placeholders in `config.ini.example` and `core.py`, allowing for dynamic display of total hop count and pluralized labels in messages.
- Updated `format_keyword_response_with_placeholders` function in `utils.py` to extract and format hop count from message data, improving message clarity and detail.
- Ensured backward compatibility by providing default values for hop-related placeholders when not set.
- Added configuration options to bridge the bot's own channel responses to Discord and Telegram, allowing command replies to be sent to respective channels.
- Updated `DiscordBridgeService` and `TelegramBridgeService` to register listeners for bot-sent messages, ensuring they are included in the bridging process.
- Enhanced `CommandManager` to invoke listeners with a synthetic event when a message is successfully sent, providing context about the message.
- Updated `config.ini.example` to reflect the new `bridge_bot_responses` option for both services.
- Added tests to verify the correct invocation of listeners upon successful message sending.
- Added support for channel-specific triggers in the CommandManager, allowing triggers to be restricted to designated channels via `channel.<key>` or `channels.<key>` configuration.
- Updated `config.ini.example` to include examples of channel restrictions for triggers.
- Enhanced tests to verify that triggers only match in specified channels, ensuring proper functionality of the new feature.
- Introduced `filter_profanity` configuration option in `config.ini.example` to handle profanity in bridged messages: options include `drop` (default), `censor`, or `off`.
- Updated `requirements.txt` to include `better-profanity` for profanity filtering functionality.
- Enhanced `DiscordBridgeService` and `TelegramBridgeService` to implement the profanity filter logic, allowing messages with profanity to be dropped or censored before bridging.
- Updated documentation in `discord-bridge.md` and `telegram-bridge.md` to reflect the new profanity handling feature.
- 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.
- Commented out the 'help' command output in `config.ini.example` for clarity on overrides.
- Refactored prefix handling in `BotDataViewer` to use a dynamically retrieved `prefix_hex_chars` value instead of a hardcoded reference, improving flexibility and maintainability.
- Ensured consistent prefix handling across multiple instances in the `BotDataViewer` class.
- Added `flood_scope` option to `[Channels]` section in `config.ini.example` for scoped flooding of channel messages.
- Updated `config-validation.md` to reflect the new `flood_scope` feature.
- Modified `CommandManager` to support optional flood scope during message sending, restoring global flood settings afterward.
- Removed unused imports from `core.py` related to meshcore-cli.
- 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.
- Updated `config.ini.example` to include an `output_format` option for the trace command, allowing users to choose between inline and vertical formats for trace results.
- Enhanced the `TraceCommand` class to handle the new output format, implementing methods for both inline and vertical formatting of trace results.
- Improved documentation within the code to clarify the behavior of the new output format feature.
- Introduced a new `[Data_Retention]` section in `config.ini.example` to manage retention periods for various database tables, including packet stream, daily stats, and observed paths.
- Updated `mkdocs.yml` and `configuration.md` to include documentation for the new data retention settings.
- Implemented data retention cleanup methods in `mesh_graph.py`, `repeater_manager.py`, and `scheduler.py` to enforce retention policies automatically.
- Enhanced the web viewer's data cleanup logic to utilize the new retention settings, ensuring efficient database management.
- Introduced `[Earthquake_Service]` section in `config.ini.example` to enable earthquake alerts with customizable parameters such as polling interval, time window, and minimum magnitude.
- Updated `service-plugins.md` to include documentation for the new Earthquake Service, detailing its functionality and default settings.
- Introduced `[Earthquake_Service]` section in `config.ini.example` to enable earthquake alerts with customizable parameters such as polling interval, time window, and minimum magnitude.
- Updated `service-plugins.md` to include documentation for the new Earthquake Service, detailing its functionality and default settings.
- Introduced `[Trace_Command]` section in `config.ini.example` to enable link diagnostics with customizable parameters such as maximum hops, trace mode, and retry settings.
- Updated `command-reference.md` to include usage instructions and examples for the new `trace` and `tracer` commands, detailing their functionality for manual and round-trip tracing.
- Enhanced `mesh_graph.py` to support 2-byte trace confirmation for improved path weighting.
- Modified `message_handler.py` to update the mesh graph based on trace data, ensuring accurate edge representation in the graph.
- Added translations for the new trace commands in `en.json` to support user interaction in multiple languages.
- Introduced new configuration options for specifying packet types to upload in `config.ini.example`.
- Enhanced `PacketCaptureService` to parse and apply these settings, allowing for selective packet type uploads based on user-defined criteria.
- Improved logging to provide feedback when packets are skipped due to type filtering.
- Updated `config.ini.example` to include new settings for edge loading and graph data capture, providing clearer guidance on usage.
- Modified `MeshGraph` class to respect the new `graph_capture_enabled` setting, controlling the collection of edge data from incoming packets.
- Adjusted message handling to ensure graph updates only occur when data capture is enabled, optimizing performance and resource usage.
- Added tests to validate the new configuration options, ensuring proper functionality in various scenarios.
- Renamed various documentation files to use lowercase for improved consistency, including `WEB_VIEWER.md`, `DOCKER.md`, and `PATH_COMMAND_CONFIG.md`.
- Updated references in `config.ini.example`, `docker-setup.sh`, `README.md`, and multiple documentation files to reflect the new file names.
- Removed obsolete documentation files related to the Discord Bridge, Map Uploader, Packet Capture, and Weather Service, streamlining the documentation structure.
- Simplified comments for various command sections in `config.ini.example` to clarify the enablement options (true/false).
- Ensured consistency in the format of comments across commands, enhancing readability and understanding for users configuring the bot.
- Standardized the configuration keys for various commands by replacing specific `*_enabled` keys with a unified `enabled` key across configuration files.
- Updated command classes to support fallback mechanisms for legacy configuration keys, ensuring backward compatibility.
- Enhanced the logic in the `BaseCommand` class to handle both standard and legacy keys for command enabling.
- Added tests to verify the correct behavior of the new configuration handling and legacy support for commands including Stats, Sports, Hacker, and Alert.
- Standardized the configuration keys for joke commands by replacing `joke_enabled` and `dadjoke_enabled` with a unified `enabled` key in the configuration files.
- Updated the validation logic to warn users when both legacy `[Jokes]` and new `[Joke_Command]`/`[DadJoke_Command]` sections are present, suggesting the removal of the legacy section.
- Enhanced the command classes to support fallback mechanisms for legacy configuration keys, ensuring backward compatibility.
- Added tests to verify the correct behavior of the new configuration handling and legacy support.
- Add modules/config_validation.py and validate_config.py CLI to flag
non-standard section names (e.g. WebViewer -> Web_Viewer).
- Migrate JokeCommand/DadJokeCommand to Joke_Command/DadJoke_Command with
legacy [Jokes] fallback in base_command.get_config_value.
- Merge [Jokes] into [Joke_Command]/[DadJoke_Command] in config.ini.example
and add 3-line stubs for minimal-option commands.
- Add webviewer to camel_case_map; add --validate-config to meshcore_bot.py.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Introduced a new method to retrieve the database path, allowing for a fallback to the [Bot] section if the [Web_Viewer] db_path is unset.
- Updated various parts of the codebase to utilize this new method, ensuring consistent database path resolution across the application.
- Enhanced the configuration example to clarify the optional nature of the db_path setting for the web viewer.
- Added per-user rate limiting functionality to control the minimum time between bot replies to the same user, identified by public key or sender name.
- Updated configuration files to include `per_user_rate_limit_seconds` and `per_user_rate_limit_enabled` options for enabling and configuring this feature.
- Enhanced the command manager and message handler to support per-user rate limiting, ensuring efficient message handling and reduced spam.
- Updated documentation to reflect the new rate limiting options and their usage.
- Introduced `channel_keywords` option in the configuration files to limit bot responses in monitored channels to specified keywords, enhancing control over channel interactions.
- Updated relevant documentation and examples to reflect the new feature, ensuring users understand how to implement keyword restrictions.
- Modified the command manager to support the new keyword filtering logic, allowing for more efficient message handling in channels.
- Updated the configuration handling for the web viewer to use the [Bot] db_path when [Web_Viewer] db_path is unset, ensuring consistent database access.
- Added warnings in the logging to notify users when the web viewer database path differs from the bot database path, guiding them to configure it correctly.
- Refactored database path resolution logic across multiple modules for better maintainability and clarity.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.