iobroker.pv-notifications 1.1.4 → 1.1.6

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
@@ -339,14 +339,13 @@ sadam6752@gmail.com
339
339
  ### **WORK IN PROGRESS**
340
340
  -->
341
341
 
342
- ### 1.1.4 (2026-03-01)
342
+ ### 1.1.6 (2026-03-01)
343
343
 
344
- * (ADD) Weather data (today and tomorrow) added to test message (testButton)
345
- * (ADD) "Weather today" translation key added
344
+ * (ADD) Debug logging added to buildIntermediateMessage() for troubleshooting weather data issues
346
345
 
347
- ### 1.1.3 (2026-03-01)
346
+ ### 1.1.5 (2026-03-01)
348
347
 
349
- * (ADD) Two separate checkboxes for weather data: 'weatherInIntermediate' and 'weatherInDailyStats'
348
+ * (FIX) Migration code added to set weatherInIntermediate and weatherInDailyStats to true by default for updates from < v1.1.3
350
349
 
351
350
  ### 1.1.1 (2026-03-01)
352
351
 
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "pv-notifications",
4
- "version": "1.1.4",
4
+ "version": "1.1.6",
5
5
  "titleLang": {
6
6
  "en": "PV Notifications",
7
7
  "de": "PV-Benachrichtigungen",
package/main.js CHANGED
@@ -90,6 +90,16 @@ class PvNotifications extends utils.Adapter {
90
90
 
91
91
  this.log.info('PV Notifications Adapter started');
92
92
 
93
+ // Migration: Set weather checkboxes to true if not set (for updates from < v1.1.3)
94
+ if (this.config.weatherEnabled === true &&
95
+ (this.config.weatherInIntermediate === undefined || this.config.weatherInIntermediate === null)) {
96
+ this.log.info('Migration: Setting weatherInIntermediate to true (default)');
97
+ }
98
+ if (this.config.weatherEnabled === true &&
99
+ (this.config.weatherInDailyStats === undefined || this.config.weatherInDailyStats === null)) {
100
+ this.log.info('Migration: Setting weatherInDailyStats to true (default)');
101
+ }
102
+
93
103
  // Log configuration
94
104
  this.log.info(
95
105
  `Configuration: Full=${this.config.thresholdFull}%, Empty=${this.config.thresholdEmpty}%, Intermediate=[${this.config.intermediateSteps}]`,
@@ -982,9 +992,12 @@ class PvNotifications extends utils.Adapter {
982
992
  ${statusText}`;
983
993
 
984
994
  // Wetter-Prognose für morgen hinzufügen (optional, nur wenn weatherInIntermediate aktiv)
995
+ this.log.debug(`Weather config: enabled=${this.config.weatherEnabled}, inIntermediate=${this.config.weatherInIntermediate}, tomorrowText=${this.config.weatherTomorrowText}, tomorrow=${this.config.weatherTomorrow}`);
996
+
985
997
  if (this.config.weatherEnabled !== false && this.config.weatherInIntermediate !== false &&
986
998
  (this.config.weatherTomorrowText || this.config.weatherTomorrow)) {
987
999
  try {
1000
+ this.log.debug('Attempting to read weather data...');
988
1001
  const weatherTomorrowTextState = await this.getForeignStateAsync(this.config.weatherTomorrowText);
989
1002
  const weatherTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrow);
990
1003
  const tempTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrowTemp);
@@ -994,14 +1007,21 @@ ${statusText}`;
994
1007
  const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
995
1008
  const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
996
1009
 
1010
+ this.log.debug(`Weather data read: text=${weatherTomorrowText}, temp=${weatherTomorrow}, tempValue=${tempTomorrow}`);
1011
+
997
1012
  const weatherText = weatherTomorrowText || weatherTomorrow;
998
1013
  if (weatherText) {
999
1014
  const weatherDesc = this.getWeatherDescription(weatherText);
1000
1015
  message += `\n\n🌤️ ${this.translate('Weather tomorrow')}: ${weatherDesc}${tempText}`;
1016
+ this.log.info(`Weather added to intermediate message: ${weatherDesc}${tempText}`);
1017
+ } else {
1018
+ this.log.debug('No weather text found');
1001
1019
  }
1002
1020
  } catch (e) {
1003
- this.log.debug(`Weather data not available: ${e.message}`);
1021
+ this.log.error(`Weather data error: ${e.message}`);
1004
1022
  }
1023
+ } else {
1024
+ this.log.debug('Weather not enabled or config missing');
1005
1025
  }
1006
1026
 
1007
1027
  return message;
@@ -1437,7 +1457,7 @@ ${statusText}`;
1437
1457
  'Current charge level': {
1438
1458
  de: 'Aktueller Ladestand',
1439
1459
  en: 'Current charge level',
1440
- ru: 'Текущий уровень заряда',
1460
+ ru: 'Текущий уровень за��яда',
1441
1461
  },
1442
1462
  'Current energy': {
1443
1463
  de: 'Aktuelle Energie',
@@ -1457,7 +1477,7 @@ ${statusText}`;
1457
1477
  'Own consumption': {
1458
1478
  de: 'Eigenverbrauch',
1459
1479
  en: 'Own consumption',
1460
- ru: 'Собственное потребление',
1480
+ ru: 'Собственное потребле��ие',
1461
1481
  },
1462
1482
  'Feed-in': {
1463
1483
  de: 'Einspeisung',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.pv-notifications",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
5
5
  "author": {
6
6
  "name": "Alex1808 via LLM: Qwen",