mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
* docs: rename FONT_MANAGER_USAGE.md to FONT_MANAGER.md Renamed for clearer naming convention. Part of documentation consolidation effort. * docs: consolidate Plugin Store guides (2→1) Merged: - PLUGIN_STORE_USER_GUIDE.md - PLUGIN_STORE_QUICK_REFERENCE.md Into: PLUGIN_STORE_GUIDE.md - Unified writing style to professional technical - Added Quick Reference section at top for easy access - Removed duplicate content - Added cross-references to related documentation - Updated formatting to match style guidelines * docs: create user-focused Web Interface Guide Created WEB_INTERFACE_GUIDE.md consolidating: - V3_INTERFACE_README.md (technical details) - User-facing interface documentation - Focused on end-user tasks and navigation - Removed technical implementation details - Added common tasks section - Included troubleshooting - Professional technical writing style * docs: consolidate WiFi setup guides (4→1) Merged: - WIFI_SETUP.md - OPTIMAL_WIFI_AP_FAILOVER_SETUP.md - AP_MODE_MANUAL_ENABLE.md - WIFI_ETHERNET_AP_MODE_FIX.md (behavior documentation) Into: WIFI_NETWORK_SETUP.md - Comprehensive coverage of WiFi setup and configuration - Clear explanation of AP mode failover and grace period - Configuration scenarios and best practices - Troubleshooting section combining all sources - Professional technical writing style - Added quick reference table for behavior * docs: consolidate troubleshooting guides (4→1) Merged: - TROUBLESHOOTING_QUICK_START.md - WEB_INTERFACE_TROUBLESHOOTING.md - CAPTIVE_PORTAL_TROUBLESHOOTING.md - WEATHER_TROUBLESHOOTING.md Into: TROUBLESHOOTING.md - Organized by issue category (web, WiFi, plugins) - Comprehensive diagnostic commands reference - Quick diagnosis steps at the top - Service file template preserved - Complete diagnostic script included - Professional technical writing style * docs: create consolidated Advanced Features guide Merged: - VEGAS_SCROLL_MODE.md - ON_DEMAND_DISPLAY_QUICK_START.md - ON_DEMAND_DISPLAY_API.md - ON_DEMAND_CACHE_MANAGEMENT.md - BACKGROUND_SERVICE_README.md - PERMISSION_MANAGEMENT_GUIDE.md Into: ADVANCED_FEATURES.md - Comprehensive guide covering all advanced features - Vegas scroll mode with integration examples - On-demand display with API reference - Cache management troubleshooting - Background service documentation - Permission management patterns - Professional technical writing style * docs: create Getting Started guide for first-time users Created GETTING_STARTED.md: - Quick start guide (5 minutes) - Initial configuration walkthrough - Common first-time issues and solutions - Next steps and quick reference - User-friendly tone for beginners - Links to detailed documentation * docs: archive consolidated source files and ephemeral docs Archived files that have been consolidated: - Plugin Store guides (2 files → PLUGIN_STORE_GUIDE.md) - Web Interface guide (V3_INTERFACE_README.md → WEB_INTERFACE_GUIDE.md) - WiFi Setup guides (4 files → WIFI_NETWORK_SETUP.md) - Troubleshooting guides (4 files → TROUBLESHOOTING.md) - Advanced Features (6 files → ADVANCED_FEATURES.md) Archived ephemeral/debug documentation: - DEBUG_WEB_ISSUE.md - BROWSER_ERRORS_EXPLANATION.md - FORM_VALIDATION_FIXES.md - WEB_UI_RELIABILITY_IMPROVEMENTS.md - CAPTIVE_PORTAL_TESTING.md - NEXT_STEPS_COMMANDS.md - STATIC_IMAGE_MULTI_UPLOAD_PLAN.md - RECONNECT_AFTER_CAPTIVE_PORTAL_TESTING.md Archived implementation summaries: - PLUGIN_CONFIG_TABS_SUMMARY.md - PLUGIN_CONFIG_SYSTEM_VERIFICATION.md - PLUGIN_SCHEMA_AUDIT_SUMMARY.md - STARTUP_OPTIMIZATION_SUMMARY.md - PLUGIN_DISPATCH_IMPLEMENTATION.md - NESTED_SCHEMA_IMPLEMENTATION.md - AP_MODE_MANUAL_ENABLE_CHANGES.md - PLUGIN_CONFIG_SYSTEM_EXPLANATION.md Total archived: 27 files Preserves git history while cleaning up main docs directory * docs: rename API_REFERENCE.md to REST_API_REFERENCE.md Renamed for clarity - this is specifically the REST API reference for the web interface, not a general API reference. * docs: update README.md to reflect consolidated documentation structure Updated documentation index: - Reflects new consolidated guides (51 → 16-17 files) - Updated Quick Start sections with new file names - Added consolidation history (January 2026) - Updated file references (API_REFERENCE → REST_API_REFERENCE) - Documented archival of 33 files - Added benefits of consolidation - Updated statistics and highlights - Removed outdated references - Professional writing style maintained throughout * docs: add Vegas scroll mode system architecture documentation Added comprehensive internal architecture section for Vegas mode: - Component overview with diagram - VegasModeCoordinator responsibilities and main loop - StreamManager buffering strategy and content flow - PluginAdapter integration and fallback behavior - RenderPipeline 125 FPS rendering process - Component interaction flows - Thread safety patterns - Performance characteristics Covers: - How the four components work together - Initialization and render loop flows - Config update handling - Frame rate management and optimization - Memory usage and CPU characteristics --------- Co-authored-by: Chuck <chuck@example.com>
187 lines
5.4 KiB
Markdown
187 lines
5.4 KiB
Markdown
# AP Mode Manual Enable - Implementation Summary
|
|
|
|
## Changes Made
|
|
|
|
### 1. Configuration Option Added
|
|
|
|
Added `auto_enable_ap_mode` configuration option to `config/wifi_config.json`:
|
|
- **Default value**: `false` (manual enable only)
|
|
- **Purpose**: Controls whether AP mode automatically enables when WiFi/Ethernet disconnect
|
|
- **Migration**: Existing configs automatically get this field set to `false` if missing
|
|
|
|
### 2. WiFi Manager Updates (`src/wifi_manager.py`)
|
|
|
|
#### Added Configuration Field
|
|
- Default config now includes `"auto_enable_ap_mode": False`
|
|
- Existing configs are automatically migrated to include this field
|
|
|
|
#### Updated `check_and_manage_ap_mode()` Method
|
|
- Now checks `auto_enable_ap_mode` setting before auto-enabling AP mode
|
|
- AP mode only auto-enables if:
|
|
- `auto_enable_ap_mode` is `true` AND
|
|
- WiFi is NOT connected AND
|
|
- Ethernet is NOT connected
|
|
- AP mode still auto-disables when WiFi or Ethernet connects (regardless of setting)
|
|
- Manual AP mode (via web UI) works regardless of this setting
|
|
|
|
### 3. Web Interface API Updates (`web_interface/blueprints/api_v3.py`)
|
|
|
|
#### Updated `/wifi/status` Endpoint
|
|
- Now returns `auto_enable_ap_mode` setting in response
|
|
|
|
#### Added `/wifi/ap/auto-enable` GET Endpoint
|
|
- Returns current `auto_enable_ap_mode` setting
|
|
|
|
#### Added `/wifi/ap/auto-enable` POST Endpoint
|
|
- Allows setting `auto_enable_ap_mode` via API
|
|
- Accepts JSON: `{"auto_enable_ap_mode": true/false}`
|
|
|
|
### 4. Documentation Updates
|
|
|
|
- Updated `docs/WIFI_SETUP.md` with new configuration option
|
|
- Created `docs/AP_MODE_MANUAL_ENABLE.md` with comprehensive guide
|
|
- Created `docs/AP_MODE_MANUAL_ENABLE_CHANGES.md` (this file)
|
|
|
|
## Behavior Changes
|
|
|
|
### Before
|
|
- AP mode automatically enabled when WiFi disconnected (if Ethernet also disconnected)
|
|
- Could cause SSH to become unavailable after installation
|
|
- No way to disable auto-enable behavior
|
|
|
|
### After
|
|
- AP mode **does not** automatically enable by default
|
|
- Must be manually enabled through web UI or API
|
|
- Can optionally enable auto-enable via configuration
|
|
- Prevents unexpected AP mode activation
|
|
|
|
## Migration
|
|
|
|
### Existing Installations
|
|
|
|
1. **Automatic Migration**:
|
|
- When WiFi manager loads config, it automatically adds `auto_enable_ap_mode: false` if missing
|
|
- No manual intervention required
|
|
|
|
2. **To Enable Auto-Enable** (if desired):
|
|
```bash
|
|
# Edit config file
|
|
nano config/wifi_config.json
|
|
# Set "auto_enable_ap_mode": true
|
|
|
|
# Restart WiFi monitor service
|
|
sudo systemctl restart ledmatrix-wifi-monitor
|
|
```
|
|
|
|
### New Installations
|
|
|
|
- Default behavior is manual enable only
|
|
- No changes needed
|
|
|
|
## Testing
|
|
|
|
### Verify Default Behavior
|
|
|
|
```bash
|
|
# Check config
|
|
python3 -c "
|
|
from src.wifi_manager import WiFiManager
|
|
wm = WiFiManager()
|
|
print('Auto-enable:', wm.config.get('auto_enable_ap_mode', False))
|
|
"
|
|
# Should output: Auto-enable: False
|
|
```
|
|
|
|
### Test Manual Enable
|
|
|
|
1. Disconnect WiFi and Ethernet
|
|
2. AP mode should **not** automatically enable
|
|
3. Enable via web UI: WiFi tab → Enable AP Mode
|
|
4. AP mode should activate
|
|
5. Connect WiFi or Ethernet
|
|
6. AP mode should automatically disable
|
|
|
|
### Test Auto-Enable (if enabled)
|
|
|
|
1. Set `auto_enable_ap_mode: true` in config
|
|
2. Restart WiFi monitor service
|
|
3. Disconnect WiFi and Ethernet
|
|
4. AP mode should automatically enable within 30 seconds
|
|
5. Connect WiFi or Ethernet
|
|
6. AP mode should automatically disable
|
|
|
|
## API Usage Examples
|
|
|
|
### Get Auto-Enable Setting
|
|
```bash
|
|
curl http://localhost:5001/api/v3/wifi/ap/auto-enable
|
|
```
|
|
|
|
### Set Auto-Enable to True
|
|
```bash
|
|
curl -X POST http://localhost:5001/api/v3/wifi/ap/auto-enable \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"auto_enable_ap_mode": true}'
|
|
```
|
|
|
|
### Set Auto-Enable to False
|
|
```bash
|
|
curl -X POST http://localhost:5001/api/v3/wifi/ap/auto-enable \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"auto_enable_ap_mode": false}'
|
|
```
|
|
|
|
### Get WiFi Status (includes auto-enable)
|
|
```bash
|
|
curl http://localhost:5001/api/v3/wifi/status
|
|
```
|
|
|
|
## Files Modified
|
|
|
|
1. `src/wifi_manager.py`
|
|
- Added `auto_enable_ap_mode` to default config
|
|
- Added migration logic for existing configs
|
|
- Updated `check_and_manage_ap_mode()` to respect setting
|
|
|
|
2. `web_interface/blueprints/api_v3.py`
|
|
- Updated `/wifi/status` to include auto-enable setting
|
|
- Added `/wifi/ap/auto-enable` GET endpoint
|
|
- Added `/wifi/ap/auto-enable` POST endpoint
|
|
|
|
3. `docs/WIFI_SETUP.md`
|
|
- Updated documentation with new configuration option
|
|
- Updated WiFi monitor daemon description
|
|
|
|
4. `docs/AP_MODE_MANUAL_ENABLE.md` (new)
|
|
- Comprehensive guide for manual enable feature
|
|
|
|
## Benefits
|
|
|
|
1. **Prevents SSH Loss**: AP mode won't activate automatically after installation
|
|
2. **User Control**: Users can choose whether to enable auto-enable
|
|
3. **Ethernet-Friendly**: Works well with hardwired connections
|
|
4. **Backward Compatible**: Existing installations automatically migrate
|
|
5. **Flexible**: Can still enable auto-enable if desired
|
|
|
|
## Deployment
|
|
|
|
### On Existing Installations
|
|
|
|
1. **No action required** - automatic migration on next WiFi manager initialization
|
|
2. **Restart WiFi monitor** (optional, to apply immediately):
|
|
```bash
|
|
sudo systemctl restart ledmatrix-wifi-monitor
|
|
```
|
|
|
|
### On New Installations
|
|
|
|
- Default behavior is already manual enable
|
|
- No additional configuration needed
|
|
|
|
## Related Issues Fixed
|
|
|
|
- SSH becoming unavailable after installation
|
|
- AP mode activating when Ethernet is connected
|
|
- Unexpected AP mode activation on stable network connections
|
|
|