Alerte BOOST : resistance jamais atteinte en HC (AUTO s'arrete sous 65 °C) ; Jeep non identifiee si elle roule apres le branchement ; relecture Uconnect au branchement

This commit is contained in:
Tallagrand Thierry
2026-10-07 12:48:46 +02:00
parent 9094984069
commit 377b87f6d1
7 changed files with 71 additions and 24 deletions

View File

@@ -53,7 +53,8 @@ eq('helper corrompu repart a vide', JSON.parse(ajouterReleve('pas du json', { ve
const journ = async () => {};
const appels = [];
const etiq = async (b, n, m) => { appels.push([b.toISOString(), n, m]); return 1; };
const etat = (km, niv, maj, branchee = 'on', borne = 'on') => new Map([
const etat = (km, niv, maj, branchee = 'on', borne = 'on', contact = 'off') => new Map([
[JEEP.contact, { state: contact }],
[JEEP.odometre, { state: String(km) }], [JEEP.niveau, { state: String(niv) }], [JEEP.majA, { state: maj }],
[JEEP.branchee, { state: branchee }], ['binary_sensor.victron_evcs_vehicle_connected', { state: borne }],
['input_number.victron_evcs_capacity_jeep_kwh', { state: '8.7' }], ['input_number.victron_evcs_autonomie_jeep_km', { state: '50' }]]);
@@ -83,6 +84,11 @@ eq('helper corrompu repart a vide', JSON.parse(ajouterReleve('pas du json', { ve
base.branche = new Date('2026-10-09T17:06:00Z'); base.etiquette = 'VW';
await ingererJeep(sql, lire, etat(112950, 40, '2026-10-09T17:05:00+00:00', 'off', 'on'), journ, etiq);
eq('jeep : proprietaire a deja dit VW -> rien', [appels.length, base.niveaux.length], [2, 2]);
// 07/10 : une autre voiture est branchee ; la Jeep publie APRES le branchement
// avec le contact mis et se declare « branchee » (cas extreme) -> pas JEEP.
base.branche = new Date('2026-10-10T10:32:00Z'); base.etiquette = null;
await ingererJeep(sql, lire, etat(113000, 50, '2026-10-10T10:37:20+00:00', 'on', 'on', 'on'), journ, etiq);
eq('jeep : contact mis apres le branchement -> pas d identification', appels.length, 2);
}
if (process.argv.includes('--vues')) {