Files
meshcore-bot/modules/commands/hfcond_command.py
T
agessaman 7bb51f219b Web Viewer Integration
- Add Flask + Flask-SocketIO web viewer with dashboard (modules/web_viewer/app.py and related)
- Add web viewer templates: index, realtime, tracking (contacts), cache, purging, stats (modules/web_viewer/templates/)
- Add integration hooks and utility functions for web viewer (modules/web_viewer/integration.py, modules/utils.py)
- Add command to launch web viewer from bot CLI (modules/commands/webviewer_command.py)
- Update .gitignore: ignore db/log files, test scripts, and web viewer artifacts
- Add restart_viewer.sh helper script for standalone web viewer restart/troubleshooting
- Add guidance and documentation for modern viewer in WEB_VIEWER.md and docs/
- Various code structure and import improvements to core bot and command modules to support integration
- Add ACL support for sensitive commands
- Example config updates

Benefits:
- Decouples monitoring/UI from bot core process
- Enables real-time browser dashboard and unified contact/repeater tracking
- Easier integration, dev, and troubleshooting
2025-10-21 21:57:00 -07:00

35 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""
HF Conditions Command - Provides HF band conditions for ham radio
"""
from .base_command import BaseCommand
from ..solar_conditions import hf_band_conditions
from ..models import MeshMessage
class HfcondCommand(BaseCommand):
"""Command to get HF band conditions"""
def __init__(self, bot):
super().__init__(bot)
self.keywords = ['hfcond']
async def execute(self, message: MeshMessage) -> bool:
"""Execute the hfcond command"""
try:
# Get HF band conditions
hf_info = hf_band_conditions()
# Send response using unified method
response = f"📡 HF Band Conditions:\n{hf_info}"
return await self.send_response(message, response)
except Exception as e:
error_msg = f"Error getting HF conditions: {e}"
return await self.send_response(message, error_msg)
def get_help_text(self):
"""Get help text for this command"""
return "Get HF band conditions for ham radio"