iobroker.poolcontrol 1.2.17 → 1.2.19

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 CHANGED
@@ -189,6 +189,19 @@ New features are added regularly – please refer to the changelog.
189
189
 
190
190
  ## Changelog
191
191
 
192
+ ## 1.2.19 (2026-04-10)
193
+
194
+ - Fixed an interaction issue between `photovoltaicHelper` and `controlHelper` where automatic follow-up pumping could be stopped unexpectedly
195
+ - photovoltaicHelper now respects controlHelper priority and no longer stops the pump while automatic follow-up pumping is active
196
+ - Fixed an issue where `controlHelper` could remain in "nachpumpen" state if the pump was stopped externally
197
+ - `photovoltaic.threshold_w` is now correctly synchronized with the instance configuration
198
+ - Changes to the PV surplus threshold in adapter settings are now reliably reflected in the corresponding read-only datapoint
199
+
200
+ ### 1.2.18
201
+ Release: 07.04.2026
202
+ - Fixed persistence issue for `status.season_active` (no longer overwritten on adapter start)
203
+ - Improved persistence for frost protection settings
204
+
192
205
  ### 1.2.17
193
206
  Release: 07.04.2026
194
207
  - Fix: Resolved an issue where the pressure learning reset button did not trigger reliably. The pumpHelper4 now explicitly subscribes to its relevant internal states to ensure proper event handling.
