Commit Graph

277 Commits

Author SHA1 Message Date
Tallagrand Thierry
b10c90c74f P8: libération EDF quand véhicule plein (nuit HC) + fix latch inversé du 04/08
- vehicleChargeCompleted COLLANT via prev_surplus_state (nouveau champ snapshot):
  vehicle_full_or_paused -> night_session_done_idle auto-entretenu jusqu'au
  débranchement ou fin de fenêtre.
- Fix inversion 04/08: le latch takeover se libère à la fin de charge
  (était: || vehicleChargeCompleted qui le GARDAIT).
- P7 relâché quand charge finie; sourceMode nuit -> blocked (zéro retry).
- SOC > cible: takeover OFF -> hystérésis coupe EDF. SOC <= cible: takeover ON
  -> EDF maintenu + ACM recharge batterie (spec 'sauf si sous seuil').
- night_session_done_idle ne matche aucun pattern no-demand de l'hystérésis
  (condition de fonctionnement de l'override batterie basse).
- Golden: 19/19 (3 nouveaux scénarios P8, 16 existants inchangés).
2026-08-07 19:40:30 +02:00
Tallagrand Thierry
d1efeac44c R3: suite de tests golden — 16 scénarios, bloquante avant push
- tests/golden/run.mjs : chaîne complète des 5 nodes (code réel) en sandbox vm,
  horloge simulée par scénario, snapshot HA réel comme fixture.
- 16 scénarios attendus figés après revue : nuit HC (P7), solaire, abondance P6,
  provocation P3, gardes SOC, force_grid/force_charge, stop, overload.
- n8n-push.mjs exécute la suite avant tout PUT du workflow EVCS :
  golden rouge = push refusé (--skip-golden en échappatoire consciente).
- Validé par mutation : P7 cassé volontairement -> 2 échecs détectés + push bloqué.
- tools/fetch-snapshot-fixture.mjs : recapture d'un snapshot production.
2026-08-07 19:16:03 +02:00
Tallagrand Thierry
9c3a0a9c6e R1: déduplication du moteur nuit — WINDOWS_SOURCEV2 unique calculateur
- Le moteur nuit (161 lignes) était calculé 2x (WINDOWS + BCL), chaque patch
  nuit devait être appliqué 2x (P2, 04/08, P7) -> risque de divergence.
- WINDOWS calcule tout (+ startMs, needsCapture strict, recoveryAllowedNow,
  targetReached) et exporte nightEvcsPreview étendu.
- BCL consomme prev.nightEvcsPreview avec fallbacks sûrs (preview absent ->
  'blocked'). Export nightEvcs inchangé pour DECISION/HA_SERVICE.
- A/B git HEAD vs patché : 7 scénarios + 2 cas limites, sorties strictement
  identiques. Déployé en production, exécutions vérifiées success.
2026-08-07 19:05:21 +02:00
Tallagrand Thierry
9592ac94ea P7: charge HC nuit automatique si véhicule branché + toggle 'Réseau HC nuit' ON
- Root cause 1: battery_assist_night ne démarrait jamais (floor décharge 0A
  impossible la nuit) -> idle_wait_conditions jusqu'à dérive du SOC au trigger.
- Root cause 2: allow_grid_hc_night parsé mais jamais utilisé.
- Fix: nightGridHcPreferred dans WINDOWS_SOURCEV2 + BATTERY_CLOUD_LOCKS ->
  grid_hc_allowed dès l'ouverture de la fenêtre HC (EDF ON auto, ACM hold 2A).
- Toggle OFF = comportement historique. Dry-run 7 scénarios validés.
- Outils: n8n-pull/n8n-push (push REST direct, backup auto, node --check).
- Déployé en production le 07/08/2026 15:45, exécutions vérifiées success.
2026-08-07 15:46:49 +02:00
Tallagrand Thierry
1debfe3c0e backup: workflow V2.6 production (avant patch charge HC auto) + outils n8n-pull/n8n-push 2026-08-07 15:17:47 +02:00
Tallagrand Thierry
3beefff8de fix: gridAllowedBySoc + nightTakeoverLatched - autorise HC nuit et libère takeover après charge 2026-08-04 19:41:31 +02:00
Tallagrand Thierry
3ae047231b Update HANDOFF.md with 18/07/2026 session: documentation fixes, probe 10A, workflow git export 2026-07-18 02:17:58 +02:00
Tallagrand Thierry
a4c6df30ed Export EVCS Surplus Controller V2.6 workflow to git for version control 2026-07-18 02:15:58 +02:00
Tallagrand Thierry
2f3a66993b Update AGENTS.md with Qwen3-VL screen analysis procedure, add MANUEL_COMPLET.md and vision-notes.md 2026-07-18 02:14:22 +02:00
Tallagrand Thierry
1b032b5a20 Fix: 4 bugs critiques corrigés + backup workflow V2.6
Bugs corrigés (17/07 après-midi) :
1. Typo DECISION_ENGINEV2 : noDemandnightSessionNeedsClearScoreOff → noDemandScoreOff
2. Artefacts WINDOWS_SOURCEV2 : 3 occurrences tool_f6d3316d2001k4aAfEjbKGNUX2 supprimées
3. Session nuit stuck : night_session_active jamais clearé après fenêtre HC
4. EDF rebranché en journée : ajout condition context.profile === 'night_hc'

Config ajustée :
- battery_discharge_soft_a : 0A (au lieu de -8A)
- battery_neutral_band_a : 0A
- soc_start_min : 80% (au lieu de 94%)
- night_target_soc : 70% (au lieu de 85%)

Mode sonde activé pour provoquer production PV en autoconsommation.

Résultat : Jeep en charge à 17A avec soleil, EDF OFF (nuit seulement),
delivery 99.9%, système 100% auto en auto_solar_plus.
2026-07-17 20:10:05 +02:00
Tallagrand Thierry
459dba7a9f skills n8n + HANDOFF/AGENTS: config Qwen3.6 local validee 2026-07-17 00:53:15 +02:00
Tallagrand Thierry
7a9e56f17c skills n8n: garde 5 actives, désactive 3 (config Qwen3.6 local) 2026-07-17 00:47:42 +02:00
Tallagrand Thierry
93aa43d0d0 feat: P6 override abondance plancher SOC (PV fort + batterie en charge => démarrage dès 40%) + backup + HANDOFF 2026-07-12 12:50:39 +02:00
Tallagrand Thierry
9be0f61806 feat: session 09/07 — P1-P5 déployés (hystérésis robuste, anti-créneaux nuit, provocation PV, maintien SOC takeover, plafond EDF ON) + backups n8n/lovelace + HANDOFF à jour 2026-07-09 23:56:13 +02:00
Tallagrand Thierry
59f6ae7e9e memory 2026-06-13 00:31:28 +02:00
Tallagrand Thierry
781d091771 docs: Document V2.6 deployment + EDF flicker bug fix 2026-06-13 00:03:22 +02:00
Tallagrand Thierry
a5b88b14b8 docs: Update HANDOFF.md and add n8n access token 2026-06-12 04:26:53 +02:00
Tallagrand Thierry
394cf56e58 feat: Add afternoon probe helpers to snapshot.js
Add readings for 3 new afternoon probe helpers:
- victron_evcs_afternoon_probe_pv_avg_min_w
- victron_evcs_afternoon_probe_soc_min
- victron_evcs_afternoon_battery_max_discharge_a
2026-06-12 03:23:12 +02:00
Tallagrand Thierry
af87a76a65 feat: Add afternoon_probe for outside-window solar charging
- Add afternoonProbeEligible in WINDOW_SOURCEV2.js
- Enable hybrid_probe sourceMode in outside_window when probe conditions met
- Add afternoon probe parameters in INPUTPARSE (inputparse.js + inputparseP2.js)
- Update probeStartOk in BATTERY_CLOUD_LOCKS to accept afternoon probe
- Update blockStillRelevant for probe_failed to include outside_window

Fixes the issue where strong afternoon sun with SOC>85%
was blocked by high cloudDebt and no probe mechanism.
2026-06-12 02:45:24 +02:00
Tallagrand Thierry
0d91819577 docs: Add HANDOFF.md for outside-window solar charging block analysis 2026-06-12 02:12:45 +02:00
Tallagrand Thierry
349a77af26 avant analyse et doc 2026-06-11 22:38:15 +02:00
ae725602d0 ajout gestion batterie 2026-05-09 20:57:55 +02:00
1776d2776f correction logique commande priorisation 2026-05-01 18:34:35 +02:00
26b27f5faa correction sur la logique 2026-05-01 17:39:46 +02:00
5e6798b702 logique de traitement erron 2026-05-01 17:38:40 +02:00
874aca1afa version 2.2 2026-04-12 05:41:42 +02:00
e2733b809b avant modif 2026-04-12 03:01:51 +02:00