iobroker.poolcontrol 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -15
- package/io-package.json +27 -27
- package/lib/helpers/solarInsightsHelper.js +34 -47
- package/lib/helpers/solarLogbookHelper.js +77 -87
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -188,6 +188,16 @@ New features are added regularly – please refer to the changelog.
|
|
|
188
188
|
---
|
|
189
189
|
|
|
190
190
|
## Changelog
|
|
191
|
+
### 1.3.5 (2026-04-19)
|
|
192
|
+
|
|
193
|
+
- Fixed critical i18n issue in solarInsightsHelper and solarLogbookHelper that could lead to instability or crashes
|
|
194
|
+
- Switched translation handling to I18n.translate() for stable and consistent i18n behavior
|
|
195
|
+
|
|
196
|
+
### 1.3.4 (2026-04-19)
|
|
197
|
+
|
|
198
|
+
- Fixed critical i18n issue in solarInsightsHelper and solarLogbookHelper that could lead to instability or crashes
|
|
199
|
+
- Switched translation handling to I18n.translate() for stable and consistent i18n behavior
|
|
200
|
+
|
|
191
201
|
### 1.3.3 (2026-04-18)
|
|
192
202
|
|
|
193
203
|
- Added solar COP calculation to evaluate system efficiency
|
|
@@ -209,21 +219,6 @@ New features are added regularly – please refer to the changelog.
|
|
|
209
219
|
- Improvement: Consistent pump status display for Solar and Solar Extended
|
|
210
220
|
- Minor bug fixes and internal optimizations
|
|
211
221
|
|
|
212
|
-
### 1.3.0 (2026-04-16)
|
|
213
|
-
|
|
214
|
-
- Added extended solar control (delta-based temperature logic)
|
|
215
|
-
- Support for external actuator control (boolean/socket)
|
|
216
|
-
- Standard / Extended solar mode selection
|
|
217
|
-
- Priority and blocking logic (controlHelper, timeHelper, pump mode, season)
|
|
218
|
-
- Improved status states (active, request, blocked, reason, info)
|
|
219
|
-
- Added i18n support for solar extended status texts
|
|
220
|
-
- Added selectable configuration for temperature source and control type
|
|
221
|
-
|
|
222
|
-
### 1.2.22 (2026-04-16)
|
|
223
|
-
|
|
224
|
-
- Added new read-only state `solar.request_active` to indicate when solar logic would request the pump
|
|
225
|
-
- Improved solarHelper robustness by handling invalid temperature values
|
|
226
|
-
|
|
227
222
|
## Support
|
|
228
223
|
- [ioBroker Forum](https://forum.iobroker.net/)
|
|
229
224
|
- [GitHub Issues](https://github.com/DasBo1975/ioBroker.poolcontrol/issues)
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "poolcontrol",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.5",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.3.5": {
|
|
7
|
+
"en": "Fixed critical i18n issue in solarInsightsHelper and solarLogbookHelper that could lead to instability or crashes. Switched translation handling to I18n.translate() to ensure stable operation.",
|
|
8
|
+
"de": "Kritischer i18n-Fehler in solarInsightsHelper und solarLogbookHelper behoben, der zu Instabilität oder Abstürzen führen konnte. Übersetzungen wurden auf I18n.translate() umgestellt, um einen stabilen Betrieb sicherzustellen.",
|
|
9
|
+
"ru": "Исправлена критическая проблема i18n в SolarInsightsHelper и SolarLogbookHelper, которая могла привести к нестабильности или сбоям. Обработку перевода переключили на I18n.translate() для обеспечения стабильной работы.",
|
|
10
|
+
"pt": "Foi corrigido um problema crítico do i18n no solarInsightsHelper e no solarLogbookHelper que poderia causar instabilidade ou travamentos. Manipulação de tradução alterada para I18n.translate() para garantir uma operação estável.",
|
|
11
|
+
"nl": "Een kritiek i18n-probleem in solarInsightsHelper en solarLogbookHelper opgelost dat tot instabiliteit of crashes kon leiden. De verwerking van de vertalingen is gewijzigd naar I18n.translate() om een stabiele werking te garanderen.",
|
|
12
|
+
"fr": "Correction d'un problème i18n critique dans solarInsightsHelper et solarLogbookHelper qui pouvait entraîner une instabilité ou des plantages. Gestion de la traduction commutée vers I18n.translate() pour garantir un fonctionnement stable.",
|
|
13
|
+
"it": "Risolto un problema critico i18n in solarInsightsHelper e solarLogbookHelper che poteva portare a instabilità o arresti anomali. Modificata la gestione della traduzione su I18n.translate() per garantire un funzionamento stabile.",
|
|
14
|
+
"es": "Se solucionó un problema crítico de i18n en solarInsightsHelper y solarLogbookHelper que podía provocar inestabilidad o fallas. Se cambió el manejo de traducción a I18n.translate() para garantizar un funcionamiento estable.",
|
|
15
|
+
"pl": "Naprawiono krytyczny problem i18n w programach solarInsightsHelper i solarLogbookHelper, który mógł prowadzić do niestabilności lub awarii. Przełączono obsługę tłumaczeń na I18n.translate(), aby zapewnić stabilne działanie.",
|
|
16
|
+
"uk": "Виправлено критичну проблему i18n у solarInsightsHelper і solarLogbookHelper, яка могла призвести до нестабільності або збоїв. Перемкнуто обробку перекладу на I18n.translate(), щоб забезпечити стабільну роботу.",
|
|
17
|
+
"zh-cn": "修复了 SolarInsightsHelper 和 SolarLogbookHelper 中可能导致不稳定或崩溃的关键 i18n 问题。将翻译处理切换为 I18n.translate() 以确保稳定运行。"
|
|
18
|
+
},
|
|
19
|
+
"1.3.4": {
|
|
20
|
+
"en": "Fixed critical i18n issue in solarInsightsHelper and solarLogbookHelper that could lead to instability or crashes. Switched translation handling to I18n.translate() to ensure stable operation.",
|
|
21
|
+
"de": "Kritischer i18n-Fehler in solarInsightsHelper und solarLogbookHelper behoben, der zu Instabilität oder Abstürzen führen konnte. Übersetzungen wurden auf I18n.translate() umgestellt, um einen stabilen Betrieb sicherzustellen.",
|
|
22
|
+
"ru": "Исправлена критическая проблема i18n в SolarInsightsHelper и SolarLogbookHelper, которая могла привести к нестабильности или сбоям. Обработку перевода переключили на I18n.translate() для обеспечения стабильной работы.",
|
|
23
|
+
"pt": "Foi corrigido um problema crítico do i18n no solarInsightsHelper e no solarLogbookHelper que poderia causar instabilidade ou travamentos. Manipulação de tradução alterada para I18n.translate() para garantir uma operação estável.",
|
|
24
|
+
"nl": "Een kritiek i18n-probleem in solarInsightsHelper en solarLogbookHelper opgelost dat tot instabiliteit of crashes kon leiden. De verwerking van de vertalingen is gewijzigd naar I18n.translate() om een stabiele werking te garanderen.",
|
|
25
|
+
"fr": "Correction d'un problème i18n critique dans solarInsightsHelper et solarLogbookHelper qui pouvait entraîner une instabilité ou des plantages. Gestion de la traduction commutée vers I18n.translate() pour garantir un fonctionnement stable.",
|
|
26
|
+
"it": "Risolto un problema critico i18n in solarInsightsHelper e solarLogbookHelper che poteva portare a instabilità o arresti anomali. Modificata la gestione della traduzione su I18n.translate() per garantire un funzionamento stabile.",
|
|
27
|
+
"es": "Se solucionó un problema crítico de i18n en solarInsightsHelper y solarLogbookHelper que podía provocar inestabilidad o fallas. Se cambió el manejo de traducción a I18n.translate() para garantizar un funcionamiento estable.",
|
|
28
|
+
"pl": "Naprawiono krytyczny problem i18n w programach solarInsightsHelper i solarLogbookHelper, który mógł prowadzić do niestabilności lub awarii. Przełączono obsługę tłumaczeń na I18n.translate(), aby zapewnić stabilne działanie.",
|
|
29
|
+
"uk": "Виправлено критичну проблему i18n у solarInsightsHelper і solarLogbookHelper, яка могла призвести до нестабільності або збоїв. Перемкнуто обробку перекладу на I18n.translate(), щоб забезпечити стабільну роботу.",
|
|
30
|
+
"zh-cn": "修复了 SolarInsightsHelper 和 SolarLogbookHelper 中可能导致不稳定或崩溃的关键 i18n 问题。将翻译处理切换为 I18n.translate() 以确保稳定运行。"
|
|
31
|
+
},
|
|
6
32
|
"1.3.3": {
|
|
7
33
|
"en": "Added solar COP calculation and solar logbook helper with human-readable daily entries based on solar insights.",
|
|
8
34
|
"de": "Solar-COP-Berechnung sowie Solar-Logbuch-Helper mit verständlichen Tages-Einträgen basierend auf Solar-Insights hinzugefügt.",
|
|
@@ -41,32 +67,6 @@
|
|
|
41
67
|
"pl": "Poprawka: Solar Extended teraz poprawnie steruje pompą i integruje się z istniejącą obsługą stanu solarnego. Pomocnik używa teraz mowy.solar_active jak standardowej logiki solarnej, zapewniając spójne wyświetlanie stanu i zachowanie pompy. Drobne poprawki i optymalizacje.",
|
|
42
68
|
"uk": "Виправлення: Solar Extended тепер правильно керує насосом та інтегрується з існуючою обробкою стану сонячної енергії. Помічник тепер використовує speak.solar_active як стандартну сонячну логіку, забезпечуючи послідовне відображення стану насоса та поведінку. Незначні виправлення та оптимізації.",
|
|
43
69
|
"zh-cn": "修复:Solar Extended 现在可以正确控制泵并与现有的太阳能状态处理集成。助手现在像标准太阳能逻辑一样使用pepe.solar_active,确保一致的泵状态显示和行为。小修复和优化。"
|
|
44
|
-
},
|
|
45
|
-
"1.3.0": {
|
|
46
|
-
"en": "Added extended solar control with selectable standard/extended mode, delta-based control logic, external actuator support, priority/blocking handling, and localized status texts.",
|
|
47
|
-
"de": "Erweiterte Solarsteuerung ergänzt mit wählbarem Standard-/Extended-Modus, differenzbasierter Regelung, externer Aktor-Ansteuerung, Vorrang-/Blockierlogik und lokalisierten Statusmeldungen.",
|
|
48
|
-
"ru": "Добавлено расширенное управление солнечной батареей с возможностью выбора стандартного/расширенного режима, логикой управления на основе дельты, поддержкой внешнего исполнительного механизма, обработкой приоритета/блокировки и локализованными текстами состояния.",
|
|
49
|
-
"pt": "Adicionado controle solar estendido com modo padrão/estendido selecionável, lógica de controle baseada em delta, suporte a atuador externo, tratamento de prioridade/bloqueio e textos de status localizados.",
|
|
50
|
-
"nl": "Uitgebreide zonneregeling toegevoegd met selecteerbare standaard/uitgebreide modus, op delta gebaseerde besturingslogica, ondersteuning voor externe actuatoren, afhandeling van prioriteiten/blokkeringen en gelokaliseerde statusteksten.",
|
|
51
|
-
"fr": "Ajout d'un contrôle solaire étendu avec mode standard/étendu sélectionnable, logique de contrôle basée sur le delta, prise en charge d'actionneurs externes, gestion des priorités/blocages et textes d'état localisés.",
|
|
52
|
-
"it": "Aggiunto controllo solare esteso con modalità standard/estesa selezionabile, logica di controllo basata su delta, supporto per attuatori esterni, gestione priorità/blocco e testi di stato localizzati.",
|
|
53
|
-
"es": "Se agregó control solar extendido con modo estándar/extendido seleccionable, lógica de control basada en delta, soporte de actuador externo, manejo de prioridad/bloqueo y textos de estado localizados.",
|
|
54
|
-
"pl": "Dodano rozszerzone sterowanie solarne z możliwością wyboru trybu standardowego/rozszerzonego, logikę sterowania opartą na delta, obsługę zewnętrznych siłowników, obsługę priorytetów/blokowania i zlokalizowane teksty stanu.",
|
|
55
|
-
"uk": "Додано розширене керування геліосистемою з вибором стандартного/розширеного режиму, логікою керування на основі дельти, підтримкою зовнішнього приводу, обробкою пріоритетів/блокування та локалізованими текстами стану.",
|
|
56
|
-
"zh-cn": "添加了扩展太阳能控制,具有可选的标准/扩展模式、基于增量的控制逻辑、外部执行器支持、优先级/阻止处理和本地化状态文本。"
|
|
57
|
-
},
|
|
58
|
-
"1.2.22": {
|
|
59
|
-
"en": "Added new read-only state solar.request_active to indicate when solar logic would request the pump. Improved robustness of solarHelper by handling invalid temperature values.",
|
|
60
|
-
"de": "Neuer read-only Datenpunkt solar.request_active hinzugefügt, der anzeigt, wann die Solarlogik die Pumpe anfordern würde. Stabilität des solarHelpers verbessert durch Behandlung ungültiger Temperaturwerte.",
|
|
61
|
-
"ru": "Добавлено новое состояние Solar.request_active, доступное только для чтения, чтобы указать, когда солнечная логика запросит насос. Повышена надежность SolarHelper за счет обработки недопустимых значений температуры.",
|
|
62
|
-
"pt": "Adicionado novo estado somente leitura solar.request_active para indicar quando a lógica solar solicitaria a bomba. Robustez aprimorada do solarHelper ao lidar com valores de temperatura inválidos.",
|
|
63
|
-
"nl": "Nieuwe alleen-lezen status solar.request_active toegevoegd om aan te geven wanneer de zonnelogica de pomp zou aanvragen. Verbeterde robuustheid van solarHelper door ongeldige temperatuurwaarden te verwerken.",
|
|
64
|
-
"fr": "Ajout d'un nouvel état en lecture seule solar.request_active pour indiquer quand la logique solaire demanderait la pompe. Robustesse améliorée de solarHelper en gérant des valeurs de température invalides.",
|
|
65
|
-
"it": "Aggiunto nuovo stato di sola lettura solar.request_active per indicare quando la logica solare richiederebbe la pompa. Robustezza migliorata di solarHelper gestendo valori di temperatura non validi.",
|
|
66
|
-
"es": "Se agregó un nuevo estado de solo lectura solar.request_active para indicar cuándo la lógica solar solicitaría la bomba. Robustez mejorada de solarHelper al manejar valores de temperatura no válidos.",
|
|
67
|
-
"pl": "Dodano nowy stan tylko do odczytu solar.request_active, aby wskazać, kiedy logika solarna zażąda pompy. Poprawiona niezawodność solarHelper poprzez obsługę nieprawidłowych wartości temperatur.",
|
|
68
|
-
"uk": "Додано новий стан solar.request_active лише для читання, щоб вказати, коли сонячна логіка запитуватиме насос. Покращена надійність solarHelper завдяки обробці недійсних значень температури.",
|
|
69
|
-
"zh-cn": "添加了新的只读状态 Solar.request_active 以指示太阳能逻辑何时请求泵。通过处理无效温度值提高了 SolarHelper 的稳健性。"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"titleLang": {
|
|
@@ -106,12 +106,12 @@ const solarInsightsHelper = {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.last_recalculation_reason', {
|
|
109
|
-
val:
|
|
109
|
+
val: I18n.translate('solar_insights_reason_daily_reset'),
|
|
110
110
|
ack: true,
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.debug_text', {
|
|
114
|
-
val:
|
|
114
|
+
val: I18n.translate('solar_insights_debug_daily_reset_executed'),
|
|
115
115
|
ack: true,
|
|
116
116
|
});
|
|
117
117
|
|
|
@@ -404,7 +404,6 @@ const solarInsightsHelper = {
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
const summaryJson = {
|
|
407
|
-
block: 7,
|
|
408
407
|
mode: 'estimated_daily_gain',
|
|
409
408
|
solar_ran_today: solarRanToday,
|
|
410
409
|
solar_effective_now: solarEffectiveNow,
|
|
@@ -431,32 +430,32 @@ const solarInsightsHelper = {
|
|
|
431
430
|
active_minutes_today: Number.isFinite(activeMinutesToday) ? activeMinutesToday : null,
|
|
432
431
|
peak_power_today_w: Number.isFinite(peakPowerTodayW) ? peakPowerTodayW : null,
|
|
433
432
|
},
|
|
434
|
-
note:
|
|
433
|
+
note: I18n.translate('solar_insights_summary_note_block_7'),
|
|
435
434
|
};
|
|
436
435
|
|
|
437
436
|
const summaryHtml = [
|
|
438
437
|
'<div>',
|
|
439
|
-
`<b>${
|
|
440
|
-
`<b>${
|
|
441
|
-
`<b>${
|
|
442
|
-
`<b>${
|
|
443
|
-
`<b>${
|
|
444
|
-
`<b>${
|
|
445
|
-
`<b>${
|
|
446
|
-
`<b>${
|
|
447
|
-
`<b>${
|
|
448
|
-
`<b>${
|
|
449
|
-
`<b>${
|
|
450
|
-
`<b>${
|
|
451
|
-
`<b>${
|
|
452
|
-
`<b>${
|
|
453
|
-
`<b>${
|
|
454
|
-
`<b>${
|
|
455
|
-
`<b>${
|
|
456
|
-
`<b>${
|
|
457
|
-
`<b>${
|
|
458
|
-
`<b>${
|
|
459
|
-
`<b>${
|
|
438
|
+
`<b>${I18n.translate('solar_insights_label_mode')}:</b> ${I18n.translate('solar_insights_mode_estimated_daily_gain')}<br>`,
|
|
439
|
+
`<b>${I18n.translate('solar_insights_label_solar_ran_today')}:</b> ${solarRanToday}<br>`,
|
|
440
|
+
`<b>${I18n.translate('solar_insights_label_solar_effective_now')}:</b> ${solarEffectiveNow}<br>`,
|
|
441
|
+
`<b>${I18n.translate('solar_insights_label_pool_reference_source')}:</b> ${poolReferenceSource}<br>`,
|
|
442
|
+
`<b>${I18n.translate('solar_insights_label_flow_source')}:</b> ${flowSource}<br>`,
|
|
443
|
+
`<b>${I18n.translate('solar_insights_label_weather_correction_active')}:</b> ${weatherCorrectionActive}<br>`,
|
|
444
|
+
`<b>${I18n.translate('solar_insights_label_confidence')}:</b> ${confidencePercent} %<br>`,
|
|
445
|
+
`<b>${I18n.translate('solar_insights_label_used_sensors')}:</b> ${usedSensors.join(', ') || I18n.translate('solar_insights_value_none')}<br>`,
|
|
446
|
+
`<b>${I18n.translate('solar_insights_label_collector')}:</b> ${Number.isFinite(collectorTemp) ? `${collectorTemp} °C` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
447
|
+
`<b>${I18n.translate('solar_insights_label_pool_reference')}:</b> ${Number.isFinite(poolReferenceTemp) ? `${poolReferenceTemp} °C` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
448
|
+
`<b>${I18n.translate('solar_insights_label_delta_t')}:</b> ${Number.isFinite(deltaTUsed) ? `${deltaTUsed} K` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
449
|
+
`<b>${I18n.translate('solar_insights_label_surface_ground_delta')}:</b> ${Number.isFinite(surfaceGroundDelta) ? `${surfaceGroundDelta} K` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
450
|
+
`<b>${I18n.translate('solar_insights_label_outside')}:</b> ${Number.isFinite(outsideTemp) ? `${outsideTemp} °C` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
451
|
+
`<b>${I18n.translate('solar_insights_label_flow')}:</b> ${Number.isFinite(currentFlowLh) ? `${currentFlowLh} l/h` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
452
|
+
`<b>${I18n.translate('solar_insights_label_pump_power')}:</b> ${Number.isFinite(pumpCurrentPowerW) ? `${pumpCurrentPowerW} W` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
453
|
+
`<b>${I18n.translate('solar_insights_label_thermal_power')}:</b> ${Number.isFinite(thermalPowerW) ? `${thermalPowerW} W (${thermalPowerKW} kW)` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
454
|
+
`<b>${I18n.translate('solar_insights_label_estimated_efficiency_ratio')}:</b> ${Number.isFinite(estimatedEfficiencyRatio) ? estimatedEfficiencyRatio : I18n.translate('solar_insights_value_na')}<br>`,
|
|
455
|
+
`<b>${I18n.translate('solar_insights_label_gain_today')}:</b> ${Number.isFinite(estimatedGainTodayWh) ? `${estimatedGainTodayWh} Wh (${estimatedGainTodayKWh} kWh)` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
456
|
+
`<b>${I18n.translate('solar_insights_label_active_minutes_today')}:</b> ${Number.isFinite(activeMinutesToday) ? `${activeMinutesToday} min` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
457
|
+
`<b>${I18n.translate('solar_insights_label_peak_power_today')}:</b> ${Number.isFinite(peakPowerTodayW) ? `${peakPowerTodayW} W` : I18n.translate('solar_insights_value_na')}<br>`,
|
|
458
|
+
`<b>${I18n.translate('solar_insights_label_note')}:</b> ${I18n.translate('solar_insights_html_note_block_7')}`,
|
|
460
459
|
'</div>',
|
|
461
460
|
].join('');
|
|
462
461
|
|
|
@@ -550,8 +549,8 @@ const solarInsightsHelper = {
|
|
|
550
549
|
});
|
|
551
550
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.results.solar_gain_state', {
|
|
552
551
|
val: solarRanToday
|
|
553
|
-
?
|
|
554
|
-
:
|
|
552
|
+
? I18n.translate('solar_insights_status_estimated_daily_gain_ready')
|
|
553
|
+
: I18n.translate('solar_insights_status_no_solar_runtime_today'),
|
|
555
554
|
ack: true,
|
|
556
555
|
});
|
|
557
556
|
|
|
@@ -631,16 +630,16 @@ const solarInsightsHelper = {
|
|
|
631
630
|
|
|
632
631
|
// --- Calculation ---
|
|
633
632
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.calculation.mode', {
|
|
634
|
-
val:
|
|
633
|
+
val: I18n.translate('solar_insights_mode_estimated_daily_gain'),
|
|
635
634
|
ack: true,
|
|
636
635
|
});
|
|
637
636
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.calculation.quality_level', {
|
|
638
637
|
val:
|
|
639
638
|
confidencePercent >= 85
|
|
640
|
-
?
|
|
639
|
+
? I18n.translate('solar_insights_quality_advanced')
|
|
641
640
|
: confidencePercent >= 70
|
|
642
|
-
?
|
|
643
|
-
:
|
|
641
|
+
? I18n.translate('solar_insights_quality_enhanced')
|
|
642
|
+
: I18n.translate('solar_insights_quality_basic'),
|
|
644
643
|
ack: true,
|
|
645
644
|
});
|
|
646
645
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.calculation.confidence_percent', {
|
|
@@ -660,17 +659,13 @@ const solarInsightsHelper = {
|
|
|
660
659
|
ack: true,
|
|
661
660
|
});
|
|
662
661
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.calculation.note', {
|
|
663
|
-
val:
|
|
662
|
+
val: I18n.translate('solar_insights_calculation_note_block_7'),
|
|
664
663
|
ack: true,
|
|
665
664
|
});
|
|
666
665
|
|
|
667
666
|
// --- Debug ---
|
|
668
|
-
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.last_update', {
|
|
669
|
-
val: new Date().toISOString(),
|
|
670
|
-
ack: true,
|
|
671
|
-
});
|
|
672
667
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.last_recalculation_reason', {
|
|
673
|
-
val:
|
|
668
|
+
val: I18n.translate('solar_insights_reason_block_7_update'),
|
|
674
669
|
ack: true,
|
|
675
670
|
});
|
|
676
671
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.last_valid_mode', {
|
|
@@ -682,7 +677,7 @@ const solarInsightsHelper = {
|
|
|
682
677
|
ack: true,
|
|
683
678
|
});
|
|
684
679
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.debug_text', {
|
|
685
|
-
val: `${
|
|
680
|
+
val: `${I18n.translate('solar_insights_debug_block_7_updated')} ${usedSensors.join(', ') || I18n.translate('solar_insights_value_none')}`,
|
|
686
681
|
ack: true,
|
|
687
682
|
});
|
|
688
683
|
|
|
@@ -700,7 +695,7 @@ const solarInsightsHelper = {
|
|
|
700
695
|
ack: true,
|
|
701
696
|
});
|
|
702
697
|
await this.adapter.setStateChangedAsync('analytics.insights.solar.debug.debug_text', {
|
|
703
|
-
val: `${
|
|
698
|
+
val: `${I18n.translate('solar_insights_debug_block_7_error')} ${err.message}`,
|
|
704
699
|
ack: true,
|
|
705
700
|
});
|
|
706
701
|
}
|
|
@@ -752,14 +747,6 @@ const solarInsightsHelper = {
|
|
|
752
747
|
return String(state.val);
|
|
753
748
|
},
|
|
754
749
|
|
|
755
|
-
_t(text) {
|
|
756
|
-
try {
|
|
757
|
-
return I18n.t(text);
|
|
758
|
-
} catch {
|
|
759
|
-
return text;
|
|
760
|
-
}
|
|
761
|
-
},
|
|
762
|
-
|
|
763
750
|
cleanup() {
|
|
764
751
|
if (this.checkTimer) {
|
|
765
752
|
this.adapter.clearTimeout(this.checkTimer);
|
|
@@ -305,24 +305,24 @@ const solarLogbookHelper = {
|
|
|
305
305
|
} = data;
|
|
306
306
|
|
|
307
307
|
const sentences = [];
|
|
308
|
-
const usedSensors = usedSensorsText ||
|
|
308
|
+
const usedSensors = usedSensorsText || I18n.translate('solar_log_value_unknown');
|
|
309
309
|
const confidenceText = Number.isFinite(confidencePercent)
|
|
310
|
-
?
|
|
310
|
+
? I18n.translate('solar_log_confidence_text').replace('%s', this._formatNumber(confidencePercent, 0))
|
|
311
311
|
: '';
|
|
312
312
|
const weatherTextShort = this._extractShortWeather(weatherSummary);
|
|
313
313
|
|
|
314
314
|
if (!solarRanToday) {
|
|
315
|
-
sentences.push(
|
|
315
|
+
sentences.push(I18n.translate('solar_log_text_no_runtime_today'));
|
|
316
316
|
|
|
317
317
|
if (weatherTextShort !== '') {
|
|
318
|
-
sentences.push(
|
|
318
|
+
sentences.push(I18n.translate('solar_log_text_weather_short').replace('%s', weatherTextShort));
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
if (confidenceText !== '') {
|
|
322
322
|
sentences.push(confidenceText);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
sentences.push(
|
|
325
|
+
sentences.push(I18n.translate('solar_log_text_used_sensors').replace('%s', usedSensors));
|
|
326
326
|
|
|
327
327
|
const text = sentences.join(' ');
|
|
328
328
|
return {
|
|
@@ -333,62 +333,56 @@ const solarLogbookHelper = {
|
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
if (solarEffectiveNow && Number.isFinite(thermalPowerKW) && thermalPowerKW > 0) {
|
|
336
|
-
sentences.push(
|
|
336
|
+
sentences.push(
|
|
337
|
+
I18n.translate('solar_log_text_active_effective').replace('%s', this._formatNumber(thermalPowerKW, 2)),
|
|
338
|
+
);
|
|
337
339
|
} else if (solarEffectiveNow) {
|
|
338
|
-
sentences.push(
|
|
340
|
+
sentences.push(I18n.translate('solar_log_text_active_without_clear_gain'));
|
|
339
341
|
} else {
|
|
340
|
-
sentences.push(
|
|
342
|
+
sentences.push(I18n.translate('solar_log_text_not_active_now'));
|
|
341
343
|
}
|
|
342
344
|
|
|
343
345
|
if (Number.isFinite(gainTodayKWh) && gainTodayKWh >= 3) {
|
|
344
|
-
sentences.push(
|
|
346
|
+
sentences.push(
|
|
347
|
+
I18n.translate('solar_log_text_good_day').replace('%s', this._formatNumber(gainTodayKWh, 2)),
|
|
348
|
+
);
|
|
345
349
|
} else if (Number.isFinite(gainTodayKWh) && gainTodayKWh >= 1) {
|
|
346
|
-
sentences.push(
|
|
350
|
+
sentences.push(
|
|
351
|
+
I18n.translate('solar_log_text_moderate_day').replace('%s', this._formatNumber(gainTodayKWh, 2)),
|
|
352
|
+
);
|
|
347
353
|
} else if (Number.isFinite(gainTodayKWh) && gainTodayKWh > 0) {
|
|
348
|
-
sentences.push(
|
|
354
|
+
sentences.push(I18n.translate('solar_log_text_low_day').replace('%s', this._formatNumber(gainTodayKWh, 2)));
|
|
349
355
|
} else {
|
|
350
|
-
sentences.push(
|
|
356
|
+
sentences.push(I18n.translate('solar_log_text_no_clear_day_gain'));
|
|
351
357
|
}
|
|
352
358
|
|
|
353
359
|
if (Number.isFinite(collectorTemp) && Number.isFinite(poolReferenceTemp) && Number.isFinite(deltaTUsed)) {
|
|
354
360
|
if (deltaTUsed > 0.5) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
this._formatNumber(deltaTUsed, 1),
|
|
361
|
-
),
|
|
362
|
-
);
|
|
361
|
+
let text = I18n.translate('solar_log_text_temperature_positive');
|
|
362
|
+
text = text.replace('%s', this._formatNumber(collectorTemp, 1));
|
|
363
|
+
text = text.replace('%s', this._formatNumber(poolReferenceTemp, 1));
|
|
364
|
+
text = text.replace('%s', this._formatNumber(deltaTUsed, 1));
|
|
365
|
+
sentences.push(text);
|
|
363
366
|
} else if (deltaTUsed <= 0.5 && deltaTUsed >= -0.5) {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
this._formatNumber(poolReferenceTemp, 1),
|
|
369
|
-
),
|
|
370
|
-
);
|
|
367
|
+
let text = I18n.translate('solar_log_text_temperature_neutral');
|
|
368
|
+
text = text.replace('%s', this._formatNumber(collectorTemp, 1));
|
|
369
|
+
text = text.replace('%s', this._formatNumber(poolReferenceTemp, 1));
|
|
370
|
+
sentences.push(text);
|
|
371
371
|
} else {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
this._formatNumber(poolReferenceTemp, 1),
|
|
377
|
-
),
|
|
378
|
-
);
|
|
372
|
+
let text = I18n.translate('solar_log_text_temperature_negative');
|
|
373
|
+
text = text.replace('%s', this._formatNumber(collectorTemp, 1));
|
|
374
|
+
text = text.replace('%s', this._formatNumber(poolReferenceTemp, 1));
|
|
375
|
+
sentences.push(text);
|
|
379
376
|
}
|
|
380
377
|
}
|
|
381
378
|
|
|
382
379
|
if (Number.isFinite(flowLhUsed) && flowLhUsed > 0 && Number.isFinite(pumpPowerWUsed) && pumpPowerWUsed > 0) {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
this._formatNumber(pumpPowerWUsed, 0),
|
|
388
|
-
),
|
|
389
|
-
);
|
|
380
|
+
let text = I18n.translate('solar_log_text_flow_and_pump');
|
|
381
|
+
text = text.replace('%s', this._formatNumber(flowLhUsed, 0));
|
|
382
|
+
text = text.replace('%s', this._formatNumber(pumpPowerWUsed, 0));
|
|
383
|
+
sentences.push(text);
|
|
390
384
|
} else if (Number.isFinite(flowLhUsed) && flowLhUsed > 0) {
|
|
391
|
-
sentences.push(
|
|
385
|
+
sentences.push(I18n.translate('solar_log_text_flow_only').replace('%s', this._formatNumber(flowLhUsed, 0)));
|
|
392
386
|
}
|
|
393
387
|
|
|
394
388
|
if (
|
|
@@ -397,60 +391,78 @@ const solarLogbookHelper = {
|
|
|
397
391
|
Number.isFinite(peakPowerTodayW) &&
|
|
398
392
|
peakPowerTodayW > 0
|
|
399
393
|
) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
this._formatNumber(peakPowerTodayW, 0),
|
|
405
|
-
),
|
|
406
|
-
);
|
|
394
|
+
let text = I18n.translate('solar_log_text_power_and_peak');
|
|
395
|
+
text = text.replace('%s', this._formatNumber(thermalPowerW, 0));
|
|
396
|
+
text = text.replace('%s', this._formatNumber(peakPowerTodayW, 0));
|
|
397
|
+
sentences.push(text);
|
|
407
398
|
}
|
|
408
399
|
|
|
409
400
|
if (Number.isFinite(efficiencyRatio) && efficiencyRatio > 0) {
|
|
410
401
|
if (efficiencyRatio >= 5) {
|
|
411
|
-
sentences.push(
|
|
402
|
+
sentences.push(
|
|
403
|
+
I18n.translate('solar_log_text_efficiency_high').replace(
|
|
404
|
+
'%s',
|
|
405
|
+
this._formatNumber(efficiencyRatio, 2),
|
|
406
|
+
),
|
|
407
|
+
);
|
|
412
408
|
} else if (efficiencyRatio >= 2) {
|
|
413
|
-
sentences.push(
|
|
409
|
+
sentences.push(
|
|
410
|
+
I18n.translate('solar_log_text_efficiency_medium').replace(
|
|
411
|
+
'%s',
|
|
412
|
+
this._formatNumber(efficiencyRatio, 2),
|
|
413
|
+
),
|
|
414
|
+
);
|
|
414
415
|
} else {
|
|
415
|
-
sentences.push(
|
|
416
|
+
sentences.push(
|
|
417
|
+
I18n.translate('solar_log_text_efficiency_low').replace(
|
|
418
|
+
'%s',
|
|
419
|
+
this._formatNumber(efficiencyRatio, 2),
|
|
420
|
+
),
|
|
421
|
+
);
|
|
416
422
|
}
|
|
417
423
|
}
|
|
418
424
|
|
|
419
425
|
if (Number.isFinite(activeMinutesToday) && activeMinutesToday > 0) {
|
|
420
|
-
sentences.push(
|
|
426
|
+
sentences.push(
|
|
427
|
+
I18n.translate('solar_log_text_active_minutes').replace(
|
|
428
|
+
'%s',
|
|
429
|
+
this._formatNumber(activeMinutesToday, 0),
|
|
430
|
+
),
|
|
431
|
+
);
|
|
421
432
|
}
|
|
422
433
|
|
|
423
434
|
if (Number.isFinite(outsideTemp)) {
|
|
424
|
-
sentences.push(
|
|
435
|
+
sentences.push(
|
|
436
|
+
I18n.translate('solar_log_text_outside_temp').replace('%s', this._formatNumber(outsideTemp, 1)),
|
|
437
|
+
);
|
|
425
438
|
}
|
|
426
439
|
|
|
427
440
|
if (weatherCorrectionActive) {
|
|
428
441
|
if (weatherTextShort !== '') {
|
|
429
|
-
sentences.push(
|
|
442
|
+
sentences.push(
|
|
443
|
+
I18n.translate('solar_log_text_weather_supported_with_text').replace('%s', weatherTextShort),
|
|
444
|
+
);
|
|
430
445
|
} else {
|
|
431
|
-
sentences.push(
|
|
446
|
+
sentences.push(I18n.translate('solar_log_text_weather_supported'));
|
|
432
447
|
}
|
|
433
448
|
}
|
|
434
449
|
|
|
435
450
|
if (Number.isFinite(gainTodayWh) && gainTodayWh > 0 && gainTodayWh < 1000 && Number.isFinite(gainTodayKWh)) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
this._formatNumber(gainTodayKWh, 2),
|
|
441
|
-
),
|
|
442
|
-
);
|
|
451
|
+
let text = I18n.translate('solar_log_text_small_gain_detail');
|
|
452
|
+
text = text.replace('%s', this._formatNumber(gainTodayWh, 0));
|
|
453
|
+
text = text.replace('%s', this._formatNumber(gainTodayKWh, 2));
|
|
454
|
+
sentences.push(text);
|
|
443
455
|
}
|
|
444
456
|
|
|
445
457
|
if (qualityLevel !== '') {
|
|
446
|
-
sentences.push(
|
|
458
|
+
sentences.push(I18n.translate('solar_log_text_quality_level').replace('%s', qualityLevel));
|
|
447
459
|
}
|
|
448
460
|
|
|
449
461
|
if (confidenceText !== '') {
|
|
450
462
|
sentences.push(confidenceText);
|
|
451
463
|
}
|
|
452
464
|
|
|
453
|
-
sentences.push(
|
|
465
|
+
sentences.push(I18n.translate('solar_log_text_used_sensors').replace('%s', usedSensors));
|
|
454
466
|
|
|
455
467
|
const text = sentences.join(' ');
|
|
456
468
|
return {
|
|
@@ -549,28 +561,6 @@ const solarLogbookHelper = {
|
|
|
549
561
|
.replace(/'/g, ''');
|
|
550
562
|
},
|
|
551
563
|
|
|
552
|
-
_t(key) {
|
|
553
|
-
try {
|
|
554
|
-
return I18n.t(key);
|
|
555
|
-
} catch {
|
|
556
|
-
return key;
|
|
557
|
-
}
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
_tf(key, ...args) {
|
|
561
|
-
try {
|
|
562
|
-
let text = I18n.t(key);
|
|
563
|
-
|
|
564
|
-
for (const arg of args) {
|
|
565
|
-
text = text.replace('%s', String(arg));
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
return text;
|
|
569
|
-
} catch {
|
|
570
|
-
return key;
|
|
571
|
-
}
|
|
572
|
-
},
|
|
573
|
-
|
|
574
564
|
cleanup() {
|
|
575
565
|
if (this.checkTimer) {
|
|
576
566
|
this.adapter.clearTimeout(this.checkTimer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.poolcontrol",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
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",
|