package/io-package.json CHANGED
@@ -1,22 +1,35 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "poolcontrol",
4
- "version": "1.2.17",
4
+ "version": "1.2.19",
5
5
  "news": {
6
- "1.2.17": {
7
- "en": "Fix: Resolved an issue where the pressure learning reset button did not trigger reliably. The pumpHelper4 now explicitly subscribes to its relevant internal states (e.g. reset and configuration values), ensuring proper event handling and immediate execution of the reset logic.",
8
- "de": "Fix: Problem behoben, bei dem der Reset-Button für das Druck-Lernsystem nicht zuverlässig ausgelöst wurde. Der pumpHelper4 abonniert nun explizit die relevanten eigenen States (z. B. Reset und Konfigurationswerte), wodurch die Eventverarbeitung und die sofortige Ausführung der Reset-Logik sichergestellt sind.",
9
- "ru": "Исправление: решена проблема, из-за которой кнопка сброса обучения давлению не срабатывала надежно. PumpHelper4 теперь явно подписывается на соответствующие внутренние состояния (например, значения сброса и конфигурации), обеспечивая правильную обработку событий и немедленное выполнение логики сброса.",
10
- "pt": "Correção: Resolvido um problema em que o botão de redefinição do aprendizado de pressão não acionava de maneira confiável. O pumpHelper4 agora assina explicitamente seus estados internos relevantes (por exemplo, valores de redefinição e configuração), garantindo o tratamento adequado de eventos e a execução imediata da lógica de redefinição.",
11
- "nl": "Oplossing: een probleem opgelost waarbij de resetknop voor het leren van de druk niet betrouwbaar werd geactiveerd. De pumpHelper4 onderschrijft nu expliciet de relevante interne statussen (bijvoorbeeld reset- en configuratiewaarden), waardoor een juiste afhandeling van gebeurtenissen en onmiddellijke uitvoering van de resetlogica wordt gegarandeerd.",
12
- "fr": "Correction : Résolution d'un problème où le bouton de réinitialisation de l'apprentissage de la pression ne se déclenchait pas de manière fiable. Le PumpHelper4 s'abonne désormais explicitement à ses états internes pertinents (par exemple, les valeurs de réinitialisation et de configuration), garantissant une gestion appropriée des événements et l'exécution immédiate de la logique de réinitialisation.",
13
- "it": "Correzione: risolto un problema per cui il pulsante di ripristino dell'apprendimento della pressione non si attivava in modo affidabile. Il pumpHelper4 ora sottoscrive esplicitamente i suoi stati interni rilevanti (ad esempio valori di ripristino e configurazione), garantendo la corretta gestione degli eventi e l'esecuzione immediata della logica di ripristino.",
14
- "es": "Solución: se resolvió un problema por el cual el botón de reinicio del aprendizaje de presión no se activaba de manera confiable. El pumpHelper4 ahora se suscribe explícitamente a sus estados internos relevantes (por ejemplo, valores de reinicio y configuración), lo que garantiza un manejo adecuado de eventos y la ejecución inmediata de la lógica de reinicio.",
15
- "pl": "Poprawka: rozwiązano problem polegający na tym, że przycisk resetowania uczenia się ciśnienia nie uruchamiał się niezawodnie. PumpHelper4 teraz jawnie subskrybuje swoje odpowiednie stany wewnętrzne (np. wartości resetowania i konfiguracji), zapewniając prawidłową obsługę zdarzeń i natychmiastowe wykonanie logiki resetowania.",
16
- "uk": "Виправлення: вирішено проблему, через яку кнопка скидання навчання тиску не спрацьовувала надійно. PumpHelper4 тепер явно підписується на свої відповідні внутрішні стани (наприклад, значення скидання та конфігурації), забезпечуючи правильну обробку подій і негайне виконання логіки скидання.",
17
- "zh-cn": "修复:解决了压力学习重置按钮无法可靠触发的问题。 PumpHelper4 现在显式订阅其相关的内部状态(例如重置和配置值),确保正确的事件处理和立即执行重置逻辑。"
6
+ "1.2.19": {
7
+ "en": "Bugfix release. Fixes an interaction issue between photovoltaicHelper and controlHelper where automatic follow-up pumping could be interrupted unexpectedly. The photovoltaic stop logic now respects controlHelper priority and no longer stops the pump while automatic follow-up pumping is active. In addition, the read-only state photovoltaic.threshold_w is now synchronized correctly with the instance configuration so that changes in the adapter settings are reflected reliably in the visible datapoint.",
8
+ "de": "Bugfix-Release. Behebt ein Zusammenspielproblem zwischen photovoltaicHelper und controlHelper, durch das automatisches Nachpumpen unerwartet unterbrochen werden konnte. Die Abschaltlogik des PV-Helfers respektiert nun den Vorrang des controlHelper und stoppt die Pumpe nicht mehr, solange automatisches Nachpumpen aktiv ist. Zusätzlich wird der schreibgeschützte Datenpunkt photovoltaic.threshold_w jetzt korrekt mit der Instanzkonfiguration synchronisiert, sodass Änderungen in den Adaptereinstellungen zuverlässig im sichtbaren Datenpunkt übernommen werden.",
9
+ "ru": "Выпуск с исправлением ошибок. Устранена проблема взаимодействия между фотоэлектрическим помощником и controlHelper, из-за которой автоматическая последующая откачка могла неожиданно прерваться. Логика фотоэлектрической остановки теперь учитывает приоритет controlHelper и больше не останавливает насос, пока активна автоматическая последующая откачка. Кроме того, состояние только для чтения photovoltaic.threshold_w теперь правильно синхронизируется с конфигурацией экземпляра, так что изменения в настройках адаптера надежно отражаются в видимой точке данных.",
10
+ "pt": "Lançamento de correção de bug. Corrige um problema de interação entre photovoltaicHelper e controlHelper onde o bombeamento de acompanhamento automático poderia ser interrompido inesperadamente. A lógica de paragem fotovoltaica respeita agora a prioridade controlHelper e não para a bomba enquanto o bombeamento de acompanhamento automático estiver ativo. Além disso, o estado somente leitura photovoltaic.threshold_w agora está sincronizado corretamente com a configuração da instância para que as alterações nas configurações do adaptador sejam refletidas de forma confiável no ponto de dados visível.",
11
+ "nl": "Bugfix-release. Er is een interactieprobleem opgelost tussen photovoltaicHelper en controlHelper waarbij automatisch napompen onverwacht kon worden onderbroken. De fotovoltaïsche stoplogica respecteert nu de prioriteit van controlHelper en stopt de pomp niet langer terwijl automatisch napompen actief is. Bovendien wordt de alleen-lezen status photovoltaic.threshold_w nu correct gesynchroniseerd met de instanceconfiguratie, zodat wijzigingen in de adapterinstellingen betrouwbaar worden weerspiegeld in het zichtbare datapunt.",
12
+ "fr": "Version de correction de bugs. Corrige un problème d'interaction entre photovoltaicHelper et controlHelper où le pompage de suivi automatique pouvait être interrompu de manière inattendue. La logique d'arrêt photovoltaïque respecte désormais la priorité controlHelper et n'arrête plus la pompe lorsque le pompage de suivi automatique est actif. De plus, l'état en lecture seule photovoltaic.threshold_w est désormais correctement synchronisé avec la configuration de l'instance afin que les modifications apportées aux paramètres de l'adaptateur soient reflétées de manière fiable dans le point de données visible.",
13
+ "it": "Rilascio di correzione bug. Risolve un problema di interazione tra fotovoltaicoHelper e controlHelper in cui il pompaggio automatico di follow-up poteva essere interrotto inaspettatamente. La logica di arresto fotovoltaico ora rispetta la priorità di controlHelper e non arresta più la pompa mentre è attivo il pompaggio di follow-up automatico. Inoltre, lo stato di sola lettura fotovoltaico.threshold_w è ora sincronizzato correttamente con la configurazione dell'istanza in modo che le modifiche nelle impostazioni dell'adattatore si riflettano in modo affidabile nel punto dati visibile.",
14
+ "es": "Lanzamiento de corrección de errores. Soluciona un problema de interacción entre photovoltaicHelper y controlHelper donde el bombeo de seguimiento automático podría interrumpirse inesperadamente. La lógica de parada fotovoltaica ahora respeta la prioridad de controlHelper y ya no detiene la bomba mientras el bombeo de seguimiento automático está activo. Además, el estado de solo lectura photovoltaic.threshold_w ahora está sincronizado correctamente con la configuración de la instancia para que los cambios en la configuración del adaptador se reflejen de manera confiable en el punto de datos visible.",
15
+ "pl": "Wydanie poprawek błędów. Rozwiązuje problem interakcji pomiędzy photovoltaicHelper i controlHelper, powodujący nieoczekiwane przerwanie automatycznego pompowania uzupełniającego. Logika zatrzymania fotowoltaiki uwzględnia teraz priorytet ControlHelper i nie zatrzymuje już pompy, gdy aktywne jest automatyczne pompowanie uzupełniające. Ponadto stan tylko do odczytu photovoltaic.threshold_w jest teraz poprawnie zsynchronizowany z konfiguracją instancji, dzięki czemu zmiany w ustawieniach adaptera niezawodnie odzwierciedlane w widocznym punkcie danych.",
16
+ "uk": "Реліз виправлення помилок. Вирішує проблему взаємодії між photovoltaicHelper і controlHelper, через яку автоматичне подальше відкачування може бути несподівано перервано. Логіка фотоелектричної зупинки тепер враховує пріоритет controlHelper і більше не зупиняє насос, поки активна автоматична подальша перекачування. Крім того, стан тільки для читання photovoltaic.threshold_w тепер правильно синхронізовано з конфігурацією екземпляра, щоб зміни в налаштуваннях адаптера надійно відображалися у видимій точці даних.",
17
+ "zh-cn": "错误修复版本。修复了 PVHelper 和 controlHelper 之间的交互问题,其中自动后续泵送可能会意外中断。光伏停止逻辑现在尊重 controlHelper 优先级,并且在自动后续泵送处于活动状态时不再停止泵。此外,只读状态 PV.threshold_w 现在已与实例配置正确同步,以便适配器设置中的更改能够可靠地反映在可见数据点中。"
18
18
  },
19
- "1.2.16": {
19
+ "1.2.18": {
20
+ "en": "Fixed persistence issues for season and frost states. Season_active is now no longer overwritten on adapter start. Frost protection settings are now stored persistently.",
21
+ "de": "Persistenzprobleme für Saison- und Frost-States behoben. season_active wird beim Adapterstart nicht mehr überschrieben. Frostschutz-Einstellungen werden nun dauerhaft gespeichert.",
22
+ "ru": "Исправлены проблемы с постоянством состояний сезона и заморозков. Season_active теперь больше не перезаписывается при запуске адаптера. Настройки защиты от замерзания теперь сохраняются постоянно.",
23
+ "pt": "Corrigidos problemas de persistência para estados sazonais e de geada. Season_active agora não é mais substituído na inicialização do adaptador. As configurações de proteção contra congelamento agora são armazenadas de forma persistente.",
24
+ "nl": "Vaste persistentieproblemen voor seizoens- en vorsttoestanden. Season_active wordt nu niet langer overschreven bij het starten van de adapter. De vorstbeveiligingsinstellingen worden nu permanent opgeslagen.",
25
+ "fr": "Correction de problèmes de persistance pour les états de saison et de gel. Season_active n’est désormais plus écrasé au démarrage de l’adaptateur. Les paramètres de protection contre le gel sont désormais stockés de manière persistante.",
26
+ "it": "Risolti i problemi di persistenza relativi alla stagione e agli stati di gelo. Season_active ora non viene più sovrascritto all'avvio dell'adattatore. Le impostazioni della protezione antigelo vengono ora memorizzate in modo persistente.",
27
+ "es": "Se corrigieron problemas de persistencia para los estados de temporada y heladas. Season_active ya no se sobrescribe al iniciar el adaptador. Los ajustes de protección contra heladas ahora se almacenan de forma persistente.",
28
+ "pl": "Naprawiono problemy z trwałością stanów pór roku i mrozu. Sezon_aktywny nie jest już nadpisywany podczas uruchamiania adaptera. Ustawienia ochrony przed zamarzaniem są teraz przechowywane trwale.",
29
+ "uk": "Виправлено проблеми стійкості для сезону та морозу. Season_active тепер більше не перезаписується під час запуску адаптера. Параметри захисту від замерзання тепер зберігаються постійно.",
30
+ "zh-cn": "修复了季节和霜冻状态的持久性问题。 Season_active 现在不再在适配器启动时被覆盖。防霜保护设置现在可以永久存储。"
31
+ },
32
+ "1.2.17": {
20
33
  "en": "Fix: Resolved an issue where the pressure learning reset button did not trigger reliably. The pumpHelper4 now explicitly subscribes to its relevant internal states (e.g. reset and configuration values), ensuring proper event handling and immediate execution of the reset logic.",
21
34
  "de": "Fix: Problem behoben, bei dem der Reset-Button für das Druck-Lernsystem nicht zuverlässig ausgelöst wurde. Der pumpHelper4 abonniert nun explizit die relevanten eigenen States (z. B. Reset und Konfigurationswerte), wodurch die Eventverarbeitung und die sofortige Ausführung der Reset-Logik sichergestellt sind.",
22
35
  "ru": "Исправление: решена проблема, из-за которой кнопка сброса обучения давлению не срабатывала надежно. PumpHelper4 теперь явно подписывается на соответствующие внутренние состояния (например, значения сброса и конфигурации), обеспечивая правильную обработку событий и немедленное выполнение логики сброса.",
@@ -54,32 +67,6 @@
54
67
  "pl": "Dodaj obsługę i18n dla pomocy chemicznej (stany wspólne i teksty pomocy), rozwiąż problemy z React spowodowane nieprawidłowymi tłumaczeniami i ulepsz wielojęzyczne wskazówki dla użytkownika.",
55
68
  "uk": "Додайте підтримку i18n для довідки з хімії (common.states і тексти довідки), виправте проблеми з React, викликані недійсними перекладами, і покращте багатомовні інструкції для користувачів.",
56
69
  "zh-cn": "添加对化学帮助(common.states 和帮助文本)的 i18n 支持,修复无效翻译导致的 React 问题,并改进多语言用户指南。"
57
- },
58
- "1.2.12": {
59
- "en": "Repository cleanup and fixes for ioBroker repository checker. Restored required native object in io-package.json, removed invalid properties and updated README.",
60
- "de": "Repository-Bereinigung und Fehlerbehebungen für den ioBroker Repository-Checker. Erforderliches native-Objekt in der io-package.json wiederhergestellt, ungültige Eigenschaften entfernt und README aktualisiert.",
61
- "ru": "Очистка репозитория и исправления для средства проверки репозитория ioBroker. Восстановлен необходимый собственный объект в io-package.json, удалены недопустимые свойства и обновлен README.",
62
- "pt": "Limpeza de repositório e correções para verificador de repositório ioBroker. Objeto nativo necessário restaurado em io-package.json, propriedades inválidas removidas e README atualizado.",
63
- "nl": "Opschonen van opslagplaatsen en oplossingen voor ioBroker-repositorycontrole. Vereist native object in io-package.json hersteld, ongeldige eigenschappen verwijderd en README bijgewerkt.",
64
- "fr": "Nettoyage du référentiel et correctifs pour le vérificateur de référentiel ioBroker. Objet natif requis restauré dans io-package.json, suppression des propriétés non valides et mise à jour du README.",
65
- "it": "Pulizia del repository e correzioni per il controllo del repository ioBroker. Oggetto nativo richiesto ripristinato in io-package.json, proprietà non valide rimosse e README aggiornato.",
66
- "es": "Limpieza del repositorio y correcciones para el verificador del repositorio de ioBroker. Se restauró el objeto nativo requerido en io-package.json, se eliminaron propiedades no válidas y se actualizó README.",
67
- "pl": "Oczyszczenie repozytorium i poprawki dla modułu sprawdzania repozytorium ioBroker. Przywrócono wymagany obiekt natywny w io-package.json, usunięto nieprawidłowe właściwości i zaktualizowano plik README.",
68
- "uk": "Очищення сховища та виправлення для засобу перевірки сховища ioBroker. Відновлено необхідний рідний об’єкт у io-package.json, видалено недійсні властивості та оновлено README.",
69
- "zh-cn": "ioBroker 存储库检查器的存储库清理和修复。恢复了 io-package.json 中所需的本机对象,删除了无效属性并更新了 README。"
70
- },
71
- "1.2.10": {
72
- "en": "Improved German translations and terminology in admin UI (jsonConfig). Fixed incorrect or misleading sensor names (e.g. flow vs temperature sensors) and improved overall wording and consistency.",
73
- "de": "Verbesserte deutsche Übersetzungen und Begrifflichkeiten in der Admin-Oberfläche (jsonConfig). Falsche bzw. missverständliche Sensorbezeichnungen (z. B. Flow vs. Temperatursensoren) korrigiert und allgemeine Formulierungen sowie Konsistenz verbessert.",
74
- "ru": "Улучшены немецкие переводы и терминология в пользовательском интерфейсе администратора (jsonConfig). Исправлены неправильные или вводящие в заблуждение названия датчиков (например, датчики расхода и температуры), а также улучшены общие формулировки и согласованность.",
75
- "pt": "Traduções e terminologia em alemão aprimoradas na interface de administração (jsonConfig). Corrigimos nomes de sensores incorretos ou enganosos (por exemplo, sensores de fluxo versus temperatura) e melhoramos o texto e a consistência geral.",
76
- "nl": "Verbeterde Duitse vertalingen en terminologie in de beheerdersinterface (jsonConfig). Foutieve of misleidende sensornamen opgelost (bijv. flow- versus temperatuursensoren) en verbeterde algemene bewoording en consistentie.",
77
- "fr": "Traductions et terminologie allemandes améliorées dans l'interface utilisateur d'administration (jsonConfig). Correction des noms de capteurs incorrects ou trompeurs (par exemple, capteurs de débit ou de température) et amélioration de la formulation et de la cohérence globales.",
78
- "it": "Traduzioni e terminologia tedesca migliorate nell'interfaccia utente di amministrazione (jsonConfig). Risolti i nomi dei sensori errati o fuorvianti (ad esempio sensori di flusso o di temperatura) e migliorata la formulazione e la coerenza generale.",
79
- "es": "Traducciones y terminología alemanas mejoradas en la interfaz de usuario de administración (jsonConfig). Se corrigieron nombres de sensores incorrectos o engañosos (por ejemplo, sensores de flujo versus temperatura) y se mejoraron la redacción y coherencia generales.",
80
- "pl": "Ulepszone niemieckie tłumaczenia i terminologia w interfejsie administratora (jsonConfig). Poprawiono nieprawidłowe lub wprowadzające w błąd nazwy czujników (np. czujniki przepływu i temperatury) oraz poprawiono ogólne sformułowanie i spójność.",
81
- "uk": "Покращено німецький переклад і термінологію в інтерфейсі адміністратора (jsonConfig). Виправлено неправильні або оманливі назви датчиків (наприклад, датчики потоку чи температури) і покращено загальне формулювання та послідовність.",
82
- "zh-cn": "改进了管理 UI (jsonConfig) 中的德语翻译和术语。修复了不正确或误导性的传感器名称(例如流量与温度传感器)并改进了整体措辞和一致性。"
83
70
  }
84
71
  },
85
72
  "titleLang": {
@@ -131,10 +131,17 @@ async function _runDailyCirculationCheck() {
131
131
  }
132
132
  }
133
133
 
134
+ async function _isAutoPumpingStillRunning() {
135
+ const activeHelper = (await adapter.getStateAsync('pump.active_helper'))?.val || '';
136
+ const pumpSwitch = !!(await adapter.getStateAsync('pump.pump_switch'))?.val;
137
+
138
+ return activeHelper === 'controlHelper' && pumpSwitch === true;
139
+ }
140
+
134
141
  /**
135
142
  * Startet automatisches Nachpumpen.
136
143
  *
137
- * @param {number} missingLiter - Fehlende Umwälzmenge in Litern
144
+ * @param {number} missingLiter Fehlende Umwälzmenge in Litern
138
145
  */
139
146
  async function _startAutoPumping(missingLiter) {
140
147
  try {
@@ -160,6 +167,22 @@ async function _startAutoPumping(missingLiter) {
160
167
  const total = Math.round((await adapter.getStateAsync('circulation.daily_total'))?.val || 0);
161
168
  const required = Math.round((await adapter.getStateAsync('circulation.daily_required'))?.val || 0);
162
169
 
170
+ const stillRunning = await _isAutoPumpingStillRunning();
171
+ if (!stillRunning) {
172
+ adapter.clearInterval(autoPumpingInterval);
173
+ autoPumpingInterval = null;
174
+
175
+ adapter.log.warn(
176
+ '[controlHelper] automatic pumping aborted because pump control was lost or pump_switch is no longer true.',
177
+ );
178
+
179
+ await adapter.setStateAsync('pump.mode', { val: previousPumpMode, ack: true });
180
+ await adapter.setStateAsync('pump.active_helper', { val: '', ack: true });
181
+ await adapter.setStateAsync('pump.reason', { val: '', ack: true });
182
+ previousPumpMode = null;
183
+ return;
184
+ }
185
+
163
186
  if (total >= required) {
164
187
  adapter.clearInterval(autoPumpingInterval);
165
188
  autoPumpingInterval = null;
@@ -44,6 +44,7 @@ const photovoltaicHelper = {
44
44
  this.adapter.subscribeStates('photovoltaic.ignore_on_circulation');
45
45
  this.adapter.subscribeStates('status.season_active');
46
46
  this.adapter.subscribeStates('pump.mode');
47
+ this.adapter.subscribeStates('pump.active_helper');
47
48
 
48
49
  this._safeRecalc('init');
49
50
  this.adapter.log.info('[photovoltaicHelper] Initialization completed.');
@@ -76,8 +77,8 @@ const photovoltaicHelper = {
76
77
  return;
77
78
  }
78
79
 
79
- if (id.endsWith('status.season_active') || id.endsWith('pump.mode')) {
80
- await this._safeRecalc('mode/season');
80
+ if (id.endsWith('status.season_active') || id.endsWith('pump.mode') || id.endsWith('pump.active_helper')) {
81
+ await this._safeRecalc('mode/season/owner');
81
82
  return;
82
83
  }
83
84
  } catch (err) {
@@ -211,6 +212,11 @@ const photovoltaicHelper = {
211
212
  return this._maybeStopPump(false, afterrunMin, 'pv_ended_afterrun');
212
213
  },
213
214
 
215
+ async _isControlHelperPriorityActive() {
216
+ const activeHelper = (await this.adapter.getStateAsync('pump.active_helper'))?.val || '';
217
+ return activeHelper === 'controlHelper';
218
+ },
219
+
214
220
  async _maybeStartPump(reason) {
215
221
  if (this._desiredPump === true) {
216
222
  return;
@@ -226,6 +232,19 @@ const photovoltaicHelper = {
226
232
  },
227
233
 
228
234
  async _maybeStopPump(immediate, afterrunMin, tag) {
235
+ if (await this._isControlHelperPriorityActive()) {
236
+ if (this.afterrunTimer) {
237
+ clearTimeout(this.afterrunTimer);
238
+ this.afterrunTimer = null;
239
+ }
240
+ this._pvPumpHoldUntil = 0;
241
+ this._desiredPump = false;
242
+ this.adapter.log.debug(
243
+ `[photovoltaicHelper] Stop '${tag}' suppressed because controlHelper currently has priority.`,
244
+ );
245
+ return;
246
+ }
247
+
229
248
  if (immediate || !afterrunMin || afterrunMin <= 0) {
230
249
  if (this._desiredPump === false) {
231
250
  return;
@@ -242,6 +261,14 @@ const photovoltaicHelper = {
242
261
  clearTimeout(this.afterrunTimer);
243
262
  }
244
263
  this.afterrunTimer = setTimeout(async () => {
264
+ if (await this._isControlHelperPriorityActive()) {
265
+ this.adapter.log.debug(
266
+ '[photovoltaicHelper] Afterrun stop suppressed because controlHelper currently has priority.',
267
+ );
268
+ this._desiredPump = false;
269
+ return;
270
+ }
271
+
245
272
  const active = !!(await this.adapter.getStateAsync('photovoltaic.surplus_active'))?.val;
246
273
  if (active) {
247
274
  this.adapter.log.debug('[photovoltaicHelper] Afterrun canceled – surplus active again.');
@@ -146,7 +146,7 @@ async function createPhotovoltaicStates(adapter) {
146
146
  unit: 'W',
147
147
  read: true,
148
148
  write: false,
149
- def: 200,
149
+ def: Number(adapter.config?.threshold_w ?? 200),
150
150
  },
151
151
  {
152
152
  id: 'status_text',
@@ -212,6 +212,11 @@ async function createPhotovoltaicStates(adapter) {
212
212
  }
213
213
  }
214
214
 
215
+ await adapter.setStateAsync('photovoltaic.threshold_w', {
216
+ val: Number(adapter.config?.threshold_w ?? 200),
217
+ ack: true,
218
+ });
219
+
215
220
  adapter.log.info('[createPhotovoltaicStates] Initialization completed.');
216
221
  }
217
222
 
@@ -91,13 +91,23 @@ async function createPumpStates(adapter) {
91
91
  role: 'switch',
92
92
  read: true,
93
93
  write: true,
94
+ persist: true, // FIX: dauerhaft speichern
94
95
  },
95
96
  native: {},
96
97
  });
97
- await adapter.setStateAsync('pump.frost_protection_active', {
98
- val: adapter.config.frost_protection_active,
99
- ack: true,
100
- });
98
+
99
+ // FIX: nur initial setzen, wenn noch kein Wert existiert
100
+ const existingFrostProtectionActive = await adapter.getStateAsync('pump.frost_protection_active');
101
+ if (
102
+ existingFrostProtectionActive === null ||
103
+ existingFrostProtectionActive.val === null ||
104
+ existingFrostProtectionActive.val === undefined
105
+ ) {
106
+ await adapter.setStateAsync('pump.frost_protection_active', {
107
+ val: adapter.config.frost_protection_active,
108
+ ack: true,
109
+ });
110
+ }
101
111
 
102
112
  // Frostschutz-Temperatur
103
113
  await adapter.setObjectNotExistsAsync('pump.frost_protection_temp', {
@@ -116,9 +126,23 @@ async function createPumpStates(adapter) {
116
126
  unit: '°C',
117
127
  read: true,
118
128
  write: true,
129
+ persist: true, // FIX: dauerhaft speichern
119
130
  },
120
131
  native: {},
121
132
  });
133
+
134
+ // FIX: nur initial setzen, wenn noch kein Wert existiert
135
+ const existingFrostProtectionTemp = await adapter.getStateAsync('pump.frost_protection_temp');
136
+ if (
137
+ existingFrostProtectionTemp === null ||
138
+ existingFrostProtectionTemp.val === null ||
139
+ existingFrostProtectionTemp.val === undefined
140
+ ) {
141
+ await adapter.setStateAsync('pump.frost_protection_temp', {
142
+ val: adapter.config.frost_protection_temp,
143
+ ack: true,
144
+ });
145
+ }
122
146
  await adapter.setStateAsync('pump.frost_protection_temp', {
123
147
  val: adapter.config.frost_protection_temp,
124
148
  ack: true,
package/main.js CHANGED
@@ -135,12 +135,6 @@ class Poolcontrol extends utils.Adapter {
135
135
  // --- Statusübersicht ---
136
136
  await createStatusStates(this);
137
137
 
138
- // Saisonstatus aus Config übernehmen
139
- await this.setStateAsync('status.season_active', {
140
- val: this.config.season_active,
141
- ack: true,
142
- });
143
-
144
138
  // --- Control States ---
145
139
  await createControlStates(this);
146
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.poolcontrol",
3
- "version": "1.2.17",
3
+ "version": "1.2.19",
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",