Commit Graph

380 Commits

Author SHA1 Message Date
agessaman fcfde7ea33 Add data retention configuration and cleanup functionality
- 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.
2026-02-24 22:01:49 -08:00
agessaman 513d1ec65b Add Earthquake Service configuration and documentation
- 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.
2026-02-23 16:36:36 -08:00
agessaman 1c204dc389 Add trace command, configuration and documentation
- 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.
2026-02-23 14:26:50 -08:00
agessaman 87b58d7ff8 Merge main into dev (port changes since 0.8.2) 2026-02-22 21:29:54 -08:00
agessaman 5cfa86d9e6 Increase SQLite connection timeout and implement WAL mode for improved concurrency in web viewer
- Updated SQLite connection timeout from 30 seconds to 60 seconds across multiple methods to reduce lock contention.
- Enabled Write-Ahead Logging (WAL) mode for better concurrent access between the bot and web viewer.
- Refactored packet insertion logic to include retry mechanism for handling locked database scenarios.
2026-02-22 21:02:31 -08:00
agessaman 94418bebee Refactor configuration handling in MeshCoreBot
- Removed custom _DuplicateAwareConfigParser in favor of standard configparser.ConfigParser.
- Simplified configuration loading process while maintaining existing functionality.
2026-02-22 20:43:43 -08:00
agessaman 870e57b4c9 Revert "fix duplicate option handling in config parser for Python 3.13 compatibility"
This reverts commit 39c6c221e6.
2026-02-22 20:36:15 -08:00
agessaman 3604125b14 Enhance FAQ and error handling in bot operations
- Added a new FAQ section addressing common issues when moving a database to a new install, including schema mismatches, stale operations, and timeout errors.
- Updated error logging in `feed_manager.py` and `scheduler.py` to use `logger.exception` for better traceback visibility during message queue and channel operation errors.
- Improved command help text generation in `command_manager.py` to ensure proper formatting and context filtering based on message length.
- Enhanced command availability checks in `cmd_command.py` and `help_command.py` to respect channel-specific overrides and improve user experience.
2026-02-22 18:55:35 -08:00
agessaman 39c6c221e6 fix duplicate option handling in config parser for Python 3.13 compatibility
- Updated the `_handle_option` method to accommodate changes in Python 3.13, ensuring proper handling of duplicate options in configuration files.
- Enhanced logging to provide clearer error messages when duplicate options are detected, improving troubleshooting capabilities.
v0.8.2.1
2026-02-22 12:01:02 -08:00
agessaman bb1dd95f1c Refactor timezone handling across commands and utilities
- Introduced a new utility function `get_config_timezone` to centralize timezone retrieval and validation from the bot's configuration.
- Updated various commands and the scheduler to utilize the new function, ensuring consistent timezone handling and fallback mechanisms.
- Removed direct dependencies on `pytz` in favor of a more flexible approach that supports both `pytz` and `zoneinfo` for timezone management.
- Enhanced logging for invalid timezone configurations to improve troubleshooting.
2026-02-22 11:53:33 -08:00
Adam Gessaman c634802d47 v0.8.2
- Added a version indicator to the bottom of the Web Viewer
- Added ability to filter by packet type in Packet Capture Service.
- Improved mesh graph efficiency, added documentation for how to configure mesh graph calculations (or disable it) on lightweight nodes like Raspberry Pi Zero 2s.
- Simplify contact removal logic. Occasional errors will still occur until race condition in meshcore_py 
- Improvements to documentation.
v0.8.2
2026-02-21 09:53:14 -08:00
agessaman 99f4ed32d9 Add packet type filtering documentation to packet-capture.md 2026-02-21 09:34:29 -08:00
agessaman 5d79f41b4c fix footer version formatting 2026-02-21 09:10:54 -08:00
agessaman cb9d8255d7 Enhance web viewer integration with circuit breaker logic and improved error handling
- Introduced a circuit breaker mechanism to manage consecutive connection failures when sending updates to the web viewer, preventing log flooding during outages.
- Added methods to track send attempts and determine when to skip sending based on the circuit breaker state.
- Updated logging to provide feedback on circuit status and failures, improving troubleshooting capabilities.
- Refined message handling to ensure efficient communication with the web viewer, reducing unnecessary requests during downtime.
2026-02-20 15:51:23 -08:00
agessaman 54936a806e Refactor packet logging and enhance MQTT publishing metrics in PacketCaptureService
- Updated packet logging to indicate whether packets are captured or skipped based on filtering criteria.
- Modified the `publish_packet_mqtt` method to return additional metrics, including a flag for packets skipped due to type filtering.
- Improved clarity in logging and metrics to aid in diagnosing packet handling behavior.
2026-02-20 15:41:59 -08:00
Adam Gessaman f5fedb52fd Add MQTT upload packet types configuration to config.ini.example and update PacketCaptureService to handle packet type filtering
- 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.
2026-02-20 13:41:55 -08:00
agessaman 6dcf256c77 Simplify contact removal logic and add versioning to webviewer. 2026-02-19 19:39:32 -08:00
agessaman 3afdfe6e01 Update Raspberry Pi Zero 2 W FAQ section with memory management tips
- Expanded the guidance on running meshcore-bot on Raspberry Pi Zero 2 W, detailing two steps to optimize memory usage: disabling the web viewer and tuning the Mesh Graph settings.
- Included specific configuration examples to help users effectively manage resource constraints on the device.
2026-02-18 15:46:16 -08:00
agessaman de6580c231 Enhance web viewer troubleshooting documentation
- Added a comprehensive troubleshooting section for accessing the web viewer on devices like Orange Pi and SBCs, detailing configuration checks, process verification, log inspection, firewall settings, and standalone run instructions.
- Updated installation commands to include necessary dependencies for Flask and flask-socketio, improving clarity on setup requirements.
- Revised port conflict resolution steps to include updated commands for checking active ports.
2026-02-18 15:36:09 -08:00
agessaman ff2f03d363 Enhance FAQ and path command configuration documentation
- Added a new section in the FAQ detailing how to run meshcore-bot on a Raspberry Pi Zero 2 W, including specific configuration settings to manage memory usage effectively.
- Updated the path command configuration documentation to clarify the default values and usage of `graph_startup_load_days` and `graph_capture_enabled`, improving user understanding of these settings.
2026-02-18 15:22:09 -08:00
agessaman 5b7250cdd4 Enhance graph data handling and configuration options
- 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.
2026-02-18 15:09:53 -08:00
Adam Gessaman da7db842be Merge pull request #59 from agessaman/dev
Minor release fixes.

