iobroker.poolcontrol 0.1.0 → 0.1.2
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 +10 -6
- package/admin/jsonConfig.json +0 -1
- package/io-package.json +27 -14
- package/lib/helpers/pumpHelper.js +15 -9
- package/lib/helpers/temperatureHelper.js +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,6 +94,16 @@ Funktionen können sich ändern, bitte regelmäßig den Changelog beachten.
|
|
|
94
94
|
## Changelog
|
|
95
95
|
Auszug, vollständige Liste siehe `io-package.json`:
|
|
96
96
|
|
|
97
|
+
### 0.1.2
|
|
98
|
+
- Verbesserung: Beim Adapterstart werden nun die letzten bekannten Temperaturwerte aller aktiven Sensoren (z. B. Oberfläche, Kollektor, Außentemperatur usw.) automatisch übernommen.
|
|
99
|
+
- Dadurch werden auch Sensoren korrekt angezeigt, die ihren Messwert nur selten aktualisieren (z. B. Homematic oder stromsparende Funk-Sensoren).
|
|
100
|
+
- Keine Änderung am Verhalten der restlichen Logik, reine Komfort- und Stabilitätsverbesserung.
|
|
101
|
+
|
|
102
|
+
### 0.1.1
|
|
103
|
+
- Fehlerbehebung: Endlosschleife zwischen `pump_switch` und externer Steckdose (`deviceId`) behoben, die bei bestimmten Smart-Steckdosen (z. B. Shelly, Tasmota, FritzDECT) auftreten konnte.
|
|
104
|
+
- Verbesserte Stabilität im `pumpHelper` durch interne Rückkopplungsprüfung.
|
|
105
|
+
- Keine Änderungen an bestehenden Konfigurationen erforderlich.
|
|
106
|
+
|
|
97
107
|
### 0.1.0
|
|
98
108
|
- Sprachausgabe über **E-Mail** hinzugefügt (konfigurierbar: Instanz, Empfänger, Betreff).
|
|
99
109
|
- Erweiterung der Instanz-Konfiguration im Tab „Sprachausgaben“.
|
|
@@ -131,12 +141,6 @@ Diese Datenpunkte sind besonders für **VIS/vis2, Alexa- oder Telegram-Ausgaben*
|
|
|
131
141
|
### 0.0.7
|
|
132
142
|
- Help-Datei (`help.md`) und erste README-Version hinzugefügt
|
|
133
143
|
|
|
134
|
-
### 0.0.6
|
|
135
|
-
- Verbrauchs- und Kostenberechnung mit externem kWh-Zähler
|
|
136
|
-
|
|
137
|
-
### 0.0.5
|
|
138
|
-
- Sprachausgabe über Alexa und Telegram
|
|
139
|
-
|
|
140
144
|
### 0.0.1
|
|
141
145
|
- initial release
|
|
142
146
|
|
package/admin/jsonConfig.json
CHANGED
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "poolcontrol",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.1.2": {
|
|
7
|
+
"en": "Improved: The last known temperature values of all active sensors are now read at adapter start. Sensors that report rarely are now displayed correctly.",
|
|
8
|
+
"de": "Verbesserung: Beim Adapterstart werden nun die letzten bekannten Temperaturwerte aller aktiven Sensoren übernommen. Sensoren, die nur selten Werte senden, werden jetzt korrekt angezeigt.",
|
|
9
|
+
"ru": "Улучшение: При запуске адаптера теперь считываются последние известные значения температуры всех активных датчиков.",
|
|
10
|
+
"pt": "Melhoria: Os últimos valores de temperatura conhecidos de todos os sensores ativos agora são lidos ao iniciar o adaptador.",
|
|
11
|
+
"nl": "Verbetering: Bij het starten van de adapter worden nu de laatst bekende temperatuurwaarden van alle actieve sensoren opgehaald.",
|
|
12
|
+
"fr": "Amélioration : les dernières valeurs de température connues de tous les capteurs actifs sont désormais lues au démarrage de l’adaptateur.",
|
|
13
|
+
"it": "Miglioramento: all'avvio dell'adattatore vengono ora letti gli ultimi valori di temperatura noti di tutti i sensori attivi.",
|
|
14
|
+
"es": "Mejora: ahora se leen al iniciar el adaptador los últimos valores de temperatura conocidos de todos los sensores activos.",
|
|
15
|
+
"pl": "Ulepszenie: podczas uruchamiania adaptera odczytywane są ostatnie znane wartości temperatury wszystkich aktywnych czujników.",
|
|
16
|
+
"uk": "Покращення: під час запуску адаптера тепер зчитуються останні відомі значення температури всіх активних датчиків.",
|
|
17
|
+
"zh-cn": "改进:适配器启动时现在会读取所有活动传感器的最后已知温度值。"
|
|
18
|
+
},
|
|
19
|
+
"0.1.1": {
|
|
20
|
+
"en": "Fixed endless loop between pump_switch and deviceId for some smart sockets",
|
|
21
|
+
"de": "Endlosschleife zwischen pump_switch und Steckdose (deviceId) behoben",
|
|
22
|
+
"ru": "Исправлен бесконечный цикл между pump_switch и deviceId для некоторых умных розеток",
|
|
23
|
+
"pt": "Corrigido loop infinito entre pump_switch e deviceId em algumas tomadas inteligentes",
|
|
24
|
+
"nl": "Eindeloze lus tussen pump_switch en deviceId voor sommige slimme stopcontacten opgelost",
|
|
25
|
+
"fr": "Correction d'une boucle infinie entre pump_switch et deviceId pour certaines prises intelligentes",
|
|
26
|
+
"it": "Corretto loop infinito tra pump_switch e deviceId per alcune prese intelligenti",
|
|
27
|
+
"es": "Corregido bucle infinito entre pump_switch y deviceId en algunos enchufes inteligentes",
|
|
28
|
+
"pl": "Naprawiono nieskończoną pętlę między pump_switch a deviceId dla niektórych inteligentnych gniazdek",
|
|
29
|
+
"uk": "Виправлено нескінченний цикл між pump_switch і deviceId для деяких розумних розеток",
|
|
30
|
+
"zh-cn": "修复了某些智能插座中 pump_switch 与 deviceId 之间的无限循环"
|
|
31
|
+
},
|
|
6
32
|
"0.1.0": {
|
|
7
33
|
"en": "Added speech output via E-Mail (configurable: instance, recipient, subject)",
|
|
8
34
|
"de": "Sprachausgabe per E-Mail hinzugefügt (konfigurierbar: Instanz, Empfänger, Betreff)",
|
|
@@ -28,19 +54,6 @@
|
|
|
28
54
|
"pl": "Dodano rozszerzony przegląd statusu ze statystykami pompy, flagami systemowymi i podsumowaniem JSON",
|
|
29
55
|
"uk": "Додано розширений огляд статусу зі статистикою насоса, системними прапорцями та зведенням JSON",
|
|
30
56
|
"zh-cn": "新增扩展状态概览,包括泵统计、系统标志和 JSON 摘要"
|
|
31
|
-
},
|
|
32
|
-
"0.0.9": {
|
|
33
|
-
"en": "Made runtime, circulation, consumption/costs and temperature min/max states persistent across restarts",
|
|
34
|
-
"de": "Laufzeit-, Umwälz-, Verbrauch-/Kosten- und Temperatur-Min/Max-States bleiben jetzt über Neustarts erhalten",
|
|
35
|
-
"ru": "Состояния времени работы, циркуляции, потребления/стоимости и мин/макс температуры теперь сохраняются при перезапуске",
|
|
36
|
-
"pt": "Estados de tempo de execução, circulação, consumo/custos e temperatura min/máx agora persistem após reinicializações",
|
|
37
|
-
"nl": "Runtime-, circulatie-, verbruiks-/kosten- en temperatuur min/max-states blijven nu behouden bij herstart",
|
|
38
|
-
"fr": "Les états de durée, de circulation, de consommation/coûts et de température min/max persistent désormais après redémarrage",
|
|
39
|
-
"it": "Gli stati di runtime, circolazione, consumo/costi e temperatura min/max ora persistono ai riavvii",
|
|
40
|
-
"es": "Los estados de tiempo de ejecución, circulación, consumo/costos y temperatura min/máx ahora persisten tras reinicios",
|
|
41
|
-
"pl": "Stany czasu pracy, cyrkulacji, zużycia/kosztów i temp. min/max są teraz zachowane po restartach",
|
|
42
|
-
"uk": "Стан часу роботи, циркуляції, споживання/вартості та мін/макс температури тепер зберігаються після перезапусків",
|
|
43
|
-
"zh-cn": "运行时间、循环、消耗/成本和温度最小/最大状态现在在重启后保持"
|
|
44
57
|
}
|
|
45
58
|
},
|
|
46
59
|
"titleLang": {
|
|
@@ -112,22 +112,28 @@ const pumpHelper = {
|
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
// 2) Fremde Steckdose hat sich verändert → in unseren bool-Schalter spiegeln
|
|
115
|
+
// 2) Fremde Steckdose hat sich verändert → in unseren bool-Schalter spiegeln (mit Loop-Schutz)
|
|
116
116
|
if (this.deviceId && id === this.deviceId) {
|
|
117
117
|
const val = !!state.val;
|
|
118
|
-
await this.adapter.
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
const current = (await this.adapter.getStateAsync('pump.pump_switch'))?.val;
|
|
119
|
+
if (current !== val) {
|
|
120
|
+
await this.adapter.setStateAsync('pump.pump_switch', { val, ack: true });
|
|
121
|
+
await this._updateStatus();
|
|
122
|
+
await this._checkErrorConditions();
|
|
123
|
+
}
|
|
121
124
|
return;
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
// 3) Eigene Pumpen-States geändert
|
|
127
|
+
// 3) Eigene Pumpen-States geändert (mit Loop-Schutz bei Rückschreiben)
|
|
125
128
|
if (id.endsWith('pump.mode') || id.endsWith('pump.pump_switch') || id.endsWith('pump.error')) {
|
|
126
129
|
if (id.endsWith('pump.pump_switch') && this.deviceId) {
|
|
127
|
-
await this.adapter.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
const current = (await this.adapter.getForeignStateAsync(this.deviceId))?.val;
|
|
131
|
+
if (current !== !!state.val) {
|
|
132
|
+
await this.adapter.setForeignStateAsync(this.deviceId, {
|
|
133
|
+
val: !!state.val,
|
|
134
|
+
ack: false,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
await this._updateStatus();
|
|
@@ -30,6 +30,35 @@ const temperatureHelper = {
|
|
|
30
30
|
adapter.subscribeForeignStates(id);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// >>> NEU: Initialwerte aller aktiven Sensoren einlesen
|
|
34
|
+
(async () => {
|
|
35
|
+
for (const [key, id] of Object.entries(this.sensors)) {
|
|
36
|
+
try {
|
|
37
|
+
const state = await adapter.getForeignStateAsync(id);
|
|
38
|
+
if (state && state.val !== null && state.val !== undefined && !isNaN(Number(state.val))) {
|
|
39
|
+
const val = Number(state.val);
|
|
40
|
+
this.values[key] = val;
|
|
41
|
+
await this._setCurrentValue(key, val);
|
|
42
|
+
await this._updateMinMax(key, val);
|
|
43
|
+
adapter.log.debug(`[temperatureHelper] Initialwert für ${key}: ${val} °C`);
|
|
44
|
+
} else {
|
|
45
|
+
adapter.log.debug(`[temperatureHelper] Kein gültiger Initialwert für ${key}`);
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
adapter.log.warn(`[temperatureHelper] Fehler beim Initial-Read ${key}: ${err.message}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Nach Setzen der ersten Werte gleich Deltas prüfen
|
|
53
|
+
await this._maybeWriteDelta(
|
|
54
|
+
'temperature.delta.collector_outside',
|
|
55
|
+
this.values.collector,
|
|
56
|
+
this.values.outside,
|
|
57
|
+
);
|
|
58
|
+
await this._maybeWriteDelta('temperature.delta.surface_ground', this.values.surface, this.values.ground);
|
|
59
|
+
await this._maybeWriteDelta('temperature.delta.flow_return', this.values.flow, this.values.return);
|
|
60
|
+
})();
|
|
61
|
+
|
|
33
62
|
// >>> NEU: Alte Min/Max-Werte wiederherstellen
|
|
34
63
|
this._restoreMinMaxFromStates().catch(err =>
|
|
35
64
|
this.adapter.log.warn(`[temperatureHelper] Restore Min/Max fehlgeschlagen: ${err.message}`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.poolcontrol",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Steuerung & Automatisierung für den Pool (Pumpe, Heizung, Ventile, Sensoren).",
|
|
5
5
|
"author": "DasBo1975 <dasbo1975@outlook.de>",
|
|
6
6
|
"homepage": "https://github.com/DasBo1975/ioBroker.poolcontrol",
|