Add WiFi and HDMI power saving features for remote sensors

Implements power saving optimizations to extend battery life on solar-powered remote air quality sensors:

- WiFi Power Saving: Disable WiFi 10 minutes after boot to save ~100-200mA
  - Configurable via web UI checkbox in admin panel
  - WiFi automatically re-enables after reboot for 10-minute configuration window
  - Systemd timer (nebuleair-wifi-powersave.timer) manages automatic disable
  - New wifi/power_save.py script checks database config and disables WiFi via nmcli

- HDMI Disable: Added hdmi_blanking=2 to boot config to save ~20-30mA
  - Automatically configured during installation

- Database: Added wifi_power_saving boolean config (default: disabled)
  - Uses INSERT OR IGNORE for safe updates to existing installations

- UI: Added checkbox control in admin.html for WiFi power saving
  - Includes helpful description of power savings and behavior

- Services: Updated setup_services.sh and update_firmware.sh to manage new timer

Total power savings: ~120-230mA when WiFi power saving enabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
PaulVua
2026-01-13 12:05:21 +01:00
parent 13445d574c
commit 5777b35770
8 changed files with 217 additions and 14 deletions

View File

@@ -41,17 +41,18 @@ config_entries = [
("SARA_R4_network_status", "connected", "str"),
("SARA_R4_neworkID", "20810", "int"),
("WIFI_status", "connected", "str"),
("send_aircarto", "1", "bool"),
("send_aircarto", "0", "bool"),
("send_uSpot", "0", "bool"),
("send_miotiq", "0", "bool"),
("send_miotiq", "1", "bool"),
("npm_5channel", "0", "bool"),
("envea", "0", "bool"),
("windMeter", "0", "bool"),
("BME280", "0", "bool"),
("BME280", "1", "bool"),
("MPPT", "0", "bool"),
("NOISE", "0", "bool"),
("modem_version", "XXX", "str"),
("language", "fr", "str")
("language", "fr", "str"),
("wifi_power_saving", "0", "bool")
]
for key, value, value_type in config_entries: