Files
HBlink4/run_dashboard.py
T
cort 80d7392411 Add user routing cache with Last Heard dashboard
Features:
- User cache tracks radio IDs and last heard repeater for routing optimization
- 10-minute timeout (configurable via user_cache.timeout in config)
- Automatic cleanup every 60s to prevent memory growth
- Dashboard Last Heard display (top 10 users)
- View Full Cache modal showing up to 50 users
- Only displays talker alias when available (shows '-' otherwise)
- Periodic broadcast to dashboard every 10s

Logging improvements:
- Commented out per-packet validation debug logs
- Reduced dashboard logging (disabled access logs, WebSocket logs to DEBUG)
- All high-frequency debug logs marked with 'Per-packet logging' for easy re-enabling

Tests:
- Comprehensive test suite for user cache functionality
- All tests passing
2025-10-02 19:42:25 -05:00

32 lines
718 B
Python
Executable File

#!/usr/bin/env python3
"""
Dashboard launcher for HBlink4
Starts the FastAPI web dashboard server
"""
import sys
import uvicorn
if __name__ == '__main__':
# Default host and port
host = '0.0.0.0' # Listen on all interfaces
port = 8080
# Allow override from command line
if len(sys.argv) > 1:
host = sys.argv[1]
if len(sys.argv) > 2:
port = int(sys.argv[2])
print(f"Starting HBlink4 Dashboard on http://{host}:{port}")
print("Press CTRL+C to stop")
print()
uvicorn.run(
"dashboard.server:app",
host=host,
port=port,
log_level="info",
access_log=False # Disable access logging to reduce log clutter
)