Meme modele que NPM: ecriture en base avec valeurs a 0 et noise_status=0xFF
si capteur deconnecte, flag ERR_NOISE (bit 5) dans byte 66 UDP, messages
explicites sur page capteurs et self-test.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ajoute la colonne npm_status a data_NPM via ALTER TABLE.
Place dans set_config.py car c'est le seul script DB appele
par les scripts d'update (create_db.py n'est pas appele).
Liste de migrations extensible pour les futurs ajouts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- get_data_modbus_v3.py: requete Modbus separee pour lire le registre
status (0x13) du NextPM apres les donnees. Stocke dans npm_status.
- create_db.py: ajout colonne npm_status (INTEGER DEFAULT 0) dans
data_NPM + migration ALTER TABLE pour bases existantes.
- En cas d'erreur de lecture status, garde 0xFF (toutes erreurs).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Scripts MH-Z19/get_data.py (lecture standalone) et write_data.py (écriture SQLite)
- Table data_MHZ19, config MHZ19, cleanup et service systemd (120s)
- Web UI : carte test sensors, checkbox admin, boutons database + CSV download
- SARA_send_data_v2.py non modifié (sera fait dans un second temps)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add VERSION file (1.0.0) and changelog.json for firmware tracking
- Add device_type config param (nebuleair_pro default, backward compatible via INSERT OR IGNORE)
- Add device_type select in admin.html Protected Settings
- Add version badge and changelog modal in Updates section
- Add get_firmware_version and get_changelog PHP endpoints
- Display firmware version in update_firmware.sh after git pull
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
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>
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>
**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>