iobroker.poolcontrol 1.3.35 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/admin/i18n/de.json +1 -0
- package/admin/i18n/en.json +1 -0
- package/admin/i18n/es.json +1 -0
- package/admin/i18n/fr.json +1 -0
- package/admin/i18n/it.json +1 -0
- package/admin/i18n/nl.json +1 -0
- package/admin/i18n/pl.json +1 -0
- package/admin/i18n/pt.json +1 -0
- package/admin/i18n/ru.json +1 -0
- package/admin/i18n/uk.json +1 -0
- package/admin/i18n/zh-cn.json +1 -0
- package/admin/jsonConfig.json +10 -0
- package/io-package.json +14 -14
- package/lib/helpers/pumpHelper3.js +48 -4
- package/lib/helpers/runtimeHelper.js +122 -19
- package/lib/helpers/timeHelper.js +73 -2
- package/lib/i18n/de.json +10 -1
- package/lib/i18n/en.json +10 -1
- package/lib/i18n/es.json +10 -2
- package/lib/i18n/fr.json +10 -1
- package/lib/i18n/it.json +10 -1
- package/lib/i18n/nl.json +10 -1
- package/lib/i18n/pl.json +10 -1
- package/lib/i18n/pt.json +10 -1
- package/lib/i18n/ru.json +10 -1
- package/lib/i18n/uk.json +10 -1
- package/lib/i18n/zh-cn.json +10 -1
- package/lib/stateDefinitions/controlStates.js +164 -0
- package/lib/stateDefinitions/generalStates.js +96 -5
- package/lib/stateDefinitions/pumpStates3.js +24 -0
- package/lib/stateDefinitions/timeStates.js +94 -0
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const { I18n } = require('@iobroker/adapter-core');
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* timeHelper
|
|
5
7
|
* - Überwacht Zeitfenster (time1, time2, time3)
|
|
@@ -41,6 +43,7 @@ const timeHelper = {
|
|
|
41
43
|
await this.adapter.setStateAsync('pump.active_helper', { val: '', ack: true });
|
|
42
44
|
this.adapter.log.debug('[timeHelper] Time mode ended – priority released to solar/control.');
|
|
43
45
|
}
|
|
46
|
+
await this.adapter.setStateChangedAsync('timecontrol.status_text', { val: '', ack: true });
|
|
44
47
|
return;
|
|
45
48
|
} // nur aktiv im Zeitmodus
|
|
46
49
|
|
|
@@ -49,9 +52,13 @@ const timeHelper = {
|
|
|
49
52
|
|
|
50
53
|
const now = new Date();
|
|
51
54
|
const hhmm = now.toTimeString().slice(0, 5); // "HH:MM"
|
|
55
|
+
const nowMinutes = now.getHours() * 60 + now.getMinutes();
|
|
52
56
|
const weekday = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'][now.getDay()];
|
|
53
57
|
|
|
54
58
|
let shouldRun = false;
|
|
59
|
+
let intervalWindowActive = false;
|
|
60
|
+
let pausedIntervalExists = false;
|
|
61
|
+
let invalidIntervalExists = false;
|
|
55
62
|
for (let i = 1; i <= 3; i++) {
|
|
56
63
|
const active = (await this.adapter.getStateAsync(`timecontrol.time${i}_active`))?.val;
|
|
57
64
|
const start = (await this.adapter.getStateAsync(`timecontrol.time${i}_start`))?.val;
|
|
@@ -59,11 +66,60 @@ const timeHelper = {
|
|
|
59
66
|
const dayOk = (await this.adapter.getStateAsync(`timecontrol.time${i}_day_${weekday}`))?.val;
|
|
60
67
|
|
|
61
68
|
if (active && dayOk && this._inTimeRange(hhmm, start, end)) {
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
const intervalActive =
|
|
70
|
+
(await this.adapter.getStateAsync(`timecontrol.time${i}_interval_active`))?.val === true;
|
|
71
|
+
|
|
72
|
+
if (!intervalActive) {
|
|
73
|
+
shouldRun = true;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
intervalWindowActive = true;
|
|
78
|
+
const intervalEvery = Number(
|
|
79
|
+
(await this.adapter.getStateAsync(`timecontrol.time${i}_interval_every_min`))?.val,
|
|
80
|
+
);
|
|
81
|
+
const intervalRun = Number(
|
|
82
|
+
(await this.adapter.getStateAsync(`timecontrol.time${i}_interval_run_min`))?.val,
|
|
83
|
+
);
|
|
84
|
+
const startMinutes = this._timeToMinutes(start);
|
|
85
|
+
const intervalValid =
|
|
86
|
+
startMinutes !== null &&
|
|
87
|
+
Number.isFinite(intervalEvery) &&
|
|
88
|
+
intervalEvery >= 10 &&
|
|
89
|
+
intervalEvery <= 1440 &&
|
|
90
|
+
Number.isFinite(intervalRun) &&
|
|
91
|
+
intervalRun >= 5 &&
|
|
92
|
+
intervalRun <= 1440 &&
|
|
93
|
+
intervalRun <= intervalEvery;
|
|
94
|
+
|
|
95
|
+
if (!intervalValid) {
|
|
96
|
+
invalidIntervalExists = true;
|
|
97
|
+
shouldRun = true;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const elapsed = nowMinutes - startMinutes;
|
|
102
|
+
const phase = elapsed % intervalEvery;
|
|
103
|
+
if (phase < intervalRun) {
|
|
104
|
+
shouldRun = true;
|
|
105
|
+
} else {
|
|
106
|
+
pausedIntervalExists = true;
|
|
107
|
+
}
|
|
64
108
|
}
|
|
65
109
|
}
|
|
66
110
|
|
|
111
|
+
let statusText = '';
|
|
112
|
+
if (invalidIntervalExists) {
|
|
113
|
+
statusText = I18n.translate('Invalid interval configuration');
|
|
114
|
+
} else if (shouldRun && pausedIntervalExists) {
|
|
115
|
+
statusText = I18n.translate('Another time window keeps the pump running');
|
|
116
|
+
} else if (intervalWindowActive) {
|
|
117
|
+
statusText = I18n.translate('Interval mode active');
|
|
118
|
+
} else if (shouldRun) {
|
|
119
|
+
statusText = I18n.translate('Time control active');
|
|
120
|
+
}
|
|
121
|
+
await this.adapter.setStateChangedAsync('timecontrol.status_text', { val: statusText, ack: true });
|
|
122
|
+
|
|
67
123
|
// --- Sprachsignal für Zeitsteuerung setzen ---
|
|
68
124
|
const oldVal = (await this.adapter.getStateAsync('speech.time_active'))?.val;
|
|
69
125
|
if (oldVal !== shouldRun) {
|
|
@@ -107,6 +163,21 @@ const timeHelper = {
|
|
|
107
163
|
return start <= now && now < end;
|
|
108
164
|
},
|
|
109
165
|
|
|
166
|
+
_timeToMinutes(value) {
|
|
167
|
+
const match = /^(\d{2}):(\d{2})$/.exec(String(value || ''));
|
|
168
|
+
if (!match) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const hours = Number(match[1]);
|
|
173
|
+
const minutes = Number(match[2]);
|
|
174
|
+
if (hours > 23 || minutes > 59) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return hours * 60 + minutes;
|
|
179
|
+
},
|
|
180
|
+
|
|
110
181
|
cleanup() {
|
|
111
182
|
if (this.checkTimer) {
|
|
112
183
|
this.adapter.clearInterval(this.checkTimer);
|
package/lib/i18n/de.json
CHANGED
|
@@ -381,5 +381,14 @@
|
|
|
381
381
|
"circulation_plausibility_flow_warning": "Der berechnete Durchfluss ist im Verhältnis zur konfigurierten Nennförderleistung unplausibel hoch.",
|
|
382
382
|
"circulation_plausibility_daily_total_jump_warning": "Das Tagesumwälzvolumen ist schneller gestiegen als physikalisch plausibel.",
|
|
383
383
|
"circulation_plausibility_multiple_warnings": "Mehrere Plausibilitätswarnungen zur Umwälzberechnung sind aktiv.",
|
|
384
|
-
"circulation_plausibility_disabled": "Die Plausibilitätsprüfung der Umwälzberechnung ist deaktiviert."
|
|
384
|
+
"circulation_plausibility_disabled": "Die Plausibilitätsprüfung der Umwälzberechnung ist deaktiviert.",
|
|
385
|
+
"Pump is running within the normal range": "Pumpe läuft im Normalbereich",
|
|
386
|
+
"Pump is running below the normal range": "Pumpe läuft unterhalb des Normalbereichs",
|
|
387
|
+
"Pump is running above the normal range": "Pumpe läuft oberhalb des Normalbereichs",
|
|
388
|
+
"Pump is outside the known range": "Pumpe außerhalb des bekannten Bereichs",
|
|
389
|
+
"Pump learning values reset": "Pumpen-Lernwerte zurückgesetzt",
|
|
390
|
+
"Time control active": "Zeitsteuerung aktiv",
|
|
391
|
+
"Interval mode active": "Intervallbetrieb aktiv",
|
|
392
|
+
"Another time window keeps the pump running": "Ein anderes Zeitfenster hält die Pumpe in Betrieb",
|
|
393
|
+
"Invalid interval configuration": "Ungültige Intervallkonfiguration"
|
|
385
394
|
}
|
package/lib/i18n/en.json
CHANGED
|
@@ -408,5 +408,14 @@
|
|
|
408
408
|
"circulation_plausibility_flow_warning": "Calculated flow rate is implausibly high compared to the configured nominal flow.",
|
|
409
409
|
"circulation_plausibility_daily_total_jump_warning": "Daily circulation volume increased faster than physically plausible.",
|
|
410
410
|
"circulation_plausibility_multiple_warnings": "Multiple circulation plausibility warnings are active.",
|
|
411
|
-
"circulation_plausibility_disabled": "Circulation plausibility check is disabled."
|
|
411
|
+
"circulation_plausibility_disabled": "Circulation plausibility check is disabled.",
|
|
412
|
+
"Pump is running within the normal range": "Pump is running within the normal range",
|
|
413
|
+
"Pump is running below the normal range": "Pump is running below the normal range",
|
|
414
|
+
"Pump is running above the normal range": "Pump is running above the normal range",
|
|
415
|
+
"Pump is outside the known range": "Pump is outside the known range",
|
|
416
|
+
"Pump learning values reset": "Pump learning values reset",
|
|
417
|
+
"Time control active": "Time control active",
|
|
418
|
+
"Interval mode active": "Interval mode active",
|
|
419
|
+
"Another time window keeps the pump running": "Another time window keeps the pump running",
|
|
420
|
+
"Invalid interval configuration": "Invalid interval configuration"
|
|
412
421
|
}
|
package/lib/i18n/es.json
CHANGED
|
@@ -404,6 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "El caudal calculado es excesivo en relación con el caudal nominal configurado.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "El volumen diario de circulación ha aumentado más rápido de lo físicamente plausible.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Hay varias advertencias de plausibilidad de circulación activas.",
|
|
407
|
-
"circulation_plausibility_disabled": "La comprobación de plausibilidad de la circulación está desactivada."
|
|
407
|
+
"circulation_plausibility_disabled": "La comprobación de plausibilidad de la circulación está desactivada.",
|
|
408
|
+
"Pump is running within the normal range": "La bomba funciona dentro del rango normal",
|
|
409
|
+
"Pump is running below the normal range": "La bomba funciona por debajo del rango normal",
|
|
410
|
+
"Pump is running above the normal range": "La bomba funciona por encima del rango normal",
|
|
411
|
+
"Pump is outside the known range": "La bomba está fuera del rango conocido",
|
|
412
|
+
"Pump learning values reset": "Valores de aprendizaje de la bomba restablecidos",
|
|
413
|
+
"Time control active": "Control horario activo",
|
|
414
|
+
"Interval mode active": "Modo de intervalo activo",
|
|
415
|
+
"Another time window keeps the pump running": "Otra franja horaria mantiene la bomba en funcionamiento",
|
|
416
|
+
"Invalid interval configuration": "Configuración de intervalo no válida"
|
|
408
417
|
}
|
|
409
|
-
|
package/lib/i18n/fr.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "Le débit calculé est anormalement élevé par rapport au débit nominal configuré.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "Le volume quotidien de circulation a augmenté plus rapidement que physiquement plausible.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Plusieurs avertissements de plausibilité de circulation sont actifs.",
|
|
407
|
-
"circulation_plausibility_disabled": "La vérification de plausibilité de la circulation est désactivée."
|
|
407
|
+
"circulation_plausibility_disabled": "La vérification de plausibilité de la circulation est désactivée.",
|
|
408
|
+
"Pump is running within the normal range": "La pompe fonctionne dans la plage normale",
|
|
409
|
+
"Pump is running below the normal range": "La pompe fonctionne en dessous de la plage normale",
|
|
410
|
+
"Pump is running above the normal range": "La pompe fonctionne au-dessus de la plage normale",
|
|
411
|
+
"Pump is outside the known range": "La pompe est hors de la plage connue",
|
|
412
|
+
"Pump learning values reset": "Valeurs d’apprentissage de la pompe réinitialisées",
|
|
413
|
+
"Time control active": "Commande horaire active",
|
|
414
|
+
"Interval mode active": "Mode intervalle actif",
|
|
415
|
+
"Another time window keeps the pump running": "Une autre plage horaire maintient la pompe en marche",
|
|
416
|
+
"Invalid interval configuration": "Configuration d’intervalle non valide"
|
|
408
417
|
}
|
package/lib/i18n/it.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "La portata calcolata è eccessivamente alta rispetto alla portata nominale configurata.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "Il volume giornaliero di circolazione è aumentato più velocemente di quanto fisicamente plausibile.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Sono attivi più avvisi di plausibilità della circolazione.",
|
|
407
|
-
"circulation_plausibility_disabled": "Il controllo di plausibilità della circolazione è disattivato."
|
|
407
|
+
"circulation_plausibility_disabled": "Il controllo di plausibilità della circolazione è disattivato.",
|
|
408
|
+
"Pump is running within the normal range": "La pompa funziona nell’intervallo normale",
|
|
409
|
+
"Pump is running below the normal range": "La pompa funziona al di sotto dell’intervallo normale",
|
|
410
|
+
"Pump is running above the normal range": "La pompa funziona al di sopra dell’intervallo normale",
|
|
411
|
+
"Pump is outside the known range": "La pompa è fuori dall’intervallo noto",
|
|
412
|
+
"Pump learning values reset": "Valori di apprendimento della pompa reimpostati",
|
|
413
|
+
"Time control active": "Controllo orario attivo",
|
|
414
|
+
"Interval mode active": "Modalità intervallo attiva",
|
|
415
|
+
"Another time window keeps the pump running": "Un’altra fascia oraria mantiene la pompa in funzione",
|
|
416
|
+
"Invalid interval configuration": "Configurazione dell’intervallo non valida"
|
|
408
417
|
}
|
package/lib/i18n/nl.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "Het berekende debiet is onwaarschijnlijk hoog ten opzichte van het ingestelde nominale debiet.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "Het dagelijkse circulatievolume is sneller gestegen dan fysiek plausibel.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Er zijn meerdere waarschuwingen voor circulatie-plausibiliteit actief.",
|
|
407
|
-
"circulation_plausibility_disabled": "De plausibiliteitscontrole van de circulatie is uitgeschakeld."
|
|
407
|
+
"circulation_plausibility_disabled": "De plausibiliteitscontrole van de circulatie is uitgeschakeld.",
|
|
408
|
+
"Pump is running within the normal range": "De pomp draait binnen het normale bereik",
|
|
409
|
+
"Pump is running below the normal range": "De pomp draait onder het normale bereik",
|
|
410
|
+
"Pump is running above the normal range": "De pomp draait boven het normale bereik",
|
|
411
|
+
"Pump is outside the known range": "De pomp valt buiten het bekende bereik",
|
|
412
|
+
"Pump learning values reset": "Geleerde pompwaarden gereset",
|
|
413
|
+
"Time control active": "Tijdregeling actief",
|
|
414
|
+
"Interval mode active": "Intervalmodus actief",
|
|
415
|
+
"Another time window keeps the pump running": "Een ander tijdvenster houdt de pomp in werking",
|
|
416
|
+
"Invalid interval configuration": "Ongeldige intervalconfiguratie"
|
|
408
417
|
}
|
package/lib/i18n/pl.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "Obliczony przepływ jest nienaturalnie wysoki względem skonfigurowanego przepływu nominalnego.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "Dzienna objętość obiegu wzrosła szybciej niż jest to fizycznie możliwe.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Aktywnych jest kilka ostrzeżeń dotyczących wiarygodności obiegu.",
|
|
407
|
-
"circulation_plausibility_disabled": "Kontrola wiarygodności obiegu jest wyłączona."
|
|
407
|
+
"circulation_plausibility_disabled": "Kontrola wiarygodności obiegu jest wyłączona.",
|
|
408
|
+
"Pump is running within the normal range": "Pompa pracuje w normalnym zakresie",
|
|
409
|
+
"Pump is running below the normal range": "Pompa pracuje poniżej normalnego zakresu",
|
|
410
|
+
"Pump is running above the normal range": "Pompa pracuje powyżej normalnego zakresu",
|
|
411
|
+
"Pump is outside the known range": "Pompa jest poza znanym zakresem",
|
|
412
|
+
"Pump learning values reset": "Wyuczone wartości pompy zresetowane",
|
|
413
|
+
"Time control active": "Sterowanie czasowe aktywne",
|
|
414
|
+
"Interval mode active": "Tryb interwałowy aktywny",
|
|
415
|
+
"Another time window keeps the pump running": "Inne okno czasowe podtrzymuje pracę pompy",
|
|
416
|
+
"Invalid interval configuration": "Nieprawidłowa konfiguracja interwału"
|
|
408
417
|
}
|
package/lib/i18n/pt.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "O caudal calculado é excessivamente elevado em relação ao caudal nominal configurado.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "O volume diário de circulação aumentou mais rapidamente do que seria fisicamente plausível.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Existem vários avisos de plausibilidade da circulação ativos.",
|
|
407
|
-
"circulation_plausibility_disabled": "A verificação de plausibilidade da circulação está desativada."
|
|
407
|
+
"circulation_plausibility_disabled": "A verificação de plausibilidade da circulação está desativada.",
|
|
408
|
+
"Pump is running within the normal range": "A bomba está a funcionar dentro do intervalo normal",
|
|
409
|
+
"Pump is running below the normal range": "A bomba está a funcionar abaixo do intervalo normal",
|
|
410
|
+
"Pump is running above the normal range": "A bomba está a funcionar acima do intervalo normal",
|
|
411
|
+
"Pump is outside the known range": "A bomba está fora do intervalo conhecido",
|
|
412
|
+
"Pump learning values reset": "Valores aprendidos da bomba redefinidos",
|
|
413
|
+
"Time control active": "Controlo de tempo ativo",
|
|
414
|
+
"Interval mode active": "Modo de intervalo ativo",
|
|
415
|
+
"Another time window keeps the pump running": "Outra janela de tempo mantém a bomba em funcionamento",
|
|
416
|
+
"Invalid interval configuration": "Configuração de intervalo inválida"
|
|
408
417
|
}
|
package/lib/i18n/ru.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "Расчётный поток слишком велик по сравнению с настроенным номинальным потоком.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "Суточный объём циркуляции увеличился быстрее, чем это физически возможно.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Активны несколько предупреждений проверки достоверности циркуляции.",
|
|
407
|
-
"circulation_plausibility_disabled": "Проверка достоверности циркуляции отключена."
|
|
407
|
+
"circulation_plausibility_disabled": "Проверка достоверности циркуляции отключена.",
|
|
408
|
+
"Pump is running within the normal range": "Насос работает в нормальном диапазоне",
|
|
409
|
+
"Pump is running below the normal range": "Насос работает ниже нормального диапазона",
|
|
410
|
+
"Pump is running above the normal range": "Насос работает выше нормального диапазона",
|
|
411
|
+
"Pump is outside the known range": "Насос вне известного диапазона",
|
|
412
|
+
"Pump learning values reset": "Обученные значения насоса сброшены",
|
|
413
|
+
"Time control active": "Управление по времени активно",
|
|
414
|
+
"Interval mode active": "Интервальный режим активен",
|
|
415
|
+
"Another time window keeps the pump running": "Другое временное окно поддерживает работу насоса",
|
|
416
|
+
"Invalid interval configuration": "Недопустимая конфигурация интервала"
|
|
408
417
|
}
|
package/lib/i18n/uk.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "Розрахований потік надто високий відносно налаштованого номінального потоку.",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "Добовий обсяг циркуляції збільшився швидше, ніж це фізично можливо.",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "Активні кілька попереджень перевірки правдоподібності циркуляції.",
|
|
407
|
-
"circulation_plausibility_disabled": "Перевірку правдоподібності циркуляції вимкнено."
|
|
407
|
+
"circulation_plausibility_disabled": "Перевірку правдоподібності циркуляції вимкнено.",
|
|
408
|
+
"Pump is running within the normal range": "Насос працює в нормальному діапазоні",
|
|
409
|
+
"Pump is running below the normal range": "Насос працює нижче нормального діапазону",
|
|
410
|
+
"Pump is running above the normal range": "Насос працює вище нормального діапазону",
|
|
411
|
+
"Pump is outside the known range": "Насос поза відомим діапазоном",
|
|
412
|
+
"Pump learning values reset": "Навчені значення насоса скинуто",
|
|
413
|
+
"Time control active": "Керування за часом активне",
|
|
414
|
+
"Interval mode active": "Інтервальний режим активний",
|
|
415
|
+
"Another time window keeps the pump running": "Інше часове вікно підтримує роботу насоса",
|
|
416
|
+
"Invalid interval configuration": "Неприпустима конфігурація інтервалу"
|
|
408
417
|
}
|
package/lib/i18n/zh-cn.json
CHANGED
|
@@ -404,5 +404,14 @@
|
|
|
404
404
|
"circulation_plausibility_flow_warning": "计算出的流量相对于配置的额定流量异常偏高。",
|
|
405
405
|
"circulation_plausibility_daily_total_jump_warning": "每日循环量增长速度超过物理合理范围。",
|
|
406
406
|
"circulation_plausibility_multiple_warnings": "存在多个循环合理性警告。",
|
|
407
|
-
"circulation_plausibility_disabled": "循环合理性检查已禁用。"
|
|
407
|
+
"circulation_plausibility_disabled": "循环合理性检查已禁用。",
|
|
408
|
+
"Pump is running within the normal range": "水泵在正常范围内运行",
|
|
409
|
+
"Pump is running below the normal range": "水泵低于正常范围运行",
|
|
410
|
+
"Pump is running above the normal range": "水泵高于正常范围运行",
|
|
411
|
+
"Pump is outside the known range": "水泵超出已知范围",
|
|
412
|
+
"Pump learning values reset": "水泵学习值已重置",
|
|
413
|
+
"Time control active": "时间控制已启用",
|
|
414
|
+
"Interval mode active": "间歇模式已启用",
|
|
415
|
+
"Another time window keeps the pump running": "另一个时间窗口使水泵保持运行",
|
|
416
|
+
"Invalid interval configuration": "间隔配置无效"
|
|
408
417
|
}
|
|
@@ -390,6 +390,170 @@ async function createControlStates(adapter) {
|
|
|
390
390
|
await adapter.setStateAsync('control.circulation.check_time', { val: '18:00', ack: true });
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
+
// Temperaturabhängiger Umwälzfaktor
|
|
394
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor', {
|
|
395
|
+
type: 'channel',
|
|
396
|
+
common: {
|
|
397
|
+
name: {
|
|
398
|
+
en: 'Temperature-dependent circulation factor',
|
|
399
|
+
de: 'Temperaturabhaengiger Umwaelzfaktor',
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
native: {},
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor.enabled', {
|
|
406
|
+
type: 'state',
|
|
407
|
+
common: {
|
|
408
|
+
name: {
|
|
409
|
+
en: 'Enable temperature-dependent circulation factor',
|
|
410
|
+
de: 'Temperaturabhaengigen Umwaelzfaktor aktivieren',
|
|
411
|
+
},
|
|
412
|
+
desc: {
|
|
413
|
+
en: 'Adds the configured factor to the daily circulation factor when the temperature threshold is reached',
|
|
414
|
+
de: 'Addiert den eingestellten Faktor zum taeglichen Umwaelzfaktor, wenn die Temperaturschwelle erreicht ist',
|
|
415
|
+
},
|
|
416
|
+
type: 'boolean',
|
|
417
|
+
role: 'switch',
|
|
418
|
+
read: true,
|
|
419
|
+
write: true,
|
|
420
|
+
def: false,
|
|
421
|
+
persist: true,
|
|
422
|
+
},
|
|
423
|
+
native: {},
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor.sensor', {
|
|
427
|
+
type: 'state',
|
|
428
|
+
common: {
|
|
429
|
+
name: {
|
|
430
|
+
en: 'Temperature sensor for circulation factor',
|
|
431
|
+
de: 'Temperatursensor fuer Umwaelzfaktor',
|
|
432
|
+
},
|
|
433
|
+
desc: {
|
|
434
|
+
en: 'Selects the temperature sensor used for the temperature-dependent circulation factor',
|
|
435
|
+
de: 'Waehlt den Temperatursensor fuer den temperaturabhaengigen Umwaelzfaktor aus',
|
|
436
|
+
},
|
|
437
|
+
type: 'string',
|
|
438
|
+
role: 'level',
|
|
439
|
+
read: true,
|
|
440
|
+
write: true,
|
|
441
|
+
def: 'surface',
|
|
442
|
+
persist: true,
|
|
443
|
+
states: {
|
|
444
|
+
surface: 'Surface',
|
|
445
|
+
ground: 'Ground',
|
|
446
|
+
flow: 'Flow',
|
|
447
|
+
return: 'Return',
|
|
448
|
+
collector: 'Collector',
|
|
449
|
+
outside: 'Outside',
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
native: {},
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor.threshold_c', {
|
|
456
|
+
type: 'state',
|
|
457
|
+
common: {
|
|
458
|
+
name: { en: 'Temperature threshold', de: 'Temperaturschwelle' },
|
|
459
|
+
desc: {
|
|
460
|
+
en: 'Temperature from which the additional circulation factor is applied',
|
|
461
|
+
de: 'Temperatur, ab der der zusaetzliche Umwaelzfaktor angewendet wird',
|
|
462
|
+
},
|
|
463
|
+
type: 'number',
|
|
464
|
+
role: 'level.temperature',
|
|
465
|
+
unit: '°C',
|
|
466
|
+
read: true,
|
|
467
|
+
write: true,
|
|
468
|
+
def: 28,
|
|
469
|
+
min: -20,
|
|
470
|
+
max: 60,
|
|
471
|
+
step: 0.5,
|
|
472
|
+
persist: true,
|
|
473
|
+
},
|
|
474
|
+
native: {},
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor.add_factor', {
|
|
478
|
+
type: 'state',
|
|
479
|
+
common: {
|
|
480
|
+
name: { en: 'Additional circulation factor', de: 'Zusaetzlicher Umwaelzfaktor' },
|
|
481
|
+
desc: {
|
|
482
|
+
en: 'Factor added to the base circulation factor when the temperature threshold is reached',
|
|
483
|
+
de: 'Faktor, der beim Erreichen der Temperaturschwelle zum Basis-Umwaelzfaktor addiert wird',
|
|
484
|
+
},
|
|
485
|
+
type: 'number',
|
|
486
|
+
role: 'level',
|
|
487
|
+
unit: 'x',
|
|
488
|
+
read: true,
|
|
489
|
+
write: true,
|
|
490
|
+
def: 0.5,
|
|
491
|
+
min: 0,
|
|
492
|
+
max: 2.5,
|
|
493
|
+
step: 0.1,
|
|
494
|
+
persist: true,
|
|
495
|
+
},
|
|
496
|
+
native: {},
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor.active', {
|
|
500
|
+
type: 'state',
|
|
501
|
+
common: {
|
|
502
|
+
name: {
|
|
503
|
+
en: 'Temperature-dependent circulation factor active',
|
|
504
|
+
de: 'Temperaturabhaengiger Umwaelzfaktor aktiv',
|
|
505
|
+
},
|
|
506
|
+
desc: {
|
|
507
|
+
en: 'Shows whether the additional temperature-dependent circulation factor is currently applied',
|
|
508
|
+
de: 'Zeigt, ob der zusaetzliche temperaturabhaengige Umwaelzfaktor aktuell angewendet wird',
|
|
509
|
+
},
|
|
510
|
+
type: 'boolean',
|
|
511
|
+
role: 'indicator',
|
|
512
|
+
read: true,
|
|
513
|
+
write: false,
|
|
514
|
+
def: false,
|
|
515
|
+
},
|
|
516
|
+
native: {},
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
await adapter.setObjectNotExistsAsync('control.circulation.temperature_factor.status', {
|
|
520
|
+
type: 'state',
|
|
521
|
+
common: {
|
|
522
|
+
name: {
|
|
523
|
+
en: 'Temperature-dependent circulation factor status',
|
|
524
|
+
de: 'Status des temperaturabhaengigen Umwaelzfaktors',
|
|
525
|
+
},
|
|
526
|
+
desc: {
|
|
527
|
+
en: 'Technical status of the temperature-dependent circulation factor',
|
|
528
|
+
de: 'Technischer Status des temperaturabhaengigen Umwaelzfaktors',
|
|
529
|
+
},
|
|
530
|
+
type: 'string',
|
|
531
|
+
role: 'text',
|
|
532
|
+
read: true,
|
|
533
|
+
write: false,
|
|
534
|
+
def: 'disabled',
|
|
535
|
+
},
|
|
536
|
+
native: {},
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
const temperatureFactorDefaults = {
|
|
540
|
+
enabled: false,
|
|
541
|
+
sensor: 'surface',
|
|
542
|
+
threshold_c: 28,
|
|
543
|
+
add_factor: 0.5,
|
|
544
|
+
active: false,
|
|
545
|
+
status: 'disabled',
|
|
546
|
+
};
|
|
547
|
+
for (const [stateId, defaultValue] of Object.entries(temperatureFactorDefaults)) {
|
|
548
|
+
const existingState = await adapter.getStateAsync(`control.circulation.temperature_factor.${stateId}`);
|
|
549
|
+
if (existingState === null || existingState.val === null || existingState.val === undefined) {
|
|
550
|
+
await adapter.setStateAsync(`control.circulation.temperature_factor.${stateId}`, {
|
|
551
|
+
val: defaultValue,
|
|
552
|
+
ack: true,
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
393
557
|
// letzter Bericht
|
|
394
558
|
await adapter.setObjectNotExistsAsync('control.circulation.last_report', {
|
|
395
559
|
type: 'state',
|
|
@@ -54,22 +54,113 @@ async function createGeneralStates(adapter) {
|
|
|
54
54
|
de: 'Min. Umwaelzung pro Tag',
|
|
55
55
|
},
|
|
56
56
|
desc: {
|
|
57
|
-
en: '
|
|
58
|
-
de: '
|
|
57
|
+
en: 'Effective minimum circulation count per day. The admin value is used only as an initial value if this state is empty or invalid.',
|
|
58
|
+
de: 'Wirksame minimale Umwaelzung pro Tag. Der Admin-Wert wird nur als Initialwert verwendet, wenn dieser State leer oder ungueltig ist.',
|
|
59
|
+
},
|
|
60
|
+
type: 'number',
|
|
61
|
+
role: 'value',
|
|
62
|
+
unit: 'x',
|
|
63
|
+
read: true,
|
|
64
|
+
write: true,
|
|
65
|
+
min: 0.5,
|
|
66
|
+
max: 3,
|
|
67
|
+
step: 0.5,
|
|
68
|
+
persist: true,
|
|
69
|
+
},
|
|
70
|
+
native: {},
|
|
71
|
+
});
|
|
72
|
+
await adapter.extendObjectAsync('general.min_circulation_per_day', {
|
|
73
|
+
common: {
|
|
74
|
+
write: true,
|
|
75
|
+
min: 0.5,
|
|
76
|
+
max: 3,
|
|
77
|
+
step: 0.5,
|
|
78
|
+
persist: true,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const normalizeMinCirculation = value => {
|
|
83
|
+
const num = Number(value);
|
|
84
|
+
return Number.isFinite(num) && num >= 0.5 && num <= 3 ? num : null;
|
|
85
|
+
};
|
|
86
|
+
const configMinCirculation = normalizeMinCirculation(adapter.config.min_circulation_per_day) ?? 1;
|
|
87
|
+
const existingMinCirculation = normalizeMinCirculation(
|
|
88
|
+
(await adapter.getStateAsync('general.min_circulation_per_day'))?.val,
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
if (existingMinCirculation === null) {
|
|
92
|
+
await adapter.setStateAsync('general.min_circulation_per_day', {
|
|
93
|
+
val: configMinCirculation,
|
|
94
|
+
ack: true,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
await adapter.setObjectNotExistsAsync('general.min_circulation_effective_per_day', {
|
|
99
|
+
type: 'state',
|
|
100
|
+
common: {
|
|
101
|
+
name: {
|
|
102
|
+
en: 'Effective minimum circulation per day',
|
|
103
|
+
de: 'Wirksame minimale Umwaelzung pro Tag',
|
|
104
|
+
},
|
|
105
|
+
desc: {
|
|
106
|
+
en: 'Currently effective circulation factor including the optional temperature-dependent addition',
|
|
107
|
+
de: 'Aktuell wirksamer Umwaelzfaktor inklusive der optionalen temperaturabhaengigen Erhoehung',
|
|
59
108
|
},
|
|
60
109
|
type: 'number',
|
|
61
110
|
role: 'value',
|
|
62
111
|
unit: 'x',
|
|
63
112
|
read: true,
|
|
64
113
|
write: false,
|
|
114
|
+
def: configMinCirculation,
|
|
115
|
+
min: 0.5,
|
|
116
|
+
max: 3,
|
|
117
|
+
step: 0.1,
|
|
118
|
+
persist: true,
|
|
65
119
|
},
|
|
66
120
|
native: {},
|
|
67
121
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
122
|
+
|
|
123
|
+
await adapter.setObjectNotExistsAsync('general.min_circulation_effective_reason', {
|
|
124
|
+
type: 'state',
|
|
125
|
+
common: {
|
|
126
|
+
name: {
|
|
127
|
+
en: 'Reason for effective minimum circulation',
|
|
128
|
+
de: 'Grund fuer wirksame minimale Umwaelzung',
|
|
129
|
+
},
|
|
130
|
+
desc: {
|
|
131
|
+
en: 'Technical reason for the currently effective circulation factor',
|
|
132
|
+
de: 'Technischer Grund fuer den aktuell wirksamen Umwaelzfaktor',
|
|
133
|
+
},
|
|
134
|
+
type: 'string',
|
|
135
|
+
role: 'text',
|
|
136
|
+
read: true,
|
|
137
|
+
write: false,
|
|
138
|
+
def: 'base',
|
|
139
|
+
},
|
|
140
|
+
native: {},
|
|
71
141
|
});
|
|
72
142
|
|
|
143
|
+
const existingEffectiveMinCirculation = await adapter.getStateAsync('general.min_circulation_effective_per_day');
|
|
144
|
+
if (
|
|
145
|
+
existingEffectiveMinCirculation === null ||
|
|
146
|
+
existingEffectiveMinCirculation.val === null ||
|
|
147
|
+
existingEffectiveMinCirculation.val === undefined
|
|
148
|
+
) {
|
|
149
|
+
await adapter.setStateAsync('general.min_circulation_effective_per_day', {
|
|
150
|
+
val: existingMinCirculation ?? configMinCirculation,
|
|
151
|
+
ack: true,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const existingEffectiveReason = await adapter.getStateAsync('general.min_circulation_effective_reason');
|
|
156
|
+
if (
|
|
157
|
+
existingEffectiveReason === null ||
|
|
158
|
+
existingEffectiveReason.val === null ||
|
|
159
|
+
existingEffectiveReason.val === undefined
|
|
160
|
+
) {
|
|
161
|
+
await adapter.setStateAsync('general.min_circulation_effective_reason', { val: 'base', ack: true });
|
|
162
|
+
}
|
|
163
|
+
|
|
73
164
|
// Poolgröße (Liter)
|
|
74
165
|
await adapter.setObjectNotExistsAsync('general.pool_size', {
|
|
75
166
|
type: 'state',
|
|
@@ -332,6 +332,30 @@ async function createPumpStates3(adapter) {
|
|
|
332
332
|
await adapter.setStateAsync('pump.learning.learning_cycles_total', { val: 0, ack: true });
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
+
// ------------------------------------------------------
|
|
336
|
+
// Reset der Pumpen-Lernwerte
|
|
337
|
+
// ------------------------------------------------------
|
|
338
|
+
await adapter.setObjectNotExistsAsync('pump.learning.reset', {
|
|
339
|
+
type: 'state',
|
|
340
|
+
common: {
|
|
341
|
+
name: {
|
|
342
|
+
en: 'Reset pump learning values',
|
|
343
|
+
de: 'Pumpen-Lernwerte zurücksetzen',
|
|
344
|
+
},
|
|
345
|
+
desc: {
|
|
346
|
+
en: 'Resets the learned pump power and flow values after a pump change or incorrect learning. User settings and live values are kept.',
|
|
347
|
+
de: 'Setzt die gelernten Pumpen-Leistungs- und Durchflusswerte nach einem Pumpenwechsel oder falschen Lernwerten zurück. Nutzereinstellungen und Livewerte bleiben erhalten.',
|
|
348
|
+
},
|
|
349
|
+
type: 'boolean',
|
|
350
|
+
role: 'button',
|
|
351
|
+
read: true,
|
|
352
|
+
write: true,
|
|
353
|
+
def: false,
|
|
354
|
+
persist: false,
|
|
355
|
+
},
|
|
356
|
+
native: {},
|
|
357
|
+
});
|
|
358
|
+
|
|
335
359
|
// ------------------------------------------------------
|
|
336
360
|
// Log-Eintrag
|
|
337
361
|
// ------------------------------------------------------
|