7 Commits

Author SHA1 Message Date
Patrick Schurig
dfdd9884d0 [3e+] ECS non-cascadé : applyRelayStage off-before-on + tests 1 et 3 relais
applyRelayStage faisait déjà du set-cible complet (delta correct, gère le non-cascadé) :
durcissement off-before-on (anti sur-puissance transitoire quand monter de palier éteint
des relais, ex. 3 résistances 500/1000/2000 : 1500→2000 commute 3 relais) + intention
documentée (comme SG-Ready).

testEcsRelayTopologies : ECS simple 1 relais (on/off) + ECS 3 relais non-cascadé
(transition 1500→2000 → set final r2000 SEUL, r500/r1000 coupés). Couvre les 2 topologies
du test terrain vendredi. Suite simulation 20/20, plugin prod 0/0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 00:09:24 +02:00
Patrick Schurig
d8079e84e0 [3e-5] testSgReadySurplus : montée + hystérésis + court-cycling + budget partagé ECS↔PAC
Test simulation autonome (mock powerSwitch 2 relais, encodage 2 bits). 4 volets :
(1) montée 2→3→4 ; (2) hystérésis 3↔4 (zone morte P4×1,0–1,2, budget oscillant →
reste 4) ; (3) court-cycling (gelé sous minStateHold, bascule au-delà via temps simulé) ;
(4) budget PARTAGÉ ECS↔PAC : ordre priorité → service inverse (preuve waterfall unifié 3e).
Suite simulation 19/19, 0 régression.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:43:02 +02:00
Patrick Schurig
54ba2296fa [3c-7c] testMeterSilentFallback + seam watchdog injectable
Extraction recordMeterUpdate(now)/evaluateMeterFreshness(now) : logique L2 injectable
(temps en paramètre), déclencheurs réels (QTimer + powerBalanceChanged) sous
#ifndef ENERGY_SIMULATION (pattern amont). onMeterWatchdogTick délègue.

testMeterSilentFallback : compteur muet >90s → dégradé (ECS off force=true, bypass
minOn) → STABILITÉ (ECS reste 0 sur 4 cycles, planif suspendue) → REPRISE (recalcul
depuis le surplus, pas de restauration d'ancienne consigne). Suite simulation 18/18,
charging 46/46, plugin prod 0/0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 22:21:22 +02:00
Patrick Schurig
dde967da41 [3c-7b] testEcsSurplusPV : waterfall ECS + protection compresseur (seam de temps prouvé)
Test simulation autonome (arbitre frais via initTestCase) : 2 relais powerSwitch +
EcsRelayAdapter minOn=300. 4 régimes pilotés par le temps simulé :
cascade export 0→1→2 ; anti-clignotement (recrédit, hors verrou) ; import<minOn → RESTE
(protection compresseur) ; import>minOn → déleste. Seul le temps simulé change entre les
2 derniers → prouve le seam de temps unifié ET la protection.

Renommage ThingClass mockPowerSwitch→powerSwitch (collision symbole plugininfo vs
energytestbase dans le binaire simulation). Suite simulation : 17 passed, 0 failed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 21:52:14 +02:00
Patrick Schurig
a471a23aeb [3c-7a] mock powerswitch + helpers energytestbase
ThingClass mockPowerSwitch (interface power : power bool writable + currentPower
double, params port/nominalPower) pour piloter l'EcsRelayAdapter en test.
setupThing + executeAction (power → état + currentPower dérivé du nominal, override
HTTP possible). energytestbase : mockPowerSwitchThingClassId + addPowerSwitch()
+ setPowerSwitchStates(). Cascade N paliers = N instances (matériel réel).
Build mock (-Werror) + binaire de test : 0 erreur / 0 warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 18:11:01 +02:00
Patrick Schurig
d8ebd65eba [upstream-fix] maxChargingCurrent uint→double + INCLUDEPATH energyplugin.pri + flip ETM vers pri
- tests/mocks/plugins/energymocks/integrationpluginenergymocks.json : maxChargingCurrent
  "type": "uint" → "type": "double" sur les 3 Thing classes (charger, chargerPhaseSwitching,
  simpleCharger) — nymea 1.15 a changé le type de l'interface evcharger.
- energyplugin/energyplugin.pri : INCLUDEPATH += $$PWD — rend energyplugin/ accessible
  aux consommateurs du .pri (simulation, tests) qui compilent les sources ETM.
- energyplugin/energyplugin.pro : le toggle ETM_ARBITRATOR déplacé dans energyplugin.pri
  (unique point de contrôle propagé à plugin ET simulation).
- tests/auto/simulation/experience/energyexperienceenergymock.cpp : même flip que
  energypluginnymea.cpp — instancie EnergyArbitrator si ETM_ARBITRATOR est défini.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 10:39:31 +02:00
b343650f9b initial commit 2026-01-11 11:09:23 +01:00