Commit Graph

65 Commits

Author SHA1 Message Date
PaulVua
2949c78b56 Fix: timeout 2s sur nmcli dans get_config_sqlite pour eviter blocage
Si nmcli est lent ou bloque, on garde la valeur DB au lieu de
freezer toutes les pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:12:15 +01:00
PaulVua
c83f8396aa WiFi status: detection live wlan0 au lieu de se fier a la DB
Le WIFI_status en DB peut etre desynchronise (ex: reconnexion
manuelle via SSH). Maintenant get_config_sqlite detecte le vrai
etat de wlan0 via nmcli et corrige la DB si necessaire.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:09:39 +01:00
PaulVua
83d854b596 Hotspot: scan WiFi depuis cache CSV + timeout scan live + auto-load
En mode hotspot, le scan live est impossible (wlan0 occupée).
Utilise wifi_list.csv (scan au boot) avec notice explicative.
Ajout timeout 10s sur le scan live pour eviter blocage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:54:44 +01:00
PaulVua
a0f8b4b8eb Fix hotspot IP: 192.168.43.1 -> 10.42.0.1 (NetworkManager default)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:50:28 +01:00
PaulVua
8d0507852a Fix forget WiFi: appel bash explicite + disconnect wlan0 avant delete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:34:30 +01:00
PaulVua
6e17f39a2c v1.4.5 — Page WiFi: oublier réseau + badge hotspot sidebar + refonte UI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:28:46 +01:00
PaulVua
7479344df7 Mise à jour capteur bruit: ancien I2C → NSRT MK4 USB
- Nouveau script sound_meter/read.py pour lecture à la demande (JSON)
- launcher.php: appel du script Python au lieu de l'ancien binaire C
- sensors.html: carte USB, suppression boutons start/stop, affichage JSON
- Traductions fr/en: I2C → USB, NSRT MK4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:23:54 +01:00
PaulVua
98b5b43190 v1.4.0 — Mise à jour firmware hors-ligne par upload ZIP
Nouvelle fonctionnalité permettant de mettre à jour le firmware sans
connexion internet, via upload d'un fichier .zip depuis l'interface admin.

