iobroker.poolcontrol 1.0.1 → 1.2.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 +27 -1
- package/admin/jsonConfig.json +1791 -1364
- package/io-package.json +27 -27
- package/lib/helpers/pumpSpeedHelper.js +238 -0
- package/lib/stateDefinitions/pumpSpeedStates.js +267 -0
- package/main.js +13 -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": "1.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.2.0": {
|
|
7
|
+
"en": "Maintenance release. Prepares PoolControl for the Stable repository by enabling i18n in the instance configuration (jsonConfig) and adding bilingual (DE/EN) labels and texts. No functional changes to the adapter logic.",
|
|
8
|
+
"de": "Wartungs-Release. Vorbereitung für das Stable-Repository durch Aktivierung von i18n in der Instanzkonfiguration (jsonConfig) und Ergänzung zweisprachiger (DE/EN) Labels und Texte. Keine funktionalen Änderungen an der Adapterlogik.",
|
|
9
|
+
"ru": "Технический релиз. Подготовка PoolControl к репозиторию Stable: включение i18n в конфигурации экземпляра (jsonConfig) и добавление двуязычных (DE/EN) подписей и текстов. Функциональных изменений в логике адаптера нет.",
|
|
10
|
+
"pt": "Versão de manutenção. Preparação do PoolControl para o repositório Stable ao ativar o i18n na configuração da instância (jsonConfig) e adicionar rótulos e textos bilingues (DE/EN). Sem alterações funcionais na lógica do adaptador.",
|
|
11
|
+
"nl": "Onderhoudsrelease. Bereidt PoolControl voor op de Stable-repository door i18n in de instance-configuratie (jsonConfig) te activeren en tweetalige (DE/EN) labels en teksten toe te voegen. Geen functionele wijzigingen in de adapterlogica.",
|
|
12
|
+
"fr": "Version de maintenance. Prépare PoolControl pour le dépôt Stable en activant i18n dans la configuration de l’instance (jsonConfig) et en ajoutant des libellés et textes bilingues (DE/EN). Aucun changement fonctionnel dans la logique de l’adaptateur.",
|
|
13
|
+
"it": "Release di manutenzione. Preparazione di PoolControl per il repository Stable abilitando i18n nella configurazione dell’istanza (jsonConfig) e aggiungendo etichette e testi bilingui (DE/EN). Nessuna modifica funzionale alla logica dell’adattatore.",
|
|
14
|
+
"es": "Versión de mantenimiento. Prepara PoolControl para el repositorio Stable habilitando i18n en la configuración de instancia (jsonConfig) y añadiendo etiquetas y textos bilingües (DE/EN). Sin cambios funcionales en la lógica del adaptador.",
|
|
15
|
+
"pl": "Wydanie konserwacyjne. Przygotowanie PoolControl do repozytorium Stable poprzez włączenie i18n w konfiguracji instancji (jsonConfig) oraz dodanie dwujęzycznych (DE/EN) etykiet i tekstów. Brak zmian funkcjonalnych w logice adaptera.",
|
|
16
|
+
"uk": "Реліз обслуговування. Підготовка PoolControl до репозиторію Stable: увімкнення i18n у конфігурації інстансу (jsonConfig) та додавання двомовних (DE/EN) підписів і текстів. Жодних функціональних змін у логіці адаптера.",
|
|
17
|
+
"zh-cn": "维护版本。为进入 Stable 仓库做准备:在实例配置(jsonConfig)中启用 i18n,并添加双语(德语/英语)标签与文本。适配器逻辑无功能性变更。"
|
|
18
|
+
},
|
|
19
|
+
"1.1.0": {
|
|
20
|
+
"en": "Feature release. Introduces a new passive pump speed recommendation layer (pump.speed). PoolControl now derives a clear logical pump performance state (off, frost, low, normal, high, boost) from existing pump logic and provides an optional, configurable percentage recommendation (0–100%). This enables seamless integration with external speed control solutions such as Shelly 0–10 V, frequency converters or Blockly scripts, without modifying or interfering with the existing pump control logic.",
|
|
21
|
+
"de": "Feature-Release. Einführung einer neuen passiven Pumpen-Leistungsempfehlung (pump.speed). PoolControl leitet nun einen klaren logischen Leistungszustand der Pumpe (off, frost, low, normal, high, boost) aus der bestehenden Pumpenlogik ab und stellt zusätzlich eine optionale, frei konfigurierbare Prozent-Empfehlung (0–100 %) bereit. Dadurch können externe Drehzahlsteuerungen wie Shelly 0–10 V, Frequenzumrichter oder Blockly-Skripte angebunden werden, ohne die bestehende Pumpensteuerung zu verändern oder zu beeinflussen.",
|
|
22
|
+
"ru": "Релиз с новым функционалом. Добавлен новый пассивный уровень рекомендации скорости насоса (pump.speed). PoolControl теперь определяет логическое состояние производительности насоса (off, frost, low, normal, high, boost) на основе существующей логики работы насоса и предоставляет дополнительную настраиваемую рекомендацию в процентах (0–100 %). Это позволяет интегрировать внешние системы управления скоростью, такие как Shelly 0–10 V, частотные преобразователи или скрипты Blockly, без изменения существующей логики управления насосом.",
|
|
23
|
+
"pt": "Versão com novas funcionalidades. Introduz uma nova camada passiva de recomendação de velocidade da bomba (pump.speed). O PoolControl passa a derivar um estado lógico claro de desempenho da bomba (off, frost, low, normal, high, boost) a partir da lógica existente e fornece uma recomendação percentual opcional e configurável (0–100%). Isto permite a integração com soluções externas de controlo de velocidade, como Shelly 0–10 V, conversores de frequência ou scripts Blockly, sem alterar a lógica de controlo da bomba existente.",
|
|
24
|
+
"nl": "Feature-release. Introduceert een nieuwe passieve aanbevelingslaag voor pompsnelheid (pump.speed). PoolControl leidt nu een duidelijke logische pompvermogensstatus af (off, frost, low, normal, high, boost) op basis van de bestaande pomplogica en biedt daarnaast een optionele, configureerbare procentuele aanbeveling (0–100%). Dit maakt integratie mogelijk met externe snelheidsregelingen zoals Shelly 0–10 V, frequentieregelaars of Blockly-scripts, zonder de bestaande pompregeling te wijzigen.",
|
|
25
|
+
"fr": "Version fonctionnelle. Introduction d’une nouvelle couche passive de recommandation de vitesse de la pompe (pump.speed). PoolControl déduit désormais un état logique clair de performance de la pompe (off, frost, low, normal, high, boost) à partir de la logique existante et fournit en plus une recommandation de pourcentage configurable (0–100 %). Cela permet l’intégration de solutions externes de contrôle de vitesse telles que Shelly 0–10 V, variateurs de fréquence ou scripts Blockly, sans modifier la logique de commande existante.",
|
|
26
|
+
"it": "Release funzionale. Introduce un nuovo livello passivo di raccomandazione della velocità della pompa (pump.speed). PoolControl ricava ora uno stato logico chiaro delle prestazioni della pompa (off, frost, low, normal, high, boost) dalla logica esistente e fornisce una raccomandazione percentuale opzionale e configurabile (0–100%). Ciò consente l’integrazione con soluzioni esterne di controllo della velocità come Shelly 0–10 V, inverter o script Blockly, senza modificare la logica di controllo della pompa esistente.",
|
|
27
|
+
"es": "Versión con nuevas funciones. Introduce una nueva capa pasiva de recomendación de velocidad de la bomba (pump.speed). PoolControl ahora deriva un estado lógico claro del rendimiento de la bomba (off, frost, low, normal, high, boost) a partir de la lógica existente y proporciona una recomendación porcentual opcional y configurable (0–100%). Esto permite integrar soluciones externas de control de velocidad como Shelly 0–10 V, variadores de frecuencia o scripts Blockly, sin modificar la lógica de control de la bomba existente.",
|
|
28
|
+
"pl": "Wydanie z nową funkcjonalnością. Wprowadza nową pasywną warstwę rekomendacji prędkości pompy (pump.speed). PoolControl wyznacza teraz jednoznaczny logiczny stan wydajności pompy (off, frost, low, normal, high, boost) na podstawie istniejącej logiki oraz udostępnia opcjonalną, konfigurowalną rekomendację procentową (0–100%). Umożliwia to integrację z zewnętrznymi systemami sterowania prędkością, takimi jak Shelly 0–10 V, falowniki czy skrypty Blockly, bez ingerencji w istniejącą logikę sterowania pompą.",
|
|
29
|
+
"uk": "Функціональний реліз. Додано новий пасивний рівень рекомендації швидкості насоса (pump.speed). PoolControl тепер визначає чіткий логічний стан продуктивності насоса (off, frost, low, normal, high, boost) на основі наявної логіки та надає додаткову налаштовувану процентну рекомендацію (0–100 %). Це дозволяє інтегрувати зовнішні рішення керування швидкістю, такі як Shelly 0–10 V, частотні перетворювачі або скрипти Blockly, без зміни існуючої логіки керування насосом.",
|
|
30
|
+
"zh-cn": "功能版本。引入了新的被动泵速推荐层(pump.speed)。PoolControl 现在可以基于现有的泵控制逻辑派生出清晰的逻辑性能状态(off、frost、low、normal、high、boost),并提供可选的、可配置的百分比推荐(0–100%)。这使其能够与 Shelly 0–10 V、变频器或 Blockly 脚本等外部转速控制方案无缝集成,而无需修改现有的泵控制逻辑。"
|
|
31
|
+
},
|
|
6
32
|
"1.0.1": {
|
|
7
33
|
"en": "Bugfix release. Fixes incomplete weather code descriptions in the AI weather forecast module by fully aligning with the official Open-Meteo weather code specification. This prevents raw numeric weather codes from appearing in notifications, speech output, or AI-generated texts and ensures consistent, human-readable weather descriptions across all outputs.",
|
|
8
34
|
"de": "Bugfix-Release. Behebt unvollständige Wettercode-Beschreibungen im KI-Wettervorhersagemodul durch vollständige Anpassung an die offizielle Open-Meteo-Wettercode-Spezifikation. Dadurch wird verhindert, dass rohe numerische Wettercodes in Benachrichtigungen, Sprachausgaben oder KI-generierten Texten erscheinen, und es werden durchgehend verständliche Klartext-Beschreibungen sichergestellt.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Nowy moduł pomocy chemicznej oparty na AI. Interaktywny, wyłącznie informacyjny system wsparcia dla typowych problemów wody basenowej (np. zbyt wysokie/niskie pH, nieskuteczny chlor, zielona lub mętna woda). Bez automatycznego dozowania, rekomendacji produktów, sterowania urządzeniami ani komunikatów głosowych.",
|
|
68
94
|
"uk": "Новий модуль допомоги з хімії басейну на основі ШІ. Інтерактивна, виключно інформаційна система підтримки для типових проблем води (наприклад, високий/низький pH, неефективний хлор, зелена або каламутна вода). Без автоматичного дозування, рекомендацій продуктів, керування пристроями чи голосового виводу.",
|
|
69
95
|
"zh-cn": "新增 AI 水质化学帮助模块。为常见的泳池水问题(如 pH 过高/过低、氯无效、绿水或浑浊水)提供交互式、纯信息性的帮助说明。不包含自动投加、产品推荐、设备控制或语音输出。"
|
|
70
|
-
},
|
|
71
|
-
"0.8.1": {
|
|
72
|
-
"en": "Fix: AI messages were executed multiple times (e.g. 3x in Telegram). The timer system in aiHelper has been reworked: late executions now only run during the first 3 minutes after adapter start. All AI weather modules now trigger exactly once per day again. Stability improvements in the daily timers.",
|
|
73
|
-
"de": "Fix: KI-Meldungen wurden mehrfach ausgeführt (z.B. 3× in Telegram). Das Timer-System im aiHelper wurde überarbeitet: Nachholausführungen laufen jetzt nur noch in den ersten 3 Minuten nach Adapterstart. Alle AI-Wettermodule werden wieder exakt einmal pro Tag ausgelöst. Stabilitätsverbesserungen bei den täglichen Timern.",
|
|
74
|
-
"ru": "Исправление: сообщения ИИ выполнялись несколько раз (например, 3× в Telegram). Таймерная система в aiHelper была переработана: пропущенные задачи выполняются только в первые 3 минуты после запуска адаптера. Все модули погоды ИИ снова выполняются строго один раз в день.",
|
|
75
|
-
"pt": "Correção: mensagens de IA eram executadas várias vezes (ex.: 3× no Telegram). O sistema de temporizadores do aiHelper foi reestruturado: execuções atrasadas agora ocorrem apenas nos primeiros 3 minutos após iniciar o adaptador. Todos os módulos de clima da IA voltam a ser executados exatamente uma vez por dia.",
|
|
76
|
-
"nl": "Fix: AI-berichten werden meerdere keren uitgevoerd (bijv. 3× in Telegram). Het timersysteem in aiHelper is herwerkt: inhaaluitvoeringen draaien nu alleen in de eerste 3 minuten na adapterstart. Alle AI-weermodules worden weer precies één keer per dag uitgevoerd.",
|
|
77
|
-
"fr": "Correctif : les messages IA étaient exécutés plusieurs fois (ex. 3× dans Telegram). Le système de minuteries dans aiHelper a été revu : les exécutions différées ne s'exécutent plus que pendant les 3 premières minutes après le démarrage. Tous les modules météo IA se déclenchent à nouveau exactement une fois par jour.",
|
|
78
|
-
"it": "Fix: i messaggi dell'IA venivano eseguiti più volte (es. 3× su Telegram). Il sistema di timer dell'aiHelper è stato rivisto: le esecuzioni recuperate ora avvengono solo nei primi 3 minuti dopo l'avvio dell'adattatore. Tutti i moduli meteo IA ora si attivano nuovamente una sola volta al giorno.",
|
|
79
|
-
"es": "Corrección: los mensajes de IA se ejecutaban varias veces (p. ej., 3× en Telegram). Se ha rediseñado el sistema de temporizadores en aiHelper: las ejecuciones atrasadas ahora solo ocurren en los primeros 3 minutos tras iniciar el adaptador. Todos los módulos meteorológicos de IA vuelven a ejecutarse una sola vez al día.",
|
|
80
|
-
"pl": "Poprawka: komunikaty AI były wykonywane wielokrotnie (np. 3× w Telegramie). System timerów w aiHelper został przebudowany: zaległe wykonania działają teraz tylko w pierwszych 3 minutach po uruchomieniu adaptera. Wszystkie moduły pogodowe AI znów uruchamiają się dokładnie raz dziennie.",
|
|
81
|
-
"uk": "Виправлення: повідомлення ШІ виконувалися кілька разів (наприклад, 3× у Telegram). Систему таймерів в aiHelper перероблено: запізнілі виконання відбуваються лише в перші 3 хвилини після запуску. Усі погодні модулі ШІ знову працюють рівно один раз на добу.",
|
|
82
|
-
"zh-cn": "修复:AI 消息会被多次执行(例如在 Telegram 中出现 3 次)。已重构 aiHelper 中的计时器系统:补偿执行现在仅在适配器启动后的前 3 分钟内运行。所有 AI 天气模块现在每天只会执行一次。"
|
|
83
|
-
},
|
|
84
|
-
"0.8.0": {
|
|
85
|
-
"en": "New: Introduction of the AI Forecast System (aiForecastHelper). The adapter now creates a daily weather forecast for tomorrow, including temperature range, weather description, rain probability, wind analysis, and pool recommendations. New switches, schedules and outputs were added under ai.weather.*. First execution runs automatically at adapter start. Admin interface updated with important AI information.",
|
|
86
|
-
"de": "Neu: Einführung des KI-Vorhersagesystems (aiForecastHelper). Der Adapter erstellt nun täglich eine Wettervorhersage für morgen – inklusive Temperaturspanne, Wetterbeschreibung, Regenwahrscheinlichkeit, Windanalyse und Pool-Empfehlungen. Neue Schalter, Zeitpläne und Ausgaben unter ai.weather.* hinzugefügt. Erste Ausführung erfolgt automatisch beim Adapterstart. Admin-Oberfläche um wichtige KI-Hinweise erweitert.",
|
|
87
|
-
"ru": "Новое: Введена система ИИ-прогноза (aiForecastHelper). Адаптер теперь ежедневно создаёт прогноз погоды на завтра: диапазон температур, описание погоды, вероятность дождя, анализ ветра и рекомендации по бассейну. Добавлены новые переключатели, расписания и выходы в ai.weather.*. Первое выполнение происходит автоматически при запуске адаптера. Интерфейс администратора обновлён важной информацией об ИИ.",
|
|
88
|
-
"pt": "Novo: Introdução do sistema de previsão por IA (aiForecastHelper). O adaptador agora cria diariamente uma previsão do tempo para amanhã, incluindo faixa de temperatura, descrição do clima, probabilidade de chuva, análise de vento e recomendações para a piscina. Novos interruptores, horários e saídas adicionados em ai.weather.*. A primeira execução ocorre automaticamente ao iniciar o adaptador. Interface administrativa atualizada com informações importantes sobre IA.",
|
|
89
|
-
"nl": "Nieuw: Introductie van het AI-voorspellingssysteem (aiForecastHelper). De adapter maakt nu dagelijks een weersvoorspelling voor morgen, inclusief temperatuurbereik, weertype, regenkans, windanalyse en zwembad-aanbevelingen. Nieuwe schakelaars, schema's en outputs toegevoegd onder ai.weather.*. Eerste uitvoering gebeurt automatisch bij het starten van de adapter. Admin-interface uitgebreid met belangrijke AI-informatie.",
|
|
90
|
-
"fr": "Nouveau : Introduction du système de prévision IA (aiForecastHelper). L’adaptateur génère désormais chaque jour une prévision météo pour le lendemain, incluant plage de températures, description du temps, probabilité de pluie, analyse du vent et recommandations pour la piscine. Nouveaux commutateurs, horaires et sorties ajoutés sous ai.weather.*. Première exécution automatique au démarrage de l’adaptateur. Interface admin enrichie d’informations importantes sur l’IA.",
|
|
91
|
-
"it": "Novità: Introduzione del sistema di previsione IA (aiForecastHelper). L’adattatore ora genera quotidianamente una previsione del tempo per domani, inclusi intervallo di temperature, descrizione del meteo, probabilità di pioggia, analisi del vento e raccomandazioni per la piscina. Aggiunti nuovi switch, pianificazioni e output sotto ai.weather.*. Prima esecuzione automatica all'avvio dell’adattatore. Interfaccia admin aggiornata con importanti informazioni sull’IA.",
|
|
92
|
-
"es": "Nuevo: Introducción del sistema de previsión por IA (aiForecastHelper). El adaptador ahora genera un pronóstico diario del clima para mañana, incluyendo rango de temperatura, descripción del clima, probabilidad de lluvia, análisis del viento y recomendaciones para la piscina. Nuevos interruptores, horarios y salidas añadidos en ai.weather.*. La primera ejecución ocurre automáticamente al iniciar el adaptador. Interfaz de administración actualizada con información importante sobre IA.",
|
|
93
|
-
"pl": "Nowość: Wprowadzenie systemu prognoz opartego na AI (aiForecastHelper). Adapter tworzy teraz codzienną prognozę pogody na jutro, obejmującą zakres temperatur, opis pogody, prawdopodobieństwo opadów, analizę wiatru oraz zalecenia dla basenu. Dodano nowe przełączniki, harmonogramy i wyjścia w ai.weather.*. Pierwsze uruchomienie następuje automatycznie przy starcie adaptera. Interfejs administracyjny został uzupełniony o ważne informacje dotyczące AI.",
|
|
94
|
-
"uk": "Нове: Впроваджено систему прогнозування на основі ШІ (aiForecastHelper). Адаптер тепер щоденно створює прогноз погоди на завтра: діапазон температур, опис погоди, ймовірність опадів, аналіз вітру та рекомендації для басейну. Додано нові перемикачі, розклади та виходи в ai.weather.*. Перше виконання відбувається автоматично під час запуску адаптера. Адмін-інтерфейс оновлено важливою інформацією щодо ШІ.",
|
|
95
|
-
"zh-cn": "新增:引入 AI 预报系统(aiForecastHelper)。适配器现在每天生成明天的天气预报,包括温度范围、天气描述、降雨概率、风力分析和泳池建议。新增了 ai.weather.* 下的开关、计划和输出。首次执行在适配器启动时自动进行。管理界面已更新,包含重要的 AI 信息。"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* pumpSpeedHelper.js
|
|
5
|
+
* ----------------------------------------------------------
|
|
6
|
+
* Leistungsempfehlung für die Hauptpumpe (rein passiv)
|
|
7
|
+
*
|
|
8
|
+
* Dieser Helper:
|
|
9
|
+
* - schaltet die Pumpe NICHT
|
|
10
|
+
* - steuert KEINE Hardware (kein 0-10V, kein Shelly, kein FU)
|
|
11
|
+
* - greift NICHT in bestehende Pumpenlogik ein
|
|
12
|
+
*
|
|
13
|
+
* Er reagiert ausschließlich auf bestehende States und leitet daraus
|
|
14
|
+
* EINEN internen Leistungszustand ab, der dann in mehreren Formen
|
|
15
|
+
* ausgegeben wird:
|
|
16
|
+
* - pump.speed.state (interner Zustand)
|
|
17
|
+
* - pump.speed.mode (semantische Ausgabe)
|
|
18
|
+
* - pump.speed.percent (technische Ausgabe, aus User-Mapping)
|
|
19
|
+
*
|
|
20
|
+
* Eingänge (Single Source of Truth):
|
|
21
|
+
* - pump.pump_switch
|
|
22
|
+
* - pump.mode
|
|
23
|
+
* - control.pump.backwash_active
|
|
24
|
+
* - pump.speed.config.percent.* (Mapping)
|
|
25
|
+
*
|
|
26
|
+
* Logik (schlank, wie besprochen):
|
|
27
|
+
* 1) Pumpe AUS -> off
|
|
28
|
+
* 2) Rückspülen/Wartung aktiv -> boost
|
|
29
|
+
* 3) FrostHelper aktiv -> frost
|
|
30
|
+
* 4) sonst -> normal
|
|
31
|
+
*
|
|
32
|
+
* Version: 0.1.0
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
const pumpSpeedHelper = {
|
|
36
|
+
adapter: null,
|
|
37
|
+
|
|
38
|
+
// Cache für Mapping (damit nicht jedes Event alles neu gelesen wird)
|
|
39
|
+
mapping: {
|
|
40
|
+
frost: 0,
|
|
41
|
+
low: 0,
|
|
42
|
+
normal: 0,
|
|
43
|
+
high: 0,
|
|
44
|
+
boost: 0,
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initialisiert den Helper
|
|
49
|
+
*
|
|
50
|
+
* @param {ioBroker.Adapter} adapter – aktive Adapterinstanz
|
|
51
|
+
*/
|
|
52
|
+
async init(adapter) {
|
|
53
|
+
this.adapter = adapter;
|
|
54
|
+
|
|
55
|
+
adapter.log.debug('[pumpSpeedHelper] Initialisierung gestartet');
|
|
56
|
+
|
|
57
|
+
// ----------------------------------------------------------
|
|
58
|
+
// Subscriptions (Grundregel: ohne subscribe -> wirkungslos)
|
|
59
|
+
// ----------------------------------------------------------
|
|
60
|
+
adapter.subscribeStates('pump.pump_switch');
|
|
61
|
+
adapter.subscribeStates('pump.mode');
|
|
62
|
+
adapter.subscribeStates('control.pump.backwash_active');
|
|
63
|
+
|
|
64
|
+
adapter.subscribeStates('pump.speed.config.percent.frost');
|
|
65
|
+
adapter.subscribeStates('pump.speed.config.percent.low');
|
|
66
|
+
adapter.subscribeStates('pump.speed.config.percent.normal');
|
|
67
|
+
adapter.subscribeStates('pump.speed.config.percent.high');
|
|
68
|
+
adapter.subscribeStates('pump.speed.config.percent.boost');
|
|
69
|
+
|
|
70
|
+
// Initiales Mapping laden
|
|
71
|
+
await this._reloadMapping();
|
|
72
|
+
|
|
73
|
+
// Initialen Output setzen
|
|
74
|
+
await this._recalculate();
|
|
75
|
+
|
|
76
|
+
adapter.log.debug('[pumpSpeedHelper] Erfolgreich initialisiert');
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Verarbeitet relevante State-Änderungen
|
|
81
|
+
*
|
|
82
|
+
* @param {string} id - Objekt-ID
|
|
83
|
+
* @param {ioBroker.State} state - Neuer Wert
|
|
84
|
+
*/
|
|
85
|
+
async handleStateChange(id, state) {
|
|
86
|
+
if (!state) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
// Mapping geändert? -> Cache aktualisieren + neu berechnen
|
|
92
|
+
if (
|
|
93
|
+
id.endsWith('pump.speed.config.percent.frost') ||
|
|
94
|
+
id.endsWith('pump.speed.config.percent.low') ||
|
|
95
|
+
id.endsWith('pump.speed.config.percent.normal') ||
|
|
96
|
+
id.endsWith('pump.speed.config.percent.high') ||
|
|
97
|
+
id.endsWith('pump.speed.config.percent.boost')
|
|
98
|
+
) {
|
|
99
|
+
await this._reloadMapping();
|
|
100
|
+
await this._recalculate();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Relevante Eingänge? -> neu berechnen
|
|
105
|
+
if (
|
|
106
|
+
id.endsWith('pump.pump_switch') ||
|
|
107
|
+
id.endsWith('pump.mode') ||
|
|
108
|
+
id.endsWith('control.pump.backwash_active')
|
|
109
|
+
) {
|
|
110
|
+
await this._recalculate();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
} catch (e) {
|
|
114
|
+
this.adapter.log.warn(`[pumpSpeedHelper] Fehler in handleStateChange: ${e.message}`);
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Lädt das User-Mapping in den Cache
|
|
120
|
+
*/
|
|
121
|
+
async _reloadMapping() {
|
|
122
|
+
this.mapping.frost = await this._getPercent('pump.speed.config.percent.frost');
|
|
123
|
+
this.mapping.low = await this._getPercent('pump.speed.config.percent.low');
|
|
124
|
+
this.mapping.normal = await this._getPercent('pump.speed.config.percent.normal');
|
|
125
|
+
this.mapping.high = await this._getPercent('pump.speed.config.percent.high');
|
|
126
|
+
this.mapping.boost = await this._getPercent('pump.speed.config.percent.boost');
|
|
127
|
+
|
|
128
|
+
this.adapter.log.debug(
|
|
129
|
+
`[pumpSpeedHelper] Mapping geladen: frost=${this.mapping.frost} low=${this.mapping.low} normal=${this.mapping.normal} high=${this.mapping.high} boost=${this.mapping.boost}`,
|
|
130
|
+
);
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Führt die eigentliche Ableitung durch und setzt die Ausgänge
|
|
135
|
+
*/
|
|
136
|
+
async _recalculate() {
|
|
137
|
+
const pumpSwitch = await this.adapter.getStateAsync('pump.pump_switch');
|
|
138
|
+
const pumpIsOn = !!pumpSwitch?.val;
|
|
139
|
+
|
|
140
|
+
// Pumpe aus -> off
|
|
141
|
+
if (!pumpIsOn) {
|
|
142
|
+
await this._setOutputs('off', 0);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Rückspülen/Wartung aktiv? -> boost
|
|
147
|
+
const backwash = await this.adapter.getStateAsync('control.pump.backwash_active');
|
|
148
|
+
const backwashActive = !!backwash?.val;
|
|
149
|
+
if (backwashActive) {
|
|
150
|
+
await this._setOutputs('boost', this.mapping.boost);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Frost? -> frost (über pump.mode = frostHelper)
|
|
155
|
+
const mode = (await this.adapter.getStateAsync('pump.mode'))?.val || '';
|
|
156
|
+
if (mode === 'frostHelper') {
|
|
157
|
+
await this._setOutputs('frost', this.mapping.frost);
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Alles andere -> normal
|
|
162
|
+
await this._setOutputs('normal', this.mapping.normal);
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Setzt state/mode/percent konsistent aus EINEM Zustand
|
|
167
|
+
*
|
|
168
|
+
* @param {string} stateValue - interner Zustand (off|frost|low|normal|high|boost)
|
|
169
|
+
* @param {number} percentValue - gemappter Prozentwert
|
|
170
|
+
*/
|
|
171
|
+
async _setOutputs(stateValue, percentValue) {
|
|
172
|
+
const safePercent = this._clampPercent(percentValue);
|
|
173
|
+
|
|
174
|
+
// state (intern)
|
|
175
|
+
await this.adapter.setStateChangedAsync('pump.speed.state', {
|
|
176
|
+
val: stateValue,
|
|
177
|
+
ack: true,
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// mode (semantisch)
|
|
181
|
+
await this.adapter.setStateChangedAsync('pump.speed.mode', {
|
|
182
|
+
val: stateValue,
|
|
183
|
+
ack: true,
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// percent (technisch)
|
|
187
|
+
await this.adapter.setStateChangedAsync('pump.speed.percent', {
|
|
188
|
+
val: safePercent,
|
|
189
|
+
ack: true,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
this.adapter.log.debug(`[pumpSpeedHelper] Output gesetzt: state=${stateValue}, percent=${safePercent}`);
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Liest einen Prozentwert aus einem Konfigurations-State.
|
|
197
|
+
* Ungültige oder fehlende Werte werden als 0 interpretiert.
|
|
198
|
+
*
|
|
199
|
+
* @param {string} id - Objekt-ID des Prozent-States
|
|
200
|
+
* @returns {Promise<number>} Prozentwert im Bereich 0..100
|
|
201
|
+
*/
|
|
202
|
+
async _getPercent(id) {
|
|
203
|
+
const st = await this.adapter.getStateAsync(id);
|
|
204
|
+
const val = Number(st?.val);
|
|
205
|
+
if (Number.isNaN(val)) {
|
|
206
|
+
return 0;
|
|
207
|
+
}
|
|
208
|
+
return this._clampPercent(val);
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Begrenzt einen Zahlenwert auf den gültigen Prozentbereich (0..100).
|
|
213
|
+
*
|
|
214
|
+
* @param {number} v - Zu prüfender Prozentwert
|
|
215
|
+
* @returns {number} Gültiger Prozentwert im Bereich 0..100
|
|
216
|
+
*/
|
|
217
|
+
_clampPercent(v) {
|
|
218
|
+
if (Number.isNaN(v)) {
|
|
219
|
+
return 0;
|
|
220
|
+
}
|
|
221
|
+
if (v < 0) {
|
|
222
|
+
return 0;
|
|
223
|
+
}
|
|
224
|
+
if (v > 100) {
|
|
225
|
+
return 100;
|
|
226
|
+
}
|
|
227
|
+
return Math.round(v);
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Cleanup bei Adapter-Unload
|
|
232
|
+
*/
|
|
233
|
+
cleanup() {
|
|
234
|
+
this.adapter?.log.debug('[pumpSpeedHelper] Cleanup ausgeführt.');
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
module.exports = pumpSpeedHelper;
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* =============================================================
|
|
3
|
+
* Pump Speed States
|
|
4
|
+
* =============================================================
|
|
5
|
+
*
|
|
6
|
+
* Dieser Bereich stellt eine **Leistungsempfehlung** für die
|
|
7
|
+
* Hauptpumpe bereit.
|
|
8
|
+
*
|
|
9
|
+
* WICHTIG:
|
|
10
|
+
* - Diese States steuern KEINE Hardware
|
|
11
|
+
* - Diese States schalten die Pumpe NICHT ein oder aus
|
|
12
|
+
* - Es findet KEINE Drehzahlregelung im Adapter statt
|
|
13
|
+
*
|
|
14
|
+
* Der Bereich `pump.speed` ist eine **reine Ableitung**
|
|
15
|
+
* aus bereits vorhandenen Pumpen-States wie z. B.:
|
|
16
|
+
* - pump.pump_switch
|
|
17
|
+
* - pump.reason
|
|
18
|
+
* - pump.mode
|
|
19
|
+
* - pump.active_helper
|
|
20
|
+
*
|
|
21
|
+
* Ziel:
|
|
22
|
+
* - Bereitstellung eines EINDEUTIGEN internen Leistungszustands
|
|
23
|
+
* - Mehrere Ausgaben (semantisch + technisch) aus DIESEM Zustand
|
|
24
|
+
* - Frei nutzbar für Blockly, Shelly, Frequenzumrichter etc.
|
|
25
|
+
*
|
|
26
|
+
* Es gibt:
|
|
27
|
+
* - genau EINEN internen Zustand
|
|
28
|
+
* - KEINE doppelte Status- oder Reason-Logik
|
|
29
|
+
* - KEIN enable/disable-Schalter (immer aktiv, rein passiv)
|
|
30
|
+
*
|
|
31
|
+
* =============================================================
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
'use strict';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Create pump speed recommendation states
|
|
38
|
+
*
|
|
39
|
+
* @param {object} adapter ioBroker adapter instance
|
|
40
|
+
*/
|
|
41
|
+
async function createPumpSpeedStates(adapter) {
|
|
42
|
+
/**
|
|
43
|
+
* -------------------------------------------------------------
|
|
44
|
+
* Channel: pump.speed
|
|
45
|
+
* -------------------------------------------------------------
|
|
46
|
+
* Übergeordneter Kanal für alle Datenpunkte zur
|
|
47
|
+
* Leistungsempfehlung der Hauptpumpe.
|
|
48
|
+
*/
|
|
49
|
+
await adapter.setObjectNotExistsAsync('pump.speed', {
|
|
50
|
+
type: 'channel',
|
|
51
|
+
common: {
|
|
52
|
+
name: 'Pumpen-Leistungsempfehlung',
|
|
53
|
+
},
|
|
54
|
+
native: {},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* -------------------------------------------------------------
|
|
59
|
+
* Interner Kernzustand
|
|
60
|
+
* -------------------------------------------------------------
|
|
61
|
+
*
|
|
62
|
+
* pump.speed.state
|
|
63
|
+
*
|
|
64
|
+
* ZENTRALER interner Zustand, aus dem alle weiteren
|
|
65
|
+
* Ausgaben abgeleitet werden.
|
|
66
|
+
*
|
|
67
|
+
* Dieser State wird:
|
|
68
|
+
* - ausschließlich vom späteren Helper gesetzt
|
|
69
|
+
* - NICHT vom User beschrieben
|
|
70
|
+
*
|
|
71
|
+
* Typische Werte:
|
|
72
|
+
* - off
|
|
73
|
+
* - frost
|
|
74
|
+
* - low
|
|
75
|
+
* - normal
|
|
76
|
+
* - high
|
|
77
|
+
* - boost
|
|
78
|
+
*/
|
|
79
|
+
await adapter.setObjectNotExistsAsync('pump.speed.state', {
|
|
80
|
+
type: 'state',
|
|
81
|
+
common: {
|
|
82
|
+
name: 'Interner Leistungszustand (intern)',
|
|
83
|
+
type: 'string',
|
|
84
|
+
role: 'text',
|
|
85
|
+
read: true,
|
|
86
|
+
write: false,
|
|
87
|
+
},
|
|
88
|
+
native: {},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* -------------------------------------------------------------
|
|
93
|
+
* Semantische Ausgabe
|
|
94
|
+
* -------------------------------------------------------------
|
|
95
|
+
*
|
|
96
|
+
* pump.speed.mode
|
|
97
|
+
*
|
|
98
|
+
* Menschlich lesbare Darstellung des aktuellen
|
|
99
|
+
* Leistungszustands.
|
|
100
|
+
*
|
|
101
|
+
* Inhaltlich identisch zu pump.speed.state,
|
|
102
|
+
* dient jedoch explizit für:
|
|
103
|
+
* - Visualisierung
|
|
104
|
+
* - Debugging
|
|
105
|
+
* - Logik in Blockly / Skripten
|
|
106
|
+
*/
|
|
107
|
+
await adapter.setObjectNotExistsAsync('pump.speed.mode', {
|
|
108
|
+
type: 'state',
|
|
109
|
+
common: {
|
|
110
|
+
name: 'Empfohlener Pumpenmodus',
|
|
111
|
+
type: 'string',
|
|
112
|
+
role: 'text',
|
|
113
|
+
read: true,
|
|
114
|
+
write: false,
|
|
115
|
+
},
|
|
116
|
+
native: {},
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* -------------------------------------------------------------
|
|
121
|
+
* Technische Ausgabe (Prozentwert)
|
|
122
|
+
* -------------------------------------------------------------
|
|
123
|
+
*
|
|
124
|
+
* pump.speed.percent
|
|
125
|
+
*
|
|
126
|
+
* Prozentuale Leistungsempfehlung (0–100 %),
|
|
127
|
+
* abgeleitet aus:
|
|
128
|
+
* - pump.speed.state
|
|
129
|
+
* - User-Mapping unter pump.speed.config.percent.*
|
|
130
|
+
*
|
|
131
|
+
* WICHTIG:
|
|
132
|
+
* - Dieser State ist REIN INFORMATORISCH
|
|
133
|
+
* - Er darf KEINE Hardware direkt steuern
|
|
134
|
+
* - write = false ist ABSICHTLICH
|
|
135
|
+
*/
|
|
136
|
+
await adapter.setObjectNotExistsAsync('pump.speed.percent', {
|
|
137
|
+
type: 'state',
|
|
138
|
+
common: {
|
|
139
|
+
name: 'Empfohlene Pumpenleistung',
|
|
140
|
+
type: 'number',
|
|
141
|
+
role: 'value',
|
|
142
|
+
unit: '%',
|
|
143
|
+
read: true,
|
|
144
|
+
write: false,
|
|
145
|
+
},
|
|
146
|
+
native: {},
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* -------------------------------------------------------------
|
|
151
|
+
* Konfiguration: Prozent-Mapping
|
|
152
|
+
* -------------------------------------------------------------
|
|
153
|
+
*
|
|
154
|
+
* In diesem Bereich definiert der User,
|
|
155
|
+
* wie die einzelnen Leistungszustände
|
|
156
|
+
* in Prozent interpretiert werden sollen.
|
|
157
|
+
*
|
|
158
|
+
* Diese Werte beeinflussen NUR die Ausgabe
|
|
159
|
+
* von pump.speed.percent – NICHT den Zustand
|
|
160
|
+
* der Pumpe selbst.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config', {
|
|
164
|
+
type: 'channel',
|
|
165
|
+
common: {
|
|
166
|
+
name: 'Konfiguration',
|
|
167
|
+
},
|
|
168
|
+
native: {},
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config.percent', {
|
|
172
|
+
type: 'channel',
|
|
173
|
+
common: {
|
|
174
|
+
name: 'Prozent-Mapping',
|
|
175
|
+
},
|
|
176
|
+
native: {},
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Frostschutz
|
|
181
|
+
*/
|
|
182
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config.percent.frost', {
|
|
183
|
+
type: 'state',
|
|
184
|
+
common: {
|
|
185
|
+
name: 'Frostschutz (%)',
|
|
186
|
+
type: 'number',
|
|
187
|
+
role: 'value',
|
|
188
|
+
unit: '%',
|
|
189
|
+
read: true,
|
|
190
|
+
write: true,
|
|
191
|
+
persist: true,
|
|
192
|
+
},
|
|
193
|
+
native: {},
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Niedrige Leistung
|
|
198
|
+
*/
|
|
199
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config.percent.low', {
|
|
200
|
+
type: 'state',
|
|
201
|
+
common: {
|
|
202
|
+
name: 'Niedrige Leistung (%)',
|
|
203
|
+
type: 'number',
|
|
204
|
+
role: 'value',
|
|
205
|
+
unit: '%',
|
|
206
|
+
read: true,
|
|
207
|
+
write: true,
|
|
208
|
+
persist: true,
|
|
209
|
+
},
|
|
210
|
+
native: {},
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Normalbetrieb
|
|
215
|
+
*/
|
|
216
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config.percent.normal', {
|
|
217
|
+
type: 'state',
|
|
218
|
+
common: {
|
|
219
|
+
name: 'Normalbetrieb (%)',
|
|
220
|
+
type: 'number',
|
|
221
|
+
role: 'value',
|
|
222
|
+
unit: '%',
|
|
223
|
+
read: true,
|
|
224
|
+
write: true,
|
|
225
|
+
persist: true,
|
|
226
|
+
},
|
|
227
|
+
native: {},
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Hohe Leistung
|
|
232
|
+
*/
|
|
233
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config.percent.high', {
|
|
234
|
+
type: 'state',
|
|
235
|
+
common: {
|
|
236
|
+
name: 'Hohe Leistung (%)',
|
|
237
|
+
type: 'number',
|
|
238
|
+
role: 'value',
|
|
239
|
+
unit: '%',
|
|
240
|
+
read: true,
|
|
241
|
+
write: true,
|
|
242
|
+
persist: true,
|
|
243
|
+
},
|
|
244
|
+
native: {},
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Boost / Wartung / Rückspülen
|
|
249
|
+
*/
|
|
250
|
+
await adapter.setObjectNotExistsAsync('pump.speed.config.percent.boost', {
|
|
251
|
+
type: 'state',
|
|
252
|
+
common: {
|
|
253
|
+
name: 'Boost / Wartung (%)',
|
|
254
|
+
type: 'number',
|
|
255
|
+
role: 'value',
|
|
256
|
+
unit: '%',
|
|
257
|
+
read: true,
|
|
258
|
+
write: true,
|
|
259
|
+
persist: true,
|
|
260
|
+
},
|
|
261
|
+
native: {},
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
module.exports = {
|
|
266
|
+
createPumpSpeedStates,
|
|
267
|
+
};
|
package/main.js
CHANGED
|
@@ -15,6 +15,7 @@ const pumpHelper = require('./lib/helpers/pumpHelper');
|
|
|
15
15
|
const pumpHelper2 = require('./lib/helpers/pumpHelper2');
|
|
16
16
|
const pumpHelper3 = require('./lib/helpers/pumpHelper3');
|
|
17
17
|
const pumpHelper4 = require('./lib/helpers/pumpHelper4');
|
|
18
|
+
const pumpSpeedHelper = require('./lib/helpers/pumpSpeedHelper'); // NEU
|
|
18
19
|
const speechHelper = require('./lib/helpers/speechHelper');
|
|
19
20
|
const consumptionHelper = require('./lib/helpers/consumptionHelper');
|
|
20
21
|
const solarHelper = require('./lib/helpers/solarHelper');
|
|
@@ -37,6 +38,7 @@ const { createPumpStates } = require('./lib/stateDefinitions/pumpStates');
|
|
|
37
38
|
const { createPumpStates2 } = require('./lib/stateDefinitions/pumpStates2');
|
|
38
39
|
const { createPumpStates3 } = require('./lib/stateDefinitions/pumpStates3');
|
|
39
40
|
const { createPumpStates4 } = require('./lib/stateDefinitions/pumpStates4');
|
|
41
|
+
const { createPumpSpeedStates } = require('./lib/stateDefinitions/pumpSpeedStates'); // NEU
|
|
40
42
|
const { createSolarStates } = require('./lib/stateDefinitions/solarStates');
|
|
41
43
|
const { createPhotovoltaicStates } = require('./lib/stateDefinitions/photovoltaicStates');
|
|
42
44
|
const { createGeneralStates } = require('./lib/stateDefinitions/generalStates');
|
|
@@ -76,6 +78,7 @@ class Poolcontrol extends utils.Adapter {
|
|
|
76
78
|
await createPumpStates2(this);
|
|
77
79
|
await createPumpStates3(this);
|
|
78
80
|
await createPumpStates4(this);
|
|
81
|
+
await createPumpSpeedStates(this); // NEU: Pumpen-Leistungsempfehlung
|
|
79
82
|
|
|
80
83
|
// --- Temperaturverwaltung ---
|
|
81
84
|
await createTemperatureStates(this);
|
|
@@ -143,6 +146,7 @@ class Poolcontrol extends utils.Adapter {
|
|
|
143
146
|
pumpHelper2.init(this);
|
|
144
147
|
pumpHelper3.init(this);
|
|
145
148
|
pumpHelper4.init(this);
|
|
149
|
+
pumpSpeedHelper.init(this); // NEU
|
|
146
150
|
speechHelper.init(this);
|
|
147
151
|
consumptionHelper.init(this);
|
|
148
152
|
solarHelper.init(this);
|
|
@@ -187,6 +191,9 @@ class Poolcontrol extends utils.Adapter {
|
|
|
187
191
|
if (pumpHelper4.cleanup) {
|
|
188
192
|
pumpHelper4.cleanup();
|
|
189
193
|
}
|
|
194
|
+
if (pumpSpeedHelper.cleanup) {
|
|
195
|
+
pumpSpeedHelper.cleanup(); // NEU
|
|
196
|
+
}
|
|
190
197
|
if (speechHelper.cleanup) {
|
|
191
198
|
speechHelper.cleanup();
|
|
192
199
|
}
|
|
@@ -282,6 +289,12 @@ class Poolcontrol extends utils.Adapter {
|
|
|
282
289
|
this.log.warn(`[pumpHelper4] Fehler in handleStateChange: ${e.message}`);
|
|
283
290
|
}
|
|
284
291
|
|
|
292
|
+
try {
|
|
293
|
+
pumpSpeedHelper.handleStateChange(id, state); // NEU
|
|
294
|
+
} catch (e) {
|
|
295
|
+
this.log.warn(`[pumpSpeedHelper] Fehler in handleStateChange: ${e.message}`);
|
|
296
|
+
}
|
|
297
|
+
|
|
285
298
|
try {
|
|
286
299
|
speechHelper.handleStateChange(id, state);
|
|
287
300
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.poolcontrol",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.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",
|