Fix logic in multitest command to avoid having a subsequent request block both test requests.
Fixed issue with per-user rate limit that prevented second message responses from commands from being sent.
v0.8.1
2026-02-18 10:00:16 -08: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 17f44347b2 Merge main into dev (release fixes) 2026-02-18 09:02:35 -08:00
agessaman 1ff35540b1 Update auto_manage_contacts setting in config.ini.example to enable bot-managed contact addition 2026-02-18 09:01:22 -08:00
Adam Gessaman 7745499537 Add is_starred column to repeater_manager table
- Updated the repeater_manager table schema to include a new column `is_starred` with a default value of 0, allowing for the tracking of starred entries.
- This change enhances the functionality of the repeater manager by enabling users to mark specific entries as starred.
2026-02-17 14:19:38 -08:00
agessaman 0e908cd793 Update multitest command to silently ignore subsequent session requests
- Modified the behavior of the `MultitestCommand` class to silently ignore additional session requests from users who already have an active session, allowing the first session to complete without interruption.
2026-02-16 19:24:00 -08:00
agessaman 58a3a8078c Add upgrade guide to documentation
- Introduced a new `upgrade.md` file detailing changes for users upgrading from previous versions.
- Included information on config compatibility, banned users prefix matching, and new optional sections for configuration.
- Provided guidance on legacy config formats and recommended updates for improved compatibility.
2026-02-16 17:51:32 -08:00
agessaman 0b130e24ee Add custom command reference section to FAQ documentation
- Introduced a new section in the FAQ to guide users on generating a custom command reference for their bots.
- Included a link to the relevant documentation on building a single-page HTML from the bot's config, enhancing user accessibility to this feature.
2026-02-16 17:38:34 -08:00
agessaman 16322e0631 Update documentation links and navigation structure
- Added an overview link to the installation section in mkdocs.yml for better accessibility.
- Renamed the Command Reference documentation file from `commands.md` to `command-reference.md` for consistency.
- Updated all references to the Command Reference in README.md, getting-started.md, and index.md to reflect the new file name.
2026-02-16 17:29:08 -08:00
agessaman 084d2c66cb Add config validation section to documentation
- Introduced a new section on config validation in configuration.md, detailing how to validate section names and path writability before starting the bot.
- Updated mkdocs.yml to include a link to the new config validation documentation.
- Added a reference to config validation in index.md for improved navigation.
2026-02-16 17:22:57 -08:00
agessaman 652712eb0c Update documentation links and file references for consistency
- 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.
2026-02-16 17:15:52 -08:00
agessaman adc99e2164 Update documentation and file references for service installation
- Renamed the service installation documentation file from `SERVICE_INSTALLATION.md` to `SERVICE-INSTALLATION.md` for consistency.
- Updated links in `README.md`, `getting-started.md`, and `index.md` to reflect the new file name and improve clarity in navigation.
- Removed the now obsolete `SERVICE-INSTALLATION.md` file, consolidating service installation instructions under the updated naming convention.
2026-02-16 17:11:51 -08:00
agessaman 8298c562fe Refactor MkDocs navigation for improved structure
- Updated the navigation in mkdocs.yml by renaming the "Getting Started" section to "Quick Start" and reorganizing the "Docker" section under a new "Installation" category, which now also includes "Service" installation documentation.
2026-02-16 17:07:38 -08:00
agessaman 1e0840603d Update MkDocs navigation structure
- Reorganized the navigation in mkdocs.yml by moving the Command Reference section up and restoring the FAQ and Upgrade sections.
- Removed the Guides section for a cleaner navigation experience while maintaining essential documentation links.
2026-02-16 17:02:45 -08:00
agessaman 813dcdf9fa Update documentation and configuration for MkDocs
- Added new pages to the documentation navigation, including Docker, Upgrade, and Guides sections.
- Updated mkdocs.yml to include the mkdocs-exclude plugin for better content management.
- Modified pyproject.toml to include mkdocs-exclude as a dependency.
- Adjusted GitHub Actions workflow to install the new dependency.
- Removed outdated link from the index.md documentation page.
2026-02-16 16:58:32 -08:00
Adam Gessaman 2a36cb2c93 Merge pull request #56 from agessaman/dev
Version 0.8
v0.8
2026-02-16 16:48:19 -08:00
Adam Gessaman a38ac56c3f Merge branch 'main' into dev 2026-02-16 16:35:26 -08:00
agessaman 11985ec1c4 Update db_path return type in BotIntegration class to string
- Changed the return type of the `db_path` method in the `BotIntegration` class from a Path object to a string, ensuring consistent data type handling for database paths.
2026-02-16 16:30:44 -08:00
agessaman c3a196e319 Update mesh and realtime templates for clarity
- Shortened the title in the mesh graph visualization from "Mesh Graph Visualization" to "Mesh Graph" for conciseness.
- Removed the subtitle from the real-time monitoring header to streamline the display.
2026-02-16 16:20:41 -08:00
agessaman cd028a2160 Refactor NOAA period name handling in WxCommand and enhance bot configuration retrieval
- Replaced the `abbreviate_noaa` method calls with a new `_noaa_period_display_name` method to improve the display of forecast period names, including handling federal holidays.
- Updated the `BotDataViewer` class to include the bot name in the returned configuration dictionary, ensuring consistent naming across the application.
- Made minor adjustments to HTML templates for better layout and added footer links for project visibility.
2026-02-16 16:05:45 -08:00
agessaman 8f7b46aee3 Refine ordering of config.ini.example 2026-02-16 15:33:33 -08:00
agessaman a2c02e699f Implement automatic creation of config.ini from example file
- Added logic to the `install-service.sh` script to automatically create a `config.ini` file from `config.ini.example` if it does not exist in the installation directory.
- Included warnings for users if the example file is not found, ensuring proper configuration setup before starting the bot.
- Refactored joke command configuration in `core.py` to maintain consistency and clarity in the configuration structure.
2026-02-16 14:59:31 -08:00
agessaman 53b5bdef69 Enhance configuration file reading to support UTF-8 encoding
- Updated the `MeshCoreBot` class to read the configuration file with UTF-8 encoding, ensuring proper parsing of emoji and non-ASCII characters on Windows.
- Applied the same encoding change to the configuration reload logic, maintaining consistency across configuration handling.
2026-02-15 21:43:37 -08:00
Adam Gessaman ea7b92e4f8 Merge pull request #50 from jeroenvermeulen/fix-wx-gws-usage
Respond to only `wx` and `gwx` command with usage.
2026-02-15 21:11:09 -08:00
agessaman 04bd004f36 Improve monitor channel handling by adding support for quoted values
- Introduced `strip_optional_quotes` function to handle monitor channel values with optional surrounding quotes.
- Updated `load_monitor_channels` method in `CommandManager` to utilize the new function, ensuring compatibility with quoted and unquoted channel configurations.
- Modified `generate_samples` function to apply the same logic for consistency.
- Added tests for `strip_optional_quotes` to validate behavior with various input cases.
2026-02-15 21:02:48 -08:00
agessaman 669f02c96e Remove @string mention from help command override example. 2026-02-15 20:53:00 -08:00
Jeroen Vermeulen 9ab8334c44 Respond to only wx and gwx command with usage.
Fixes #49
2026-02-14 23:15:55 +01:00
agessaman 8cf7348321 Enhance command tests with additional assertions and new truncation test
- Added assertions to ensure call arguments are not None in multiple command tests.
- Introduced a new test for the CmdCommand class to verify that long command lists are truncated correctly with a '(N more)' suffix, improving command list readability.
2026-02-13 15:45:29 -08:00
agessaman 098ae7814b fix: feed manager and plugin loader imports; update message scheduler checks
- Removed unnecessary import of the `html` module in `feed_manager.py`.
- Moved the `import inspect` statement to the module level in `plugin_loader.py` for better organization.
- Initialized `last_channel_ops_check_time` and `last_message_queue_check_time` attributes in `scheduler.py` to streamline message scheduling logic.
- Cleaned up redundant checks for attribute existence in the `MessageScheduler` class.
2026-02-13 09:44:44 -08:00