diff --git a/README.md b/README.md index f9b527b..4398f71 100644 --- a/README.md +++ b/README.md @@ -139,18 +139,21 @@ python meshcore_bot.py The bot responds to these commands: **Basic Commands:** -- `test` - Test message response +- `test` or `t` - Test message response (can include optional phrase: `test `) - `ping` - Ping/pong response -- `help` - Show available commands -- `hello` - Greeting response -- `cmd` - List available commands +- `help` - Show available commands (use `help ` for command details) +- `hello` - Greeting response (also responds to: hi, hey, howdy, greetings, etc.) +- `cmd` - List available commands in compact format **Information Commands:** -- `wx ` - Weather information -- `aqi ` - Air quality index +- `channels` - List hashtag channels (use `channels` for general, `channels list` for all categories, `channels ` for specific categories, `channels #channel` for specific channel info) +- `wx ` - Weather information for US zip code (also: `weather`, `wxa`, `wxalert`) +- `gwx ` - Global weather for any location worldwide (also: `globalweather`, `gwxa`) +- `aqi ` - Air quality index (usage: `aqi seattle`, `aqi greenwood`, `aqi vancouver canada`, `aqi 47.6,-122.3`, or `aqi help`) - `sun` - Sunrise/sunset times - `moon` - Moon phase and times -- `solar` - Solar conditions +- `solar` - Solar conditions and HF band status +- `solarforecast` or `sf` - Solar panel production forecast (usage: `sf [panel_size] [azimuth, 0=south] [angle]`) - `hfcond` - HF band conditions - `satpass ` - Satellite pass information (default: radio passes, all passes above horizon) - `satpass visual` - Visual passes only (must be visually observable) @@ -161,21 +164,40 @@ The bot responds to these commands: - `roll` - Roll random number (1-100 by default, or specify like `roll 50`) **Entertainment Commands:** -- `joke` - Get a random joke +- `joke` - Get a random joke (use `joke [category]` for specific category) - `dadjoke` - Get a dad joke from icanhazdadjoke.com +- `hacker` - Responds to Linux commands (`sudo`, `ps aux`, `grep`, `ls -l`, etc.) with supervillain mainframe errors **Sports Commands:** - `sports` - Get scores for default teams - `sports ` - Get scores for specific team - `sports ` - Get scores for league (nfl, mlb, nba, etc.) -**MeshCore Network Commands:** -- `channels` - List hashtag channels -- `path` - Decode message routing path -- `prefix ` - Look up repeaters by prefix -- `repeater` - Manage repeater contacts and scan for new ones (DM only) -- `stats` - Show bot usage statistics -- `advert` - Send network advert (DM only) +**MeshCore Utility Commands:** +- `path` or `decode` or `route` - Decode message routing path +- `prefix ` - Look up repeaters by two-character prefix (e.g., `prefix 1A`) + - `prefix refresh` - Refresh prefix cache + - `prefix free` or `prefix available` - Show available prefixes + - `prefix all` - Include all repeaters (not just active) +- `stats` - Show bot usage statistics for past 24 hours + - `stats messages` - Message statistics + - `stats channels` - Channel statistics + - `stats paths` - Path statistics +- `multitest` or `mt` - Listens for 6 seconds and collects all unique paths from incoming messages + +**Management Commands (DM only):** +- `repeater` or `repeaters` or `rp` - Manage repeater contacts (DM only, requires ACL permissions) + - `repeater scan` - Scan and catalog new repeaters + - `repeater list` - List repeater contacts (use `--all` to show purged ones) + - `repeater purge ` - Purge repeaters older than specified days + - `repeater purge ` - Purge specific repeater by name + - `repeater purge all` - Purge all repeaters + - `repeater restore ` - Restore a previously purged repeater + - `repeater stats` - Show repeater management statistics + - `repeater status` - Show contact list status and limits + - `repeater manage` - Auto-manage contact list (use `--dry-run` to preview) + - See `help repeater` for full list of subcommands +- `advert` - Send network flood advert (DM only, 1hr cooldown) ## Message Response Templates @@ -192,7 +214,7 @@ Example: [Keywords] test = "Message received from {sender} | {connection_info}" ping = "Pong!" -help = "Bot Help: test, ping, help, hello, cmd, wx, aqi, sun, moon, solar, hfcond, satpass, dice, roll, joke, dadjoke, sports, channels, path, prefix, repeater, stats" +help = "Bot Help: test, ping, help, hello, cmd, wx, gwx, aqi, sun, moon, solar, solarforecast, hfcond, satpass, dice, roll, joke, dadjoke, sports, channels, path, prefix, repeater, stats, multitest, webviewer" ``` ## Hardware Setup diff --git a/modules/commands/sports_command.py b/modules/commands/sports_command.py index c86ea8d..aae61d6 100644 --- a/modules/commands/sports_command.py +++ b/modules/commands/sports_command.py @@ -3,6 +3,20 @@ Sports command for the MeshCore Bot Provides sports scores and schedules using ESPN API API description via https://github.com/zuplo/espn-openapi/ + +Team ID Stability: +ESPN team IDs are generally stable but can change in certain circumstances: +- Team relocation or renaming +- Expansion teams (new teams added to leagues) +- ESPN data system updates + +If a team returns "No games found", verify the team_id using: + python3 test_scripts/find_espn_team_id.py + +Team IDs should be periodically verified, especially after: +- League expansion announcements +- Team relocations or rebranding +- When users report "no games found" for known active teams """ import re @@ -71,6 +85,8 @@ class SportsCommand(BaseCommand): } # Team mappings for common searches + # NOTE: Team IDs can change over time (see module docstring). + # Use test_scripts/find_espn_team_id.py to verify/update team IDs. TEAM_MAPPINGS = { # NFL Teams 'seahawks': {'sport': 'football', 'league': 'nfl', 'team_id': '26'}, @@ -294,8 +310,8 @@ class SportsCommand(BaseCommand): 'washington mystics': {'sport': 'basketball', 'league': 'wnba', 'team_id': '16'}, # NHL Teams (limited data available from API) - 'kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '58'}, - 'seattle kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '58'}, + 'kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '124292'}, + 'seattle kraken': {'sport': 'hockey', 'league': 'nhl', 'team_id': '124292'}, 'blues': {'sport': 'hockey', 'league': 'nhl', 'team_id': '19'}, 'stars': {'sport': 'hockey', 'league': 'nhl', 'team_id': '9'},