From b27ca3ee19d4f544c592ace6f299b0c7cd20a547 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:50:00 +0200 Subject: [PATCH] The two cards stop keeping numbers from each other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Charger control and Charger readings each held a reading the other did not. Control's tiles showed the charger's operating state and the session's energy, which appeared nowhere in the readout that claims to be the whole snapshot; readings had the total power and the session length, which are the two numbers you actually look at after pressing start to see whether anything happened. Both gaps close. The control card grows two tiles — total power (20068) and session length (20082) — laid out two by two beside the connector state and the energy, and they use the readings card's own labels and formatting so the wording cannot drift apart. They appear only when the charger reports them: the OCPP status carries neither, so on that path the card keeps its original two tiles rather than showing a pair of dashes. The readings card grows the other two: the charging status (20097) leads the live block, since what the charger is doing is what the block is about, and the session energy (20084) follows the session length it belongs beside. Nothing is exclusive to one card any more, which is the point — a number that can only be read in the card that acts on it is a number you have to go looking for. Co-Authored-By: Claude Opus 5 --- Web App/web/src/i18n/da.json | 2 ++ Web App/web/src/i18n/en.json | 2 ++ Web App/web/src/i18n/pl.json | 2 ++ Web App/web/src/views/Charging.vue | 22 ++++++++++++++++++++++ 4 files changed, 28 insertions(+) diff --git a/Web App/web/src/i18n/da.json b/Web App/web/src/i18n/da.json index 53b7750..151791a 100644 --- a/Web App/web/src/i18n/da.json +++ b/Web App/web/src/i18n/da.json @@ -136,6 +136,8 @@ "lineToLine": "Mellem faser", "power": "Samlet effekt", "sessionDuration": "Sessionens længde", + "chargingStatus": "Ladestatus", + "sessionEnergy": "Sessionsenergi", "cpSignal": "Control pilot", "cpVoltage": "Pilotspænding", "phaseMode": "Kører på", diff --git a/Web App/web/src/i18n/en.json b/Web App/web/src/i18n/en.json index dde8d20..37addc0 100644 --- a/Web App/web/src/i18n/en.json +++ b/Web App/web/src/i18n/en.json @@ -122,6 +122,8 @@ "lineToLine": "Line to line", "power": "Total power", "sessionDuration": "Session length", + "chargingStatus": "Charging status", + "sessionEnergy": "Session energy", "cpSignal": "Control pilot", "cpVoltage": "Pilot voltage", "phaseMode": "Running on", diff --git a/Web App/web/src/i18n/pl.json b/Web App/web/src/i18n/pl.json index 04712b9..1141d63 100644 --- a/Web App/web/src/i18n/pl.json +++ b/Web App/web/src/i18n/pl.json @@ -138,6 +138,8 @@ "lineToLine": "Międzyfazowe", "power": "Moc całkowita", "sessionDuration": "Czas sesji", + "chargingStatus": "Status ładowania", + "sessionEnergy": "Energia sesji", "cpSignal": "Control pilot", "cpVoltage": "Napięcie pilota", "phaseMode": "Pracuje na", diff --git a/Web App/web/src/views/Charging.vue b/Web App/web/src/views/Charging.vue index 928a123..876ddb8 100644 --- a/Web App/web/src/views/Charging.vue +++ b/Web App/web/src/views/Charging.vue @@ -342,6 +342,14 @@ function sessionLength(sec) { return h > 0 ? `${h} h ${m} min` : `${m} min`; } +// What the car is drawing and how long it has been, beside the buttons that +// start and stop it — the two numbers you look at to see whether pressing one +// did anything. Both are Modbus registers; the OCPP status carries neither, so +// there the tiles are absent rather than empty, which is also what happens on a +// charger whose firmware does not report them. +const ctlPower = computed(() => unit(mb.value.powerTotal, 0, "W")); +const ctlSessionTime = computed(() => sessionLength(mb.value.sessionSeconds)); + // Pairs with no value drop out: a charger on older firmware, or one that refused // the control block, should show a shorter list rather than a column of dashes. const rows = (pairs) => @@ -350,8 +358,14 @@ const rows = (pairs) => const modbusLive = computed(() => { const s = mb.value; return rows([ + // What the charger says it is doing, and the session's own energy. Both are + // registers of their own, and both were readable only from the tiles in the + // control card — a readout that leaves out the two numbers the page puts in + // front of you is not the full readout it claims to be. + ["chargingStatus", s.statusDesc], ["power", unit(s.powerTotal, 0, "W")], ["sessionDuration", sessionLength(s.sessionSeconds)], + ["sessionEnergy", isSet(s.sessionWh) ? `${(s.sessionWh / 1000).toFixed(2)} kWh` : null], ["cpSignal", s.cpSignalDesc], ["cpVoltage", unit(s.cpVoltage, 2, "V")], ["phaseMode", enumLabel("phaseMode", s.phaseMode)], @@ -1065,6 +1079,14 @@ onMounted(async () => {
{{ ctlMeterKwh }} kWh
{{ t("charging.control.meter") }}
+
+
{{ ctlPower }}
+
{{ t("charging.modbus.power") }}
+
+
+
{{ ctlSessionTime }}
+
{{ t("charging.modbus.sessionDuration") }}
+