mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-05-01 21:13:01 +00:00
The previous commit introduced _check_internet_connectivity() into check_and_manage_ap_mode(), which shared the same _disconnected_checks counter that triggers AP enable. This created a false-positive risk: 90 seconds of packet loss on working WiFi would enable AP mode and kick off the connection. Fix: restore nmcli association state as the sole AP-enable trigger (original, safe behaviour). The internet connectivity check is now used only in the daemon watchdog for the NM-restart escalation — matching how adsb-feeder-image actually structures the two concerns (initial setup detection vs. ongoing monitoring). Also clarify daemon comment: the connectivity check runs once per cycle in the watchdog block, not inside check_and_manage_ap_mode, so there is no double-call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Utility Scripts
This directory contains utility scripts for maintenance and system operations.
Scripts
clear_cache.py- Clears LEDMatrix cache data (specific keys or all cache)start_web_conditionally.py- Conditionally starts the web interface based on config settingswifi_monitor_daemon.py- Background daemon that monitors WiFi/Ethernet connection and manages access point modecleanup_venv.sh- Cleans up Python virtual environment filesclear_python_cache.sh- Clears Python cache files (pycache, *.pyc, etc.)
Usage
Clear Cache
python3 scripts/utils/clear_cache.py --list # List cache keys
python3 scripts/utils/clear_cache.py --clear-all # Clear all cache
python3 scripts/utils/clear_cache.py --clear <key> # Clear specific key
Start Web Interface Conditionally
This script is typically called by the systemd service (ledmatrix-web.service) and checks the web_display_autostart setting in config/config.json before starting the web interface.
WiFi Monitor Daemon
This daemon is typically run as a systemd service (ledmatrix-wifi-monitor.service) and automatically manages WiFi access point mode based on network connectivity.