Add heatpump compressor cycle analysis web app
Static page that plots Home Assistant on/off history of the heatpump compressor with pan/zoom, per-phase hover durations and statistics (min/max/mean/median, total on-time, duty cycle) for the visible range. English/German UI. Served by nginx in Docker with basic auth, CSP and a healthcheck; Plotly is vendored locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
'use strict';
|
||||
|
||||
// UI strings. Keys used in index.html via data-i18n and in app.js via t().
|
||||
const I18N = {
|
||||
en: {
|
||||
locale: 'en-GB',
|
||||
title: 'Heatpump compressor cycles',
|
||||
loading: 'loading…',
|
||||
dataHeading: 'Data',
|
||||
rangeHeading: 'Selected range',
|
||||
all: 'All',
|
||||
loadCsv: 'Load CSV…',
|
||||
phaseList: 'On-phases in selected range',
|
||||
start: 'Start',
|
||||
end: 'End',
|
||||
duration: 'Duration',
|
||||
gapBefore: 'Gap before',
|
||||
from: 'From',
|
||||
to: 'To',
|
||||
span: 'Span',
|
||||
events: 'Events',
|
||||
onPhases: 'On-phases',
|
||||
phases: 'Phases',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
mean: 'Mean',
|
||||
median: 'Median',
|
||||
totalOn: 'Total on',
|
||||
dutyCycle: 'Duty cycle',
|
||||
meanGap: 'Mean off-gap',
|
||||
on: 'on',
|
||||
off: 'off',
|
||||
units: { d: 'd', h: 'h', m: 'm', s: 's' },
|
||||
errColumns: 'CSV needs the columns "state" and "last_changed".',
|
||||
errEmpty: 'CSV contains no valid rows.',
|
||||
errFetch: 'Could not load history.csv ({status}) – use “Load CSV…”.',
|
||||
note: 'Hover a phase to see its duration. Drag to zoom, shift+drag or the pan tool to pan, ' +
|
||||
'mouse wheel to zoom, double-click to reset. Statistics use the on-phases that <em>start</em> ' +
|
||||
'within the visible range; total on-time and duty cycle are clipped to the range. ' +
|
||||
'A phase ends at the first state that is not "on" (off, unknown, unavailable); ' +
|
||||
'a phase still running at the end of the data is excluded. Times are shown in your local time zone.',
|
||||
},
|
||||
de: {
|
||||
locale: 'de-DE',
|
||||
title: 'Wärmepumpe – Verdichterzyklen',
|
||||
loading: 'lädt…',
|
||||
dataHeading: 'Daten',
|
||||
rangeHeading: 'Ausgewählter Zeitraum',
|
||||
all: 'Alles',
|
||||
loadCsv: 'CSV laden…',
|
||||
phaseList: 'Laufphasen im ausgewählten Zeitraum',
|
||||
start: 'Start',
|
||||
end: 'Ende',
|
||||
duration: 'Dauer',
|
||||
gapBefore: 'Pause davor',
|
||||
from: 'Von',
|
||||
to: 'Bis',
|
||||
span: 'Zeitraum',
|
||||
events: 'Ereignisse',
|
||||
onPhases: 'Laufphasen',
|
||||
phases: 'Phasen',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
mean: 'Mittelwert',
|
||||
median: 'Median',
|
||||
totalOn: 'Laufzeit gesamt',
|
||||
dutyCycle: 'Einschaltanteil',
|
||||
meanGap: 'Ø Pause',
|
||||
on: 'an',
|
||||
off: 'aus',
|
||||
units: { d: 'T', h: 'h', m: 'min', s: 's' },
|
||||
errColumns: 'Die CSV benötigt die Spalten "state" und "last_changed".',
|
||||
errEmpty: 'Die CSV enthält keine gültigen Zeilen.',
|
||||
errFetch: 'history.csv konnte nicht geladen werden ({status}) – bitte „CSV laden…“ verwenden.',
|
||||
note: 'Für die Dauer über eine Phase fahren. Ziehen zum Zoomen, Umschalt+Ziehen oder das Verschieben-Werkzeug ' +
|
||||
'zum Verschieben, Mausrad zum Zoomen, Doppelklick zum Zurücksetzen. Die Statistik berücksichtigt Laufphasen, ' +
|
||||
'die im sichtbaren Zeitraum <em>beginnen</em>; Laufzeit gesamt und Einschaltanteil werden auf den Zeitraum begrenzt. ' +
|
||||
'Eine Phase endet beim ersten Zustand ungleich „on“ (off, unknown, unavailable); ' +
|
||||
'eine am Datenende noch laufende Phase wird nicht gezählt. Zeiten in lokaler Zeitzone.',
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user