Initial control project import
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# Control
|
||||
|
||||
PHP based control panel for fan control, system monitoring, WiFi control, WakeLock, and Web Push notifications.
|
||||
|
||||
## Main Features
|
||||
|
||||
- Authenticated dashboard for fan, sensor, notice, WiFi, WakeLock, and Push subscription status.
|
||||
- Background collection and policy application for fan state.
|
||||
- WebSocket status updates with HTTP fallback.
|
||||
- Web Push subscription registration, recovery, and notice delivery.
|
||||
|
||||
## Main APIs
|
||||
|
||||
- `public/api.php?action=status`
|
||||
- `public/api.php?action=collect`
|
||||
- `public/api.php?action=fan`
|
||||
- `public/api.php?action=wifi`
|
||||
- `public/api.php?action=push_devices`
|
||||
|
||||
## Structure
|
||||
|
||||
- `public/index.php`: management UI.
|
||||
- `public/api.php`: status and control API.
|
||||
- `config/config.php`: DB, auth, CSRF, push, and shell helpers.
|
||||
- `config/vapid.php`: VAPID bridge loaded from external secret config.
|
||||
- `apply_policy.php`: CLI/cron fan policy application.
|
||||
- `bin/control_ws.php`: WebSocket server.
|
||||
|
||||
## Secrets
|
||||
|
||||
Runtime secrets are loaded from `/home/seo/secret/control.php`. Do not commit that file.
|
||||
|
||||
Expected values include the app password, DB settings, and VAPID keys.
|
||||
|
||||
## Operations
|
||||
|
||||
- Keep sensor collection cadence aligned with DB growth.
|
||||
- Confirm fan sysfs paths after hardware or OS changes.
|
||||
- Keep VAPID keys and app password outside the repository.
|
||||
|
||||
Reference in New Issue
Block a user