Fichiers ajoutés:
- update_firmware_from_file.sh (rsync + exclusions + chown + restart services)
- .update-exclude (liste d'exclusions évolutive, versionnée)
- html/.htaccess (limite upload PHP 50MB)

Fichiers modifiés:
- html/launcher.php (handler upload_firmware)
- html/admin.html (UI upload + barre de progression)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:30:51 +01:00
PaulVua
36d4bac0a5 Fix: Revert to using sudo in launcher.php to support visudo configuration 2026-02-17 17:14:20 +01:00
PaulVua
a208540093 Fix: Remove sudo usage in launcher.php to avoid password prompt; enable logging 2026-02-17 12:54:40 +01:00
PaulVua
8c55798e34 Fix UI: Add button IDs and fix status message selector in screen.html; Capture stderr in launcher.php 2026-02-17 12:51:39 +01:00
PaulVua
cf502abfef Fix: Broaden pkill pattern to match 'screen.py' for stop command 2026-02-17 12:46:39 +01:00
PaulVua
e659696044 Fix: Run screen script with sudo to ensure access to video device 2026-02-17 12:43:28 +01:00
PaulVua
86c2d1eb41 Fix: Correct screen.py path in launcher.php for production environment 2026-02-17 12:33:41 +01:00
PaulVua
3e5ee9c77e Add Screen control features: Screen tab in sidebar, Kivy script, and backend logic 2026-02-17 12:19:05 +01:00
PaulVua
198836fa13 feat: intégration capteur CO2 MH-Z19
- 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>
2026-02-17 11:04:45 +01:00
PaulVua
88680f07b0 feat(ui): add full table CSV download on database stats card
Each table row in the stats card now has a download button that exports
the entire table as CSV with proper column headers, generated server-side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 12:18:46 +01:00
PaulVua
20c6a12251 feat(ui): add database stats card on database page
Show table info (entry count, oldest/newest dates, total DB size) in a
new card on the database page, with auto-refresh and i18n support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 12:07:58 +01:00
PaulVua
50a8cdd938 feat: add firmware versioning and device_type support (NebuleAir/ModuleAir)
- 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>
2026-02-11 16:12:18 +01:00
PaulVua
544eebd715 feat(ui): add NextPM firmware version button on sensors page
Add a "Firmware Version" button next to "Get Data" in the NextPM card
that calls firmware_version.py and displays the result as a badge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 17:05:10 +01:00
PaulVua
3a6b529cba feat(ui): add WiFi/network info to self-test
Add informational network status check at the beginning of self-test:
- Shows connection mode (Hotspot, WiFi, or Ethernet)
- Displays SSID/connection name
- Shows IP address and hostname.local
- Add wifi_status endpoint in launcher.php using nmcli

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 10:39:02 +01:00
PaulVua
91a4e7c841 wifi hotspot improvements 2026-01-15 16:45:47 +01:00
PaulVua
8291475e36 add cpu power mode 2026-01-15 14:13:41 +01:00
PaulVua
4f1b140a75 Replace individual Envea sensor cards with single debug card
Modified the sensors page to display a unified debug view for all Envea gas sensors:

Backend changes:
- Added new 'envea_debug' endpoint in launcher.php
- Calls: /usr/bin/python3 /var/www/nebuleair_pro_4g/envea/read_value_v2.py -d
- Returns raw debug output without parsing

Frontend changes:
- Replaced individual sensor cards with single combined card
- Card displays if any gas sensor is connected
- Shows list of connected sensors (NO2, H2S, NH3, etc.)
- New getENVEA_debug_values() function fetches debug data
- Raw output displayed in scrollable <pre> block
- No JSON parsing, no table formatting - just raw debug text
- Card width set to col-sm-6 for better visibility

This makes it easier to check if all sensors are working correctly by viewing the raw output.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 14:56:08 +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
PaulVua
1f4d38257e Fix WiFi setup flow and improve hotspot management
- Fix deviceID overwrite bug: preserve manual configuration across reboots
- Use deviceName as hotspot SSID for better device identification
- Implement live WiFi scanning instead of reading stale CSV data
- Improve hotspot management with dynamic connection detection
- Add database status updates on WiFi connection success/failure
- Hide password in logs for better security

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 17:27:37 +01:00
Your Name
65beead82b update 2025-11-05 14:44:30 +01:00
Your Name
381cf85336 update 2025-05-27 16:42:53 +02:00
Your Name
93d77db853 update 2025-05-23 17:49:03 +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
PaulVua
2516a3bd1c updates 2025-05-23 14:08:21 +02:00
PaulVua
1b8dc54fe0 updates 2025-05-23 14:03:57 +02:00
PaulVua
f40c105abf updates 2025-05-23 10:48:41 +02:00
Your Name
12c7a0b6af update 2025-05-01 11:01:29 +02:00
Your Name
98e5a239f5 update 2025-04-02 16:10:27 +02:00
Your Name
f7f6fccd60 update 2025-03-27 17:13:40 +01:00
Your Name
2129d45ef6 update 2025-03-25 14:55:50 +01:00
Your Name
b7a6f4c907 add sqlite config management 2025-03-24 15:19:27 +01:00
Your Name
d5302f78ba udpate 2025-03-20 17:45:47 +01:00
Your Name
d90fb14c90 update 2025-03-04 13:23:26 +01:00
Your Name
bf9ece8589 update 2025-02-27 11:54:53 +01:00
PaulVua
9774215e7c update 2025-02-11 14:55:10 +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
7cac769795 update 2025-02-07 15:04:11 +01:00
PaulVua
d98eb48535 update 2025-02-05 17:37:27 +01:00
PaulVua
46303b9c19 update 2025-02-05 16:54:59 +01:00