Commit Graph

28 Commits

Author SHA1 Message Date
PaulVua
d554f03195 v1.12.1: S88 ecrit toujours + code d'etat, plus de CO2 perime transmis
Probleme vu sur pro100: sonde S88 muette (panne cablage) mais write_data.py
n'ecrivait rien -> la base gardait la derniere valeur (487 ppm d'hier) et la
loop d'envoi la transmettait en boucle.

- data_S88: nouvelle colonne s88_status (0=OK, 0xFF=sonde muette), comme
  npm_status/noise_status. Migration via create_db.py + set_config.py + self-heal.
- S88/write_data.py: ecrit DESORMAIS une ligne a chaque cycle (CO2=0 + 0xFF si
  pas de reponse). Connexion SQLite timeout=10 (anti database-is-locked).
- SARA_send_data_v2.py: lit s88_status; si 0xFF -> bytes 81-82 restent 0xFFFF
  (CO2 absent) au lieu d'envoyer une valeur perimee. Compatible bases non migrees.
- database.html + launcher.php: badge statut + colonne dans les exports CSV.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 17:10:32 +02:00
PaulVua
4f3d273981 v1.10.0: intégration capteur CCS811 (TVOC/eCO2, I2C)
Nouveau capteur de qualité d'air CCS811 sur le bus I2C, calqué sur le
pattern S88 (local-only, pas encore dans le payload de transmission).

- CCS811/get_data.py (lecture live) + write_data.py (timer 10s, self-heal table)
- table data_CCS811 (timestamp, eCO2, TVOC) dans create_db.py
- config CCS811 (bool) + CCS811_address (0x5A/0x5B, défaut 0x5A) dans set_config.py
- service+timer systemd nebuleair-ccs811-data (10s) + ajout boucle d'activation
- admin.html: case d'activation + dropdown adresse I2C
- sensors.html: carte Get Data (TVOC + eCO2)
- database.html + launcher.php: consultation/export/stats data_CCS811
- lib adafruit-circuitpython-ccs811 dans installation_part1.sh
- CCS811/README.md: câblage, adresses, warning clock-stretching I2C sur Pi
- CLAUDE.md + changelog mis à jour

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 14:27:11 +02:00
PaulVua
0f94fda0ba v1.9.17: database.html - modal + pagination, boutons S88
Refonte des boutons 'Consulter la base de donnée': ils ouvrent
désormais un grand modal Bootstrap (modal-xl scrollable) avec
pagination 20 lignes/page (Précédent/Suivant + indicateur de plage).
Le dropdown 'Nombre de mesures' est supprimé.

Ajout des boutons Senseair S88 dans les 3 cartes pointant sur
data_S88, et renommage du bouton MH-Z19 pour le distinguer.

Backend: sqlite/read.py accepte un OFFSET optionnel (3e argument,
défaut 0) et launcher.php endpoint table_mesure transmet ?offset=N.
Rétrocompatible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 16:51:49 +02:00
PaulVua
3f7d0c0816 Page database: affichage noise_status dans tableau et export CSV
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:45:01 +01:00
PaulVua
ee0577c504 Database page: affichage npm_status dans table NPM + export CSV
Colonne Status avec badge vert 'OK' si 0, badge orange '0xXX'
si erreur. Inclus dans le download CSV.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 20:31:22 +01:00
PaulVua
8f88eae575 Revert optimisations sidebar/fetch qui causaient des blocages navigateur
Retour a l'etat 408ab76. Les tentatives d'optimisation du nombre
de fetch (sidebar unique, config partagee, sequencement) causaient
des blocages sur Chrome/Firefox. On garde les features (forget wifi,
hotspot badge, UI wifi) mais on revient au chargement d'origine.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:48:38 +01:00
PaulVua
5849190220 Fix: sidebar.html charge une seule fois au lieu de deux sur toutes les pages
Reduit de 3 a 2 les fetch au DOMContentLoaded, liberant un slot
de connexion HTTP. Corrige le blocage "pending" cause par la limite
de 6 connexions simultanees par domaine dans Chrome/Firefox.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 18:32:22 +01:00
PaulVua
e0e8a4cefe Database: validation dates + bouton télécharger toute la table
- Empêche le téléchargement par dates si début/fin non renseignées
- Ajoute une carte "Télécharger toute la table" (bypass dates)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 09:19:02 +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
ea2642685c fix(ui): logo dynamique ne s'affichait pas (innerHTML n'exécute pas les scripts)
Le script dans topbar.html ne s'exécutait pas car innerHTML ignore les
balises <script>. Déplacé la logique dans un fichier JS séparé
(topbar-logo.js) avec MutationObserver pour détecter l'insertion du topbar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:43:38 +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
10f84f0c1b Fix most recent row highlighting by increasing CSS specificity
The light green background for the most recent data row wasn't displaying because Bootstrap's table striping was overriding it.

Changed CSS from targeting the row to targeting individual cells:
- .table .most-recent-row td
- .table-striped .most-recent-row td

Both with !important to override Bootstrap's table styles. Now the first row correctly displays with light green background.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 15:00:49 +01:00
PaulVua
a3b2bef5c1 Improve database page layout and highlight most recent data
Layout improvements:
- Reorganized cards to fit 3 across on large screens (col-lg-4)
- View database, download data, and danger zone now on same row
- Added h-100 class to cards for equal height
- Made delete button larger and full-width for better visibility

Button spacing:
- Added mb-2 (margin-bottom) to all measurement trigger buttons
- Improved vertical spacing for better readability

Data visualization:
- Added light green background (#d4edda) to first table row
- First row now highlights the most recent data entry
- Makes it easy to see the latest sensor reading at a glance

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 14:48:34 +01:00
PaulVua
f679732591 Fix i18n translations not applying properly on database page
Fixed race condition where translations weren't being applied to the database page when French language was selected. The issue was caused by the i18n system loading asynchronously while page content was being rendered.

Changes:
- Added applyTranslationsWhenReady() function that waits for translations to load
- Re-apply translations after dynamic content (sidebar/topbar) is loaded
- Added languageChanged event listener to re-apply translations on language switch
- Ensures all text appears in the selected language (French/English)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 14:42:33 +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
79a9217307 Add i18n translations for page content (Home, Database, Logs)
Extended internationalization support by adding translation keys and data-i18n attributes to page content. Previously only the sidebar was translated - now the main content of Home, Database, and Logs pages will switch between French and English when the user changes the language selector.

Translation keys added:
- Home page: title, welcome message, PM measures, Linux stats, disk/memory usage
- Database page: all UI labels, buttons, and dropdown options
- Logs page: title, description, log types, and action buttons

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 16:42:43 +01:00
PaulVua
fe604791f0 Enable i18n language switching on all pages and hide incomplete features
Added i18n.js script to all main pages (index, database, saraR4, wifi, logs, admin) to enable language switching functionality across the entire application. Commented out Map and Terminal menu items in the sidebar as these pages are not yet ready for production use.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 16:38:28 +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
61b302fe35 update 2025-05-16 11:08:23 +02:00
Your Name
970a36598c update 2025-03-26 10:30:24 +01:00
Your Name
cd030a9e14 update 2025-03-04 10:06:26 +01:00
Your Name
accfd3e371 update 2025-02-20 13:13:25 +01:00
PaulVua
ecd61f765a update 2025-02-11 10:06:44 +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
49be391eb3 database 2025-02-05 15:09:15 +01:00