Commit Graph

430 Commits

Author SHA1 Message Date
SpudGunMan e8063fcf3f Update system.py 2025-10-09 17:05:01 -07:00
SpudGunMan 169f9b27a5 Update system.py 2025-10-09 17:03:39 -07:00
SpudGunMan 4ceb23bcff Update system.py 2025-10-09 17:02:14 -07:00
Kelly cb55aba498 Merge pull request #203 from SpudGunMan/copilot/add-local-wiki-search-functionality
Add Kiwix local wiki server support for offline Wikipedia searches
2025-10-08 20:38:17 -07:00
SpudGunMan 413f2a24d9 Kiwix in wiki
@NomDeTom its finally done
2025-10-08 20:29:52 -07:00
SpudGunMan c75782d559 Update system.py 2025-10-08 20:03:05 -07:00
SpudGunMan d38314a21c Update system.py 2025-10-08 19:31:30 -07:00
SpudGunMan 65dfe90edc Update system.py 2025-10-08 19:24:14 -07:00
SpudGunMan 3ce24fb7c9 Update system.py 2025-10-08 12:48:26 -07:00
SpudGunMan 8765e5a871 🥒
ahh pickles
2025-10-08 12:45:37 -07:00
SpudGunMan b4f0421423 Update system.py 2025-10-08 12:37:52 -07:00
SpudGunMan 2b8906ae55 colon
KFC🍗
2025-10-08 11:11:14 -07:00
SpudGunMan 1f8bf5a700 bytes&bits 2025-10-08 11:01:21 -07:00
copilot-swe-agent[bot] c74e4f99b2 Add mesh leaderboard feature to track extreme metrics
Co-authored-by: SpudGunMan <12676665+SpudGunMan@users.noreply.github.com>
2025-10-08 16:50:46 +00:00
copilot-swe-agent[bot] 1e4e5e6627 Add documentation and fix deprecated BeautifulSoup method
Co-authored-by: SpudGunMan <12676665+SpudGunMan@users.noreply.github.com>
2025-10-08 15:05:09 +00:00
copilot-swe-agent[bot] c97004b410 Add Kiwix local wiki server support with configuration options
Co-authored-by: SpudGunMan <12676665+SpudGunMan@users.noreply.github.com>
2025-10-08 15:00:44 +00:00
SpudGunMan 6c078b4d17 Survey Says!
is this cool?
2025-10-07 22:39:08 -07:00
SpudGunMan 48a57e875f QuizMaster
let me know if this is cool
2025-10-07 17:48:22 -07:00
SpudGunMan 6c27b5d5de xoxo
enhance
2025-10-06 18:03:22 -07:00
SpudGunMan a31fa90942 Update system.py 2025-10-06 14:57:40 -07:00
SpudGunMan a9da8336cc enhance 2025-10-06 14:40:08 -07:00
Kelly 42e07d44e6 Merge pull request #198 from martinbogo/feature/tictactoe-game
Feature/tictactoe game
2025-10-06 14:11:23 -07:00
SpudGunMan ae1a3040b5 patches
dont need no stinking patches. thanks again.
2025-10-06 12:54:41 -07:00
Martin Bogomolni 84b6b48d60 feat: Add tic-tac-toe game with compact messaging
🎮 New Tic-Tac-Toe Game Features:
- Compact 3x3 board display using ASCII art
- Smart AI opponent with win/block/random strategy
- All messages under 200-character meshtastic limit (tested: 10-50 chars)
- Player vs Bot gameplay with X (player) vs O (bot)
- Win detection for rows, columns, and diagonals
- Tie game detection when board is full
- Game statistics tracking (games played, won)

🔧 Integration Features:
- Follows established game patterns from hangman/hamtest
- Added to restrictedCommands (DM-only like other games)
- Integrated with game tracker system for memory cleanup
- Added configuration option in config.template
- Automatic cleanup of stale game sessions

🎯 Game Mechanics:
- Players pick positions 1-9 corresponding to board layout
- Simple input parsing (extracts first digit from message)
- Graceful error handling for invalid moves
- 'end' command to quit game
- Automatic game cleanup on completion

📊 Message Examples:
- New game: 39 chars
- Game moves: 50 chars
- Win/lose: 40 chars
- Invalid move: 23 chars
- All well under 200-char limit

Tested: Complete game scenarios, AI behavior, message lengths
Follows: Existing game implementation patterns and memory management
2025-10-06 00:08:56 -07:00
Martin Bogomolni 9f3446b605 feat: Implement comprehensive memory management and stability improvements
🔧 Memory Management Enhancements:
- Add memory cleanup constants (MAX_CMD_HISTORY=1000, MAX_SEEN_NODES=500, MAX_MSG_HISTORY=100)
- Implement cleanup_memory() function to prevent unbounded list growth
- Add periodic cleanup every hour via watchdog process
- Clean up stale game tracker entries automatically
- Limit cmdHistory and msg_history sizes to prevent memory bloat

