mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
* feat: add timezone support for schedules and dim schedule feature - Fix timezone handling in _check_schedule() to use configured timezone instead of system time (addresses schedule offset issues) - Add dim schedule feature for automatic brightness dimming: - New dim_schedule config section with brightness level and time windows - Smart interaction: dim schedule won't turn display on if it's off - Supports both global and per-day modes like on/off schedule - Add set_brightness() and get_brightness() methods to DisplayManager for runtime brightness control - Add REST API endpoints: GET/POST /api/v3/config/dim-schedule - Add web UI for dim schedule configuration in schedule settings page Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: normalize per-day mode and validate dim_brightness input - Normalize mode string in _check_dim_schedule to handle both "per-day" and "per_day" variants - Add try/except around dim_brightness int conversion to handle invalid input gracefully Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: improve error handling in brightness and dim schedule endpoints - display_manager.py: Add fail-fast input validation, catch specific exceptions (AttributeError, TypeError, ValueError), add [BRIGHTNESS] context tags, include stack traces in error logs - api_v3.py: Catch specific config exceptions (FileNotFoundError, JSONDecodeError, IOError), add [DIM SCHEDULE] context tags for Pi debugging, include stack traces Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Chuck <chuck@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
140 lines
3.7 KiB
JSON
140 lines
3.7 KiB
JSON
{
|
|
"web_display_autostart": true,
|
|
"schedule": {
|
|
"enabled": true,
|
|
"mode": "per-day",
|
|
"start_time": "07:00",
|
|
"end_time": "23:00",
|
|
"days": {
|
|
"monday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"tuesday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"wednesday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"thursday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"friday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"saturday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
},
|
|
"sunday": {
|
|
"enabled": true,
|
|
"start_time": "07:00",
|
|
"end_time": "23:00"
|
|
}
|
|
}
|
|
},
|
|
"dim_schedule": {
|
|
"enabled": false,
|
|
"dim_brightness": 30,
|
|
"mode": "global",
|
|
"start_time": "20:00",
|
|
"end_time": "07:00",
|
|
"days": {
|
|
"monday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"tuesday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"wednesday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"thursday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"friday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"saturday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
},
|
|
"sunday": {
|
|
"enabled": true,
|
|
"start_time": "20:00",
|
|
"end_time": "07:00"
|
|
}
|
|
}
|
|
},
|
|
"timezone": "America/Chicago",
|
|
"location": {
|
|
"city": "Dallas",
|
|
"state": "Texas",
|
|
"country": "US"
|
|
},
|
|
"display": {
|
|
"hardware": {
|
|
"rows": 32,
|
|
"cols": 64,
|
|
"chain_length": 2,
|
|
"parallel": 1,
|
|
"brightness": 90,
|
|
"hardware_mapping": "adafruit-hat",
|
|
"scan_mode": 0,
|
|
"pwm_bits": 9,
|
|
"pwm_dither_bits": 1,
|
|
"pwm_lsb_nanoseconds": 130,
|
|
"disable_hardware_pulsing": false,
|
|
"inverse_colors": false,
|
|
"show_refresh_rate": false,
|
|
"limit_refresh_rate_hz": 100
|
|
},
|
|
"runtime": {
|
|
"gpio_slowdown": 3
|
|
},
|
|
"display_durations": {
|
|
"calendar": 30
|
|
},
|
|
"use_short_date_format": true,
|
|
"vegas_scroll": {
|
|
"enabled": false,
|
|
"scroll_speed": 50,
|
|
"separator_width": 32,
|
|
"plugin_order": [],
|
|
"excluded_plugins": [],
|
|
"target_fps": 125,
|
|
"buffer_ahead": 2
|
|
}
|
|
},
|
|
"plugin_system": {
|
|
"plugins_directory": "plugin-repos",
|
|
"auto_discover": true,
|
|
"auto_load_enabled": true
|
|
},
|
|
"web-ui-info": {
|
|
"enabled": true,
|
|
"display_duration": 10
|
|
}
|
|
}
|