Commit Graph

33 Commits

Author SHA1 Message Date
agessaman dec697b087 Add configurable transmission delay to prevent message collisions 2025-09-07 16:17:09 -07:00
agessaman 845d5fb4b0 Add total count context to 'prefix free' command 2025-09-07 16:08:20 -07:00
agessaman 1ad3472d54 Fix repeater command to only work in DMs and at beginning of messages 2025-09-07 15:55:13 -07:00
agessaman 7b6ddc97fc Update invalid prefix format message to clarify usage example 2025-09-07 15:49:21 -07:00
agessaman d3ce007eed Fix @ command to only match at beginning of messages 2025-09-07 15:48:52 -07:00
agessaman 69bac5585f Restrict prefix command to beginning of messages only 2025-09-07 15:44:25 -07:00
agessaman 41205fb2f4 added prefix command to check usage of prefixes and list free prefixes 2025-09-07 15:26:01 -07:00
agessaman cb6a319b1b Add random selection to 'prefix free' command 2025-09-07 15:18:18 -07:00
agessaman 226fa8ee76 Fix 'prefix free' command accuracy 2025-09-07 15:16:46 -07:00
agessaman 5e0c937df2 Add 'prefix free' command to list available prefixes 2025-09-07 15:14:35 -07:00
agessaman 39c7aedc05 Make API source dynamic based on configured URL 2025-09-07 15:10:55 -07:00
agessaman 20d59c2452 Improve prefix command response formatting 2025-09-07 15:07:53 -07:00
agessaman f4bddd1ec4 Add database fallback to prefix command
- Prefix command now falls back to local SQLite database when API is unavailable
- Queries repeater_contacts table for repeaters matching prefix pattern
- Uses public_key LIKE 'prefix%' to find repeaters by first two characters
- Only returns active repeaters (is_active = 1)
- Adds device type indicators: (Repeater) or (Room Server)
- Response indicates data source: 'API cache' vs 'local database (offline mode)'
- Updated help text to mention database fallback capability
- Tested with sample data: correctly finds repeaters by prefix
- Provides offline functionality when API is down or network unavailable
- Maintains API-first approach with intelligent fallback
2025-09-07 15:01:10 -07:00
agessaman d695d0177a added prefix command that accesses MeshExplorer with configurable endpoint 2025-09-07 14:57:31 -07:00
agessaman 9cf17e9145 Fix scheduled messages and add debugging 2025-09-07 10:49:12 -07:00
agessaman ef02529a4b make @ command work in public channels 2025-09-07 10:45:43 -07:00
agessaman 5193272b0d Fix @ command to work in public channels 2025-09-07 10:45:12 -07:00
agessaman 40326409b6 Improve ping keyword matching with precise word boundaries 2025-09-06 18:52:21 -07:00
agessaman b17016087b Add sender name to routing info logs 2025-09-06 18:38:38 -07:00
agessaman 1846044e39 Add timezone support for bot operations
- Add timezone configuration to config.ini and config.ini.example
- Update hello_command.py to use configured timezone for time-appropriate greetings
- Add pytz dependency to requirements.txt
- Support standard timezone names (America/New_York, Europe/London, etc.)
- Fallback to system timezone if configured timezone is invalid or empty
- Update core.py create_default_config to include timezone setting
- Time-appropriate greetings now work correctly across different timezones
2025-09-06 13:02:30 -07:00
agessaman 8c8c50889d Fix scheduler async/await runtime warning
- Convert send_scheduled_message to synchronous wrapper for schedule library
- Add _send_scheduled_message_async for actual async implementation
- Handle event loop creation in scheduler thread
- Fixes RuntimeWarning: coroutine was never awaited
2025-09-06 12:01:47 -07:00
agessaman 5753e0999d Update create_default_config to match config.ini.example structure 2025-09-06 11:55:02 -07:00
agessaman de92fdfdd2 Reorganize API keys under [External_Data] section
- Move n2yo_api_key and airnow_api_key from [Solar_Config] to [External_Data]
- Update code references to use [External_Data] section instead of [Solar_Config]
- Update config.ini.example to match the new organization
- Improve error message to specify the correct config section
- This provides better organization with all external API keys in one place
2025-09-06 11:37:45 -07:00
agessaman 9b74a39872 Remove __pycache__ files from git tracking
- Remove all Python bytecode cache files from git tracking
- These files are automatically generated and should not be committed
- __pycache__/ is already properly excluded in .gitignore
- This cleans up the repository and follows Python best practices
2025-09-06 11:34:49 -07:00
agessaman cf887938ac Clean up channel information logging
- Suppress raw JSON output from meshcore-cli commands during channel fetching
- Make channel logging more concise - only show channel names instead of full data structures
- Redirect stdout temporarily to /dev/null during next_cmd calls to prevent verbose output
- This eliminates the duplicate channel information that was being printed twice
2025-09-06 11:33:05 -07:00
agessaman 04279c7322 Fix remaining errors and clean up print statements
- Remove problematic debug and log command attempts that cause 'Unknown command' errors
- Replace remaining print statement in meshcore_protocol.py with proper logging
- Add explanatory comment about debug mode availability
- This eliminates the ERROR messages seen in the logs during startup
2025-09-06 11:31:02 -07:00
agessaman 2487378233 Fix startup flood advert using meshcore.commands.send_advert()
- Replace next_cmd approach with direct meshcore.commands.send_advert(flood=True)
- Add 2-second delay before sending startup advert to ensure connection is established
- Simplify error handling since send_advert() is more reliable
- Apply same fix to manual advert command for consistency
- This should resolve the issue where flood adverts weren't being sent on startup
2025-09-06 11:29:02 -07:00
agessaman 2206265e10 Update modules with latest development changes
- Enhanced command processing with exclamation mark handling
- Improved message handling and RF data correlation
- Updated repeater management functionality
- Enhanced command implementations across all modules
- Updated database manager and core functionality
- All changes maintain backward compatibility
2025-09-06 11:22:58 -07:00
agessaman e21b26c1cb Replace print statements with proper logging
- Convert debug print statements in meshcore_protocol.py to proper logging
- Add comment explaining print statement in core.py (used during initialization)
- All debug/error messages now use logger instead of print
- Maintains existing logging infrastructure and patterns
- Improves production readiness and debugging capabilities
2025-09-06 11:22:00 -07:00
agessaman 8beede60b1 added aqi command 2025-09-05 22:12:51 -07:00
agessaman a03ee89fb4 Implement repeater manager and enhance logging configuration in MeshCore Bot. Added repeater database path to config, improved command handling for weather commands, and refined logging setup for better output control. Updated command aliases for consistency and enhanced error handling in geocoding. Adjusted weather command to support city and state formats. 2025-09-05 20:32:57 -07:00
agessaman 04b3542411 Enhance configuration and command structure for MeshCore Bot. Added RF data correlation settings in config.ini, implemented a BotTxRateLimiter for transmission control, and refactored command handling to support plugins. Removed obsolete scripts and improved command metadata for better usability. 2025-09-04 18:48:59 -07:00
agessaman 9fa8b02be6 Initial commit: MeshCore Bot project 2025-09-04 15:33:51 -07:00