🚀 Async Task Management Improvements:
- Fix async task management in both mesh_bot.py and pong_bot.py
- Implement proper task cleanup and cancellation on shutdown
- Add task names for better debugging and monitoring
- Use asyncio.gather() with return_exceptions=True for better error handling
- Prevent task hanging and resource leaks

🛡️ Enhanced Resource Management:
- Improve exit_handler() with proper interface cleanup
- Add atexit.register() for automatic graceful shutdown
- Ensure all meshtastic interfaces are properly closed
- Save persistent data (BBS, email, SMS, game scores) on exit
- Perform final memory cleanup during shutdown

🔍 Better Exception Handling:
- Replace bare except: blocks with specific exception handling
- Add proper error logging throughout the codebase
- Improve BBS database operations with better error recovery
- Add try/catch blocks for file operations and imports

📈 System Stability Improvements:
- Prevent memory leaks from growing lists and dictionaries
- Add automatic cleanup of stale player tracking data
- Improve error recovery in watchdog and async loops
- Better handling of interface connection failures

These changes address critical memory management issues that could cause
the bot to consume increasing memory over time, eventually leading to
system instability. The improvements ensure long-term reliability and
better resource utilization.

Fixes: Memory leaks, async task hanging, resource cleanup issues
Improves: System stability, error handling, resource management
Tested: Code analysis and review completed
2025-10-05 23:45:40 -07:00
SpudGunMan 10add3147d Update system.py 2025-10-05 23:10:23 -07:00
SpudGunMan 4e074a309f Update system.py 2025-10-05 23:05:55 -07:00
SpudGunMan f394f58b9f paxCounter 2025-10-05 22:30:03 -07:00
SpudGunMan 5c54ce0b70 better waypoint data 2025-10-05 21:50:56 -07:00
SpudGunMan b4684f49ff Update system.py 2025-10-05 21:38:19 -07:00
SpudGunMan c6c1e9f637 refactor more consumeMetadata 2025-10-05 21:13:39 -07:00
SpudGunMan 0578c0b233 more enhancing metadata 2025-10-05 19:00:34 -07:00
SpudGunMan 98ccf8708f enhanceTelemetry
logging and handlers for telemetry
2025-10-05 17:47:19 -07:00
SpudGunMan 1a49a81cf5 load_bbsdb with 'api'
allows for ssh file synch?
2025-10-04 12:54:20 -07:00
SpudGunMan c51a4584ae enhance bbsAPI
switch for diskIO
2025-10-03 19:06:14 -07:00
SpudGunMan 13ee6d4fd6 enhance bbsDM
enable a new 'API' to inject into the pkl file for DM's also see https://github.com/SpudGunMan/meshing-around/commit/2d44faac98bb977d9b3b9f840ca4dfbec71af3dc
2025-10-03 19:02:15 -07:00
SpudGunMan c23564d8b5 Update system.py 2025-10-02 19:37:57 -07:00
SpudGunMan 2e8206d4ec x:ShellCommands
this x: is a direct shell access from DM, to enable it needs the enable_runShellCmd, allowXcmd, xcmdChannel set. Make sure your secure.
2025-10-02 18:58:27 -07:00
SpudGunMan 02322cdf91 cleanup
fixes per https://github.com/SpudGunMan/meshing-around/issues/192
2025-10-02 04:51:40 -07:00
SpudGunMan f9ab6a79d3 echo
echo command will just echo, off by default its handy for things like making a demo or node speak
2025-09-28 15:04:56 -07:00
SpudGunMan 47e0276f0c howtall
returns height of something you give a shadow by using sun angle
2025-09-26 19:23:12 -07:00
SpudGunMan aa051abbd4 better Logic for handler 2025-09-26 15:54:51 -07:00
SpudGunMan 8ba0c6f14c Update system.py 2025-09-26 15:47:51 -07:00
SpudGunMan adb6fa3b5a Update system.py 2025-09-26 15:36:49 -07:00
SpudGunMan a9254c9c79 addFav
Helper Script to Add Favorite to the bot node for admin and other use
2025-09-26 15:32:24 -07:00
SpudGunMan 99acaf28a1 Update system.py 2025-09-24 15:14:17 -07:00
SpudGunMan d9ab1b88c1 Update system.py 2025-09-24 15:10:26 -07:00
SpudGunMan ea47bf9329 bugfix parser
thanks again Iris!
2025-09-19 09:32:53 -07:00
Kelly a39f588f9f Merge pull request #188 from SpudGunMan/lab
Noisy Telemetry
lost work on location data
2025-09-17 11:52:50 -07:00
SpudGunMan 4e91801cb9 Update system.py
reset alerts
2025-09-17 10:55:30 -07:00