Commit Graph

34 Commits

Author SHA1 Message Date
PaulVua
8291475e36 add cpu power mode 2026-01-15 14:13:41 +01:00
PaulVua
5777b35770 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>
2026-01-13 12:05:21 +01:00
PaulVua
857d590b8f Order database table display by insertion order (ROWID) instead of timestamp
Changed the data retrieval query to use ROWID DESC instead of timestamp DESC, ensuring that the most recently inserted data appears first regardless of timestamp field values. This fixes the issue where entries with "not connected" or invalid timestamps would appear in wrong order.

Benefits:
- Most recent database entries always shown at top
- Works correctly even when timestamp is null, "not connected", or incorrect
- Based on actual insertion order rather than timestamp field

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 14:38:22 +01:00
PaulVua
141dd68716 Add database cleanup feature to empty all sensor tables
Added a "Danger Zone" section on the database page that allows users to empty all sensor data tables while preserving configuration and timestamp tables. The feature includes:

- New Python script (sqlite/empty_sensor_tables.py) to safely empty sensor tables
- Backend endpoint in launcher.php (empty_sensor_tables)
- Frontend UI with red warning card and confirmation dialog
- Detailed feedback showing deleted record counts per table
- i18n support for French and English

Tables emptied: data_NPM, data_NPM_5channels, data_BME280, data_envea, data_WIND, data_MPPT, data_NOISE, modem_status
Tables preserved: timestamp_table, config_table, envea_sondes_table, config_scripts_table

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 14:33:21 +01:00
PaulVua
163d60bf34 Implement lightweight offline i18n system with French/English support
**Core System:**
- Add i18n.js translation library with data-attribute support
- Create translation files (fr.json, en.json) with offline support
- Store language preference in SQLite config_table
- Add backend endpoints for get/set language

**UI Features:**
- Add language switcher dropdown to topbar (🇫🇷 FR / 🇬🇧 EN)
- Auto-sync language selection across all pages
- Support for static HTML and dynamically created elements

**Implementation:**
- Migrate sensors.html as working example
- Add data-i18n attributes to all UI elements
- Support for buttons, inputs, and dynamic content
- Comprehensive README documentation in html/lang/

**Technical Details:**
- Works completely offline (local JSON files)
- No external dependencies
- Database-backed user preference
- Event-based language change notifications
- Automatic translation on page load

Next steps: Gradually migrate other pages (admin, wifi, index, etc.)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 18:10:06 +01:00
AirLab
6069ab04cf update 2025-10-07 15:03:11 +02:00
root
74fc3baece update 2025-07-21 11:11:09 +01:00
Your Name
381cf85336 update 2025-05-27 16:42:53 +02:00
root
caf5488b06 update 2025-05-27 12:09:34 +02:00
Your Name
6d997ff550 update_firmware.sh 2025-05-26 09:51:31 +02:00
Your Name
aa71e359bb update 2025-05-26 09:48:55 +02:00
Your Name
122763a4e5 update 2025-05-23 17:43:45 +02:00
Your Name
c6a8b02c38 update 2025-05-23 17:22:37 +02:00
Your Name
020594e065 updates 2025-05-23 15:09:22 +02:00
PaulVua
5a0f1c0745 updates 2025-05-23 14:30:18 +02:00
Your Name
a8350332ac update 2025-04-07 11:47:21 +02:00
Your Name
970a36598c update 2025-03-26 10:30:24 +01:00
Your Name
d5302f78ba udpate 2025-03-20 17:45:47 +01:00
Your Name
d07314262e update 2025-03-18 16:24:22 +01:00
PaulVua
ec3e81e99e update 2025-03-17 11:00:55 +01:00
Your Name
1037207df3 update 2025-03-13 11:39:40 +01:00
Your Name
0549471669 update 2025-02-25 15:25:21 +01:00
Your Name
accfd3e371 update 2025-02-20 13:13:25 +01:00
PaulVua
c4fb7aed72 update 2025-02-20 09:41:56 +01:00
Your Name
8fb1882864 update 2025-02-18 13:46:55 +01:00
PaulVua
62c729b63b update 2025-02-10 17:25:34 +01:00
PaulVua
e609c38ca0 update 2025-02-10 15:41:52 +01:00
PaulVua
1cb1b05b51 update 2025-02-10 10:06:16 +01:00
PaulVua
d98eb48535 update 2025-02-05 17:37:27 +01:00
PaulVua
46303b9c19 update 2025-02-05 16:54:59 +01:00
PaulVua
49be391eb3 database 2025-02-05 15:09:15 +01:00
PaulVua
268a0586b8 update 2025-02-05 10:51:20 +01:00
Your Name
456db5da98 update 2025-01-31 13:38:26 +01:00
PaulVua
d732f3ad2d update 2025-01-30 17:24:47 +01:00