iobroker.poolcontrol 0.7.3 → 0.8.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 +54 -3
- package/admin/jsonConfig.json +96 -2
- package/io-package.json +27 -27
- package/lib/helpers/aiForecastHelper.js +448 -0
- package/lib/helpers/aiHelper.js +255 -55
- package/lib/stateDefinitions/aiStates.js +91 -27
- package/lib/stateDefinitions/controlStates.js +10 -1
- package/main.js +13 -3
- package/package.json +1 -1
|
@@ -277,7 +277,16 @@ async function createControlStates(adapter) {
|
|
|
277
277
|
} catch (err) {
|
|
278
278
|
adapter.log.warn(`[controlStates] persist-Flag für control.circulation.mode nicht gesetzt: ${err.message}`);
|
|
279
279
|
}
|
|
280
|
-
|
|
280
|
+
|
|
281
|
+
// FIX: Default nur setzen, wenn noch kein Wert existiert (Überinstall-Schutz)
|
|
282
|
+
const existingCirculationMode = await adapter.getStateAsync('control.circulation.mode');
|
|
283
|
+
if (
|
|
284
|
+
existingCirculationMode === null ||
|
|
285
|
+
existingCirculationMode.val === null ||
|
|
286
|
+
existingCirculationMode.val === undefined
|
|
287
|
+
) {
|
|
288
|
+
await adapter.setStateAsync('control.circulation.mode', { val: 'notify', ack: true });
|
|
289
|
+
}
|
|
281
290
|
|
|
282
291
|
// Prüfzeitpunkt (mit Persist-Schutz)
|
|
283
292
|
await adapter.setObjectNotExistsAsync('control.circulation.check_time', {
|
package/main.js
CHANGED
|
@@ -22,6 +22,7 @@ const frostHelper = require('./lib/helpers/frostHelper');
|
|
|
22
22
|
const statusHelper = require('./lib/helpers/statusHelper');
|
|
23
23
|
const photovoltaicHelper = require('./lib/helpers/photovoltaicHelper');
|
|
24
24
|
const aiHelper = require('./lib/helpers/aiHelper');
|
|
25
|
+
const aiForecastHelper = require('./lib/helpers/aiForecastHelper');
|
|
25
26
|
const controlHelper = require('./lib/helpers/controlHelper');
|
|
26
27
|
const controlHelper2 = require('./lib/helpers/controlHelper2');
|
|
27
28
|
const debugLogHelper = require('./lib/helpers/debugLogHelper');
|
|
@@ -133,7 +134,8 @@ class Poolcontrol extends utils.Adapter {
|
|
|
133
134
|
consumptionHelper.init(this);
|
|
134
135
|
solarHelper.init(this);
|
|
135
136
|
photovoltaicHelper.init(this);
|
|
136
|
-
|
|
137
|
+
aiHelper.init(this);
|
|
138
|
+
aiForecastHelper.init(this);
|
|
137
139
|
frostHelper.init(this);
|
|
138
140
|
statusHelper.init(this);
|
|
139
141
|
infoHelper.init(this);
|
|
@@ -193,9 +195,12 @@ class Poolcontrol extends utils.Adapter {
|
|
|
193
195
|
if (speechTextHelper.cleanup) {
|
|
194
196
|
speechTextHelper.cleanup();
|
|
195
197
|
}
|
|
196
|
-
|
|
198
|
+
if (aiHelper.cleanup) {
|
|
197
199
|
aiHelper.cleanup();
|
|
198
200
|
}
|
|
201
|
+
if (aiForecastHelper.cleanup) {
|
|
202
|
+
aiForecastHelper.cleanup();
|
|
203
|
+
}
|
|
199
204
|
if (infoHelper.cleanup) {
|
|
200
205
|
infoHelper.cleanup();
|
|
201
206
|
}
|
|
@@ -267,12 +272,17 @@ class Poolcontrol extends utils.Adapter {
|
|
|
267
272
|
} catch (e) {
|
|
268
273
|
this.log.warn(`[photovoltaicHelper] Fehler in handleStateChange: ${e.message}`);
|
|
269
274
|
}
|
|
270
|
-
|
|
275
|
+
// --- AI-Helper ---
|
|
271
276
|
try {
|
|
272
277
|
aiHelper.handleStateChange(id, state);
|
|
273
278
|
} catch (e) {
|
|
274
279
|
this.log.warn(`[main] Fehler in aiHelper.handleStateChange: ${e.message}`);
|
|
275
280
|
}
|
|
281
|
+
try {
|
|
282
|
+
aiForecastHelper.handleStateChange(id, state);
|
|
283
|
+
} catch (e) {
|
|
284
|
+
this.log.warn(`[main] Fehler in aiForecastHelper.handleStateChange: ${e.message}`);
|
|
285
|
+
}
|
|
276
286
|
try {
|
|
277
287
|
statusHelper.handleStateChange(id, state);
|
|
278
288
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.poolcontrol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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",
|