iobroker.poolcontrol 0.7.0 → 0.7.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/io-package.json +27 -26
- package/lib/helpers/infoHelper.js +159 -0
- package/lib/helpers/pumpHelper4.js +2 -2
- package/lib/stateDefinitions/infoStates.js +63 -0
- package/main.js +9 -0
- package/package.json +1 -1
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "poolcontrol",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.7.2": {
|
|
7
|
+
"en": "Added new info system: The adapter now writes seasonal greetings and the installed adapter version to info.* states. Includes automatic daily refresh at 00:01 and full Easter date calculation.",
|
|
8
|
+
"de": "Neues Info-System hinzugefügt: Der Adapter schreibt nun saisonale Grüße und die installierte Adapterversion in die info.* States. Enthält eine automatische tägliche Aktualisierung um 00:01 sowie eine vollständige Oster-Berechnung.",
|
|
9
|
+
"ru": "Добавлена новая информационная система: адаптер теперь записывает сезонные поздравления и установленную версию адаптера в состояния info.*. Включает ежедневное обновление в 00:01 и полный расчёт даты Пасхи.",
|
|
10
|
+
"pt": "Novo sistema de informações adicionado: o adaptador agora grava saudações sazonais e a versão instalada do adaptador nos estados info.*. Inclui atualização diária automática às 00:01 e cálculo completo da data da Páscoa.",
|
|
11
|
+
"nl": "Nieuw infosysteem toegevoegd: de adapter schrijft nu seizoensgroeten en de geïnstalleerde adapterversie naar info.*-states. Inclusief automatische dagelijkse update om 00:01 en volledige berekening van Pasen.",
|
|
12
|
+
"fr": "Nouveau système d'informations ajouté : l'adaptateur écrit désormais des messages saisonniers et la version installée dans les états info.*. Comprend une mise à jour quotidienne automatique à 00:01 et un calcul complet de la date de Pâques.",
|
|
13
|
+
"it": "Aggiunto nuovo sistema informativo: l'adattatore ora scrive i saluti stagionali e la versione installata negli stati info.*. Include aggiornamento giornaliero automatico alle 00:01 e calcolo completo della data di Pasqua.",
|
|
14
|
+
"es": "Nuevo sistema de información añadido: el adaptador ahora escribe saludos estacionales y la versión instalada en los estados info.*. Incluye actualización automática diaria a las 00:01 y cálculo completo de la fecha de Pascua.",
|
|
15
|
+
"pl": "Dodano nowy system informacji: adapter zapisuje teraz sezonowe pozdrowienia oraz zainstalowaną wersję adaptera w stanach info.*. Zawiera automatyczne codzienne odświeżanie o 00:01 oraz pełne wyliczenie daty Wielkanocy.",
|
|
16
|
+
"uk": "Додано нову інформаційну систему: адаптер тепер записує сезонні привітання та встановлену версію адаптера в стани info.*. Містить щоденне автоматичне оновлення о 00:01 і повний розрахунок дати Великодня.",
|
|
17
|
+
"zh-cn": "新增信息系统:适配器现在会将季节性问候和已安装的适配器版本写入 info.* 状态。包括每天 00:01 的自动刷新和完整的复活节日期计算。"
|
|
18
|
+
},
|
|
19
|
+
"0.7.1": {
|
|
20
|
+
"en": "Fix for pressure sensor initialization: The adapter now correctly recognizes the configured sensor ID in pumpHelper4. Additionally improved handling of missing / invalid values.",
|
|
21
|
+
"de": "Fehlerbehebung bei der Drucksensor-Initialisierung: Der Adapter erkennt nun die konfigurierte Sensor-ID in pumpHelper4 korrekt. Außerdem wurde die Verarbeitung fehlender oder ungültiger Werte verbessert.",
|
|
22
|
+
"ru": "Исправление инициализации датчика давления: адаптер теперь корректно распознаёт настроенный идентификатор датчика в pumpHelper4. Улучшена обработка отсутствующих и недопустимых значений.",
|
|
23
|
+
"pt": "Correção na inicialização do sensor de pressão: o adaptador agora reconhece corretamente o ID configurado do sensor em pumpHelper4. Manipulação aprimorada de valores ausentes ou inválidos.",
|
|
24
|
+
"nl": "Foutoplossing voor de druksensor-initialisatie: de adapter herkent nu correct de geconfigureerde sensor-ID in pumpHelper4. Verbeterde verwerking van ontbrekende of ongeldige waarden.",
|
|
25
|
+
"fr": "Correction de l'initialisation du capteur de pression : l'adaptateur reconnaît désormais correctement l'ID du capteur configuré dans pumpHelper4. Amélioration du traitement des valeurs manquantes ou invalides.",
|
|
26
|
+
"it": "Correzione dell'inizializzazione del sensore di pressione: l'adattatore ora riconosce correttamente l'ID configurato del sensore in pumpHelper4. Migliorata anche la gestione dei valori mancanti o non validi.",
|
|
27
|
+
"es": "Corrección en la inicialización del sensor de presión: el adaptador ahora reconoce correctamente la ID del sensor configurado en pumpHelper4. Manejo mejorado de valores faltantes o inválidos.",
|
|
28
|
+
"pl": "Poprawka inicjalizacji czujnika ciśnienia: adapter poprawnie rozpoznaje teraz skonfigurowany identyfikator czujnika w pumpHelper4. Ulepszono również obsługę brakujących lub nieprawidłowych wartości.",
|
|
29
|
+
"uk": "Виправлення ініціалізації датчика тиску: адаптер тепер правильно розпізнає налаштований ID датчика в pumpHelper4. Покращено обробку відсутніх або некоректних значень.",
|
|
30
|
+
"zh-cn": "修复压力传感器初始化:适配器现在可以正确识别 pumpHelper4 中配置的传感器 ID,并改进了对缺失或无效数值的处理。"
|
|
31
|
+
},
|
|
6
32
|
"0.7.0": {
|
|
7
33
|
"en": "Added full pressure sensor integration (pump.pressure.*), including trend detection, self-learning min/max values, diagnostic output and configurable normal pressure range. No automatic control logic – purely informative.",
|
|
8
34
|
"de": "Vollständige Drucksensor-Integration (pump.pressure.*) hinzugefügt, inklusive Trenderkennung, selbstlernenden Min-/Max-Werten, Diagnoseausgabe und einstellbarem Normaldruckbereich. Keine automatische Logik – rein informativ.",
|
|
@@ -66,31 +92,6 @@
|
|
|
66
92
|
"es": "Refinamiento de la interfaz y mejoras en el panel de administración. Se agregó imagen ('Egon con mono azul') para identificación visual. Sistema de voz ampliado con configuración de horarios de salida de Alexa. jsonConfig limpiado y optimizado con encabezados de sección para mayor claridad.",
|
|
67
93
|
"pl": "Udoskonalenie interfejsu i panelu administracyjnego. Dodano obraz ('Egon w niebieskim kombinezonie') dla wizualnej identyfikacji. Rozszerzono system mowy o konfigurację czasu wyjścia Alexa. Wyczyczono i zoptymalizowano jsonConfig z nagłówkami sekcji dla lepszej przejrzystości.",
|
|
68
94
|
"zh-cn": "改进了界面和管理界面。添加了图像('蓝色工作服的Egon')以实现视觉识别。语音系统扩展了Alexa输出时间配置。清理并优化了带有章节标题的jsonConfig,使其更清晰。"
|
|
69
|
-
},
|
|
70
|
-
"0.6.1": {
|
|
71
|
-
"en": "Fixed false monthly reset when no last_reset date existed. Corrected real last_update timestamp in monthly statistics.",
|
|
72
|
-
"de": "Fehlerhaften Monatsreset ohne gültiges last_reset-Datum behoben. Korrigierter echter Zeitstempel last_update in der Monatsstatistik.",
|
|
73
|
-
"ru": "Исправлен неверный ежемесячный сброс без действительной даты last_reset. Исправлено обновление времени last_update в ежемесячной статистике.",
|
|
74
|
-
"pt": "Corrigido o reset mensal incorreto quando não havia data last_reset. Corrigido o timestamp real de last_update na estatística mensal.",
|
|
75
|
-
"nl": "Onjuiste maandelijkse reset opgelost wanneer er geen last_reset-datum was. Gecorrigeerde echte last_update-tijd in maandelijkse statistieken.",
|
|
76
|
-
"fr": "Correction du réinitialisation mensuelle erronée lorsqu'aucune date last_reset n'existait. Horodatage last_update réel corrigé dans les statistiques mensuelles.",
|
|
77
|
-
"it": "Corretto il reset mensile errato quando non esisteva una data last_reset. Corretto il timestamp reale last_update nelle statistiche mensili.",
|
|
78
|
-
"es": "Corregido el restablecimiento mensual erróneo cuando no existía una fecha last_reset. Corregida la marca de tiempo real last_update en las estadísticas mensuales.",
|
|
79
|
-
"pl": "Naprawiono błędny miesięczny reset, gdy nie istniała data last_reset. Poprawiono rzeczywisty znacznik czasu last_update w miesięcznych statystykach.",
|
|
80
|
-
"zh-cn": "修复了在不存在 last_reset 日期时错误的月度重置。修正了月度统计中的真实 last_update 时间戳。"
|
|
81
|
-
},
|
|
82
|
-
"0.6.0": {
|
|
83
|
-
"en": "Added complete photovoltaic control with automatic pump management (mode 'Automatik (PV)'). The adapter can now react to PV surplus based on configurable house consumption and generation values. Includes migration for existing installations. Improved system consistency and internal logging.",
|
|
84
|
-
"de": "Vollständige Photovoltaik-Steuerung mit automatischer Pumpenlogik (Modus 'Automatik (PV)') hinzugefügt. Der Adapter reagiert nun auf PV-Überschuss anhand konfigurierbarer Hausverbrauchs- und Erzeugungswerte. Migration für bestehende Installationen integriert. Systemkonsistenz und interne Protokollierung verbessert.",
|
|
85
|
-
"ru": "Добавлено полное управление фотоэлектрической системой с автоматическим управлением насосом (режим 'Automatik (PV)'). Адаптер теперь реагирует на избыток PV на основе настраиваемых значений потребления и генерации. Включена миграция для существующих установок. Улучшена системная согласованность и внутреннее ведение журнала.",
|
|
86
|
-
"pt": "Adicionado controle fotovoltaico completo com gerenciamento automático da bomba (modo 'Automatik (PV)'). O adaptador agora reage ao excedente de PV com base nos valores configuráveis de consumo e geração da casa. Inclui migração para instalações existentes. Consistência do sistema e registro interno aprimorados.",
|
|
87
|
-
"nl": "Volledige fotovoltaïsche besturing toegevoegd met automatische pompbesturing (modus 'Automatik (PV)'). De adapter reageert nu op PV-overschot op basis van configureerbare huisverbruik- en opwekkingswaarden. Migratie voor bestaande installaties inbegrepen. Verbeterde systeemconsistentie en interne logboekregistratie.",
|
|
88
|
-
"fr": "Ajout du contrôle photovoltaïque complet avec gestion automatique de la pompe (mode 'Automatik (PV)'). L'adaptateur réagit désormais au surplus photovoltaïque en fonction des valeurs configurables de consommation et de production domestiques. Migration incluse pour les installations existantes. Cohérence du système et journalisation interne améliorées.",
|
|
89
|
-
"it": "Aggiunto controllo fotovoltaico completo con gestione automatica della pompa (modalità 'Automatik (PV)'). L'adattatore ora reagisce al surplus fotovoltaico in base ai valori configurabili di consumo e generazione domestici. Migrazione inclusa per le installazioni esistenti. Migliorata la coerenza del sistema e la registrazione interna.",
|
|
90
|
-
"es": "Se añadió control fotovoltaico completo con gestión automática de la bomba (modo 'Automatik (PV)'). El adaptador ahora reacciona al excedente fotovoltaico según los valores configurables de consumo y generación de la casa. Incluye migración para instalaciones existentes. Mejorada la coherencia del sistema y el registro interno.",
|
|
91
|
-
"pl": "Dodano pełną kontrolę fotowoltaiczną z automatycznym zarządzaniem pompą (tryb 'Automatik (PV)'). Adapter reaguje teraz na nadwyżkę PV w oparciu o konfigurowalne wartości zużycia i produkcji energii. Zawiera migrację dla istniejących instalacji. Poprawiono spójność systemu i wewnętrzne logowanie.",
|
|
92
|
-
"uk": "Додано повний фотогальванічний контроль з автоматичним керуванням насосом (режим 'Automatik (PV)'). Адаптер тепер реагує на надлишок PV на основі налаштовуваних значень споживання та генерації. Включено міграцію для існуючих установок. Покращено системну узгодженість і внутрішнє журналювання.",
|
|
93
|
-
"zh-cn": "新增完整的光伏控制与自动泵管理(模式“Automatik (PV)”)。适配器现在可根据可配置的家庭耗电与发电数值响应光伏盈余。包含对现有安装的迁移。改进了系统一致性和内部日志记录。"
|
|
94
95
|
}
|
|
95
96
|
},
|
|
96
97
|
"titleLang": {
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* infoHelper.js
|
|
5
|
+
* ----------------------------------------------------------
|
|
6
|
+
* Verwaltet die Info-States:
|
|
7
|
+
* - info.developer_greeting
|
|
8
|
+
* - info.adapter_version
|
|
9
|
+
* ----------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const infoHelper = {
|
|
13
|
+
adapter: null,
|
|
14
|
+
dailyTimer: null,
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Initialisierung des Info-Helpers
|
|
18
|
+
*
|
|
19
|
+
* @param {import('iobroker').Adapter} adapter - Die ioBroker-Adapterinstanz
|
|
20
|
+
*/
|
|
21
|
+
init(adapter) {
|
|
22
|
+
this.adapter = adapter;
|
|
23
|
+
this.adapter.log.debug('[infoHelper] Initialisiert');
|
|
24
|
+
|
|
25
|
+
// Adapterversion setzen
|
|
26
|
+
this._updateAdapterVersion();
|
|
27
|
+
|
|
28
|
+
// Entwicklergruß setzen
|
|
29
|
+
this._updateDeveloperGreeting();
|
|
30
|
+
|
|
31
|
+
// NEU: täglichen Timer starten
|
|
32
|
+
this._startDailyTimer();
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Liest die Version aus io-package.json und schreibt sie in info.adapter_version
|
|
37
|
+
*/
|
|
38
|
+
_updateAdapterVersion() {
|
|
39
|
+
try {
|
|
40
|
+
const ioPkg = require('../../io-package.json');
|
|
41
|
+
const version = ioPkg.common.version || '';
|
|
42
|
+
|
|
43
|
+
this.adapter.setState('info.adapter_version', version, true);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
this.adapter.log.error(`[infoHelper] Fehler beim Lesen der Adapterversion: ${err}`);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Setzt saisonale Grüße in info.developer_greeting
|
|
51
|
+
*/
|
|
52
|
+
_updateDeveloperGreeting() {
|
|
53
|
+
const now = new Date();
|
|
54
|
+
const month = now.getMonth() + 1;
|
|
55
|
+
const day = now.getDate();
|
|
56
|
+
let greeting = '';
|
|
57
|
+
|
|
58
|
+
// Weihnachten: 20.12. – 27.12.
|
|
59
|
+
if ((month === 12 && day >= 20) || (month === 12 && day <= 27)) {
|
|
60
|
+
greeting = '🎄 PoolControl wünscht frohe Weihnachten! 🎄';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Jahreswechsel
|
|
64
|
+
// 31.12.: Guten Rutsch
|
|
65
|
+
if (month === 12 && day === 31) {
|
|
66
|
+
greeting = '🎆 PoolControl wünscht einen guten Rutsch ins neue Jahr! 🎆';
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 01.01.: Frohes neues Jahr
|
|
70
|
+
if (month === 1 && day === 1) {
|
|
71
|
+
greeting = '🎆 Frohes neues Jahr wünscht PoolControl! 🎆';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Dynamische Berechnung von Ostersonntag (Computus)
|
|
75
|
+
const easter = this._computeEaster(now.getFullYear());
|
|
76
|
+
const easterMonth = easter.getMonth() + 1;
|
|
77
|
+
const easterDay = easter.getDate();
|
|
78
|
+
|
|
79
|
+
const easterMonday = new Date(easter);
|
|
80
|
+
easterMonday.setDate(easterDay + 1);
|
|
81
|
+
|
|
82
|
+
// Ostersonntag
|
|
83
|
+
if (month === easterMonth && day === easterDay) {
|
|
84
|
+
greeting = '🐣 Frohe Ostern wünscht PoolControl! 🐣';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Ostermontag
|
|
88
|
+
if (month === easterMonday.getMonth() + 1 && day === easterMonday.getDate()) {
|
|
89
|
+
greeting = '🐣 PoolControl wünscht einen schönen Ostermontag! 🐣';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
this.adapter.setState('info.developer_greeting', greeting, true);
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Berechnet das Datum des Ostersonntags für ein bestimmtes Jahr.
|
|
97
|
+
* Algorithmus: Anonymous Gregorian Computus
|
|
98
|
+
*
|
|
99
|
+
* @param {number} year - Das Jahr, für das Ostern berechnet werden soll
|
|
100
|
+
* @returns {Date} Datum des Ostersonntags
|
|
101
|
+
*/
|
|
102
|
+
_computeEaster(year) {
|
|
103
|
+
const a = year % 19;
|
|
104
|
+
const b = Math.floor(year / 100);
|
|
105
|
+
const c = year % 100;
|
|
106
|
+
const d = Math.floor(b / 4);
|
|
107
|
+
const e = b % 4;
|
|
108
|
+
const f = Math.floor((b + 8) / 25);
|
|
109
|
+
const g = Math.floor((b - f + 1) / 3);
|
|
110
|
+
const h = (19 * a + b - d - g + 15) % 30;
|
|
111
|
+
const i = Math.floor(c / 4);
|
|
112
|
+
const k = c % 4;
|
|
113
|
+
const l = (32 + 2 * e + 2 * i - h - k) % 7;
|
|
114
|
+
const m = Math.floor((a + 11 * h + 22 * l) / 451);
|
|
115
|
+
const month = Math.floor((h + l - 7 * m + 114) / 31);
|
|
116
|
+
const day = ((h + l - 7 * m + 114) % 31) + 1;
|
|
117
|
+
return new Date(year, month - 1, day);
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Startet den täglichen Update-Intervall (Update 00:01 Uhr)
|
|
122
|
+
*/
|
|
123
|
+
_startDailyTimer() {
|
|
124
|
+
// nächsten Trigger für morgen 00:01 berechnen
|
|
125
|
+
const now = new Date();
|
|
126
|
+
const next = new Date(now);
|
|
127
|
+
|
|
128
|
+
next.setDate(now.getDate() + 1);
|
|
129
|
+
next.setHours(0, 1, 0, 0);
|
|
130
|
+
|
|
131
|
+
const delay = next.getTime() - now.getTime();
|
|
132
|
+
|
|
133
|
+
// einmaliger Timer bis 00:01
|
|
134
|
+
this.dailyTimer = setTimeout(() => {
|
|
135
|
+
this._updateDeveloperGreeting();
|
|
136
|
+
|
|
137
|
+
// danach täglich um 24h
|
|
138
|
+
this.dailyTimer = setInterval(
|
|
139
|
+
() => {
|
|
140
|
+
this._updateDeveloperGreeting();
|
|
141
|
+
},
|
|
142
|
+
24 * 60 * 60 * 1000,
|
|
143
|
+
);
|
|
144
|
+
}, delay);
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Stoppt Timer (wichtig beim Adapter-Unload)
|
|
149
|
+
*/
|
|
150
|
+
cleanup() {
|
|
151
|
+
if (this.dailyTimer) {
|
|
152
|
+
clearTimeout(this.dailyTimer);
|
|
153
|
+
clearInterval(this.dailyTimer);
|
|
154
|
+
this.dailyTimer = null;
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
module.exports = infoHelper;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Liest:
|
|
15
15
|
* - Objekt-ID des Drucksensors aus jsonConfig
|
|
16
16
|
*
|
|
17
|
-
* Version: 1.0.
|
|
17
|
+
* Version: 1.0.1
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
const pumpHelper4 = {
|
|
@@ -29,7 +29,7 @@ const pumpHelper4 = {
|
|
|
29
29
|
async init(adapter) {
|
|
30
30
|
this.adapter = adapter;
|
|
31
31
|
|
|
32
|
-
this.pressureObjectId = adapter.config.
|
|
32
|
+
this.pressureObjectId = adapter.config.pressure_sensor_id || '';
|
|
33
33
|
adapter.log.info(`[pumpHelper4] Initialisierung gestartet (OID: ${this.pressureObjectId || 'nicht gesetzt'})`);
|
|
34
34
|
|
|
35
35
|
if (!this.pressureObjectId) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* infoStates.js
|
|
5
|
+
* ----------------------------------------------------------
|
|
6
|
+
* Legt allgemeine Informations-States an:
|
|
7
|
+
* - info.developer_greeting
|
|
8
|
+
* - info.adapter_version
|
|
9
|
+
*
|
|
10
|
+
* Struktur:
|
|
11
|
+
* info.*
|
|
12
|
+
* ----------------------------------------------------------
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Erstellt alle States im Bereich info.
|
|
17
|
+
*
|
|
18
|
+
* @param {import("iobroker").Adapter} adapter - ioBroker Adapterinstanz
|
|
19
|
+
*/
|
|
20
|
+
async function createInfoStates(adapter) {
|
|
21
|
+
// Hauptordner: info
|
|
22
|
+
await adapter.setObjectNotExistsAsync('info', {
|
|
23
|
+
type: 'channel',
|
|
24
|
+
common: {
|
|
25
|
+
name: 'Informationen (PoolControl Systeminfos)',
|
|
26
|
+
},
|
|
27
|
+
native: {},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Entwickler-Grußtext
|
|
31
|
+
await adapter.setObjectNotExistsAsync('info.developer_greeting', {
|
|
32
|
+
type: 'state',
|
|
33
|
+
common: {
|
|
34
|
+
name: 'Entwickler-Grußtext',
|
|
35
|
+
desc: 'Saisonale Grüße und Informationen vom PoolControl-Entwickler',
|
|
36
|
+
type: 'string',
|
|
37
|
+
role: 'text',
|
|
38
|
+
read: true,
|
|
39
|
+
write: false,
|
|
40
|
+
def: '',
|
|
41
|
+
},
|
|
42
|
+
native: {},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Adapterversion
|
|
46
|
+
await adapter.setObjectNotExistsAsync('info.adapter_version', {
|
|
47
|
+
type: 'state',
|
|
48
|
+
common: {
|
|
49
|
+
name: 'Installierte Adapterversion',
|
|
50
|
+
desc: 'Aktuell installierte Version von PoolControl',
|
|
51
|
+
type: 'string',
|
|
52
|
+
role: 'text',
|
|
53
|
+
read: true,
|
|
54
|
+
write: false,
|
|
55
|
+
def: '',
|
|
56
|
+
},
|
|
57
|
+
native: {},
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = {
|
|
62
|
+
createInfoStates,
|
|
63
|
+
};
|
package/main.js
CHANGED
|
@@ -26,6 +26,7 @@ const controlHelper2 = require('./lib/helpers/controlHelper2');
|
|
|
26
26
|
const debugLogHelper = require('./lib/helpers/debugLogHelper');
|
|
27
27
|
const speechTextHelper = require('./lib/helpers/speechTextHelper');
|
|
28
28
|
const migrationHelper = require('./lib/helpers/migrationHelper');
|
|
29
|
+
const infoHelper = require('./lib/helpers/infoHelper');
|
|
29
30
|
const { createTemperatureStates } = require('./lib/stateDefinitions/temperatureStates');
|
|
30
31
|
const { createPumpStates } = require('./lib/stateDefinitions/pumpStates');
|
|
31
32
|
const { createPumpStates2 } = require('./lib/stateDefinitions/pumpStates2');
|
|
@@ -42,6 +43,7 @@ const { createConsumptionStates } = require('./lib/stateDefinitions/consumptionS
|
|
|
42
43
|
const { createStatusStates } = require('./lib/stateDefinitions/statusStates');
|
|
43
44
|
const { createControlStates } = require('./lib/stateDefinitions/controlStates');
|
|
44
45
|
const { createDebugLogStates } = require('./lib/stateDefinitions/debugLogStates');
|
|
46
|
+
const { createInfoStates } = require('./lib/stateDefinitions/infoStates');
|
|
45
47
|
|
|
46
48
|
class Poolcontrol extends utils.Adapter {
|
|
47
49
|
constructor(options) {
|
|
@@ -105,6 +107,9 @@ class Poolcontrol extends utils.Adapter {
|
|
|
105
107
|
// --- DebugLog States ---
|
|
106
108
|
await createDebugLogStates(this);
|
|
107
109
|
|
|
110
|
+
// --- Info States ---
|
|
111
|
+
await createInfoStates(this);
|
|
112
|
+
|
|
108
113
|
// --- Migration Helper zuletzt starten ---
|
|
109
114
|
await migrationHelper.init(this);
|
|
110
115
|
|
|
@@ -125,6 +130,7 @@ class Poolcontrol extends utils.Adapter {
|
|
|
125
130
|
photovoltaicHelper.init(this);
|
|
126
131
|
frostHelper.init(this);
|
|
127
132
|
statusHelper.init(this);
|
|
133
|
+
infoHelper.init(this);
|
|
128
134
|
controlHelper.init(this);
|
|
129
135
|
controlHelper2.init(this);
|
|
130
136
|
debugLogHelper.init(this);
|
|
@@ -181,6 +187,9 @@ class Poolcontrol extends utils.Adapter {
|
|
|
181
187
|
if (speechTextHelper.cleanup) {
|
|
182
188
|
speechTextHelper.cleanup();
|
|
183
189
|
}
|
|
190
|
+
if (infoHelper.cleanup) {
|
|
191
|
+
infoHelper.cleanup();
|
|
192
|
+
}
|
|
184
193
|
} catch (e) {
|
|
185
194
|
this.log.warn(`[onUnload] Fehler beim Cleanup: ${e.message}`);
|
|
186
195
|
} finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.poolcontrol",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.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",
|