iobroker.pv-notifications 1.2.19 → 1.2.21
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 +0 -15
- package/io-package.json +497 -487
- package/main.js +104 -81
- package/package.json +63 -63
- package/admin/Batterie_notification.png +0 -0
- package/admin/Batterie_notification.svg +0 -12
- package/admin/index.html +0 -298
- package/admin/jsonConfig.js +0 -11
- package/admin/pv-notifications.svg +0 -13
package/main.js
CHANGED
|
@@ -79,13 +79,13 @@ class PvNotifications extends utils.Adapter {
|
|
|
79
79
|
* Is called when databases are connected and adapter received configuration.
|
|
80
80
|
*/
|
|
81
81
|
async onReady() {
|
|
82
|
-
this.log.
|
|
82
|
+
this.log.debug('onReady is executing...');
|
|
83
83
|
|
|
84
84
|
// Reset connection indicator
|
|
85
85
|
await this.setState('info.connection', false, true);
|
|
86
86
|
|
|
87
87
|
// Load system language
|
|
88
|
-
this.log.
|
|
88
|
+
this.log.debug('Loading system language...');
|
|
89
89
|
await this.loadSystemLanguage();
|
|
90
90
|
|
|
91
91
|
this.log.info('PV Notifications Adapter started');
|
|
@@ -95,13 +95,13 @@ class PvNotifications extends utils.Adapter {
|
|
|
95
95
|
this.config.weatherEnabled === true &&
|
|
96
96
|
(this.config.weatherInIntermediate === undefined || this.config.weatherInIntermediate === null)
|
|
97
97
|
) {
|
|
98
|
-
this.log.
|
|
98
|
+
this.log.debug('Migration: Setting weatherInIntermediate to true (default)');
|
|
99
99
|
}
|
|
100
100
|
if (
|
|
101
101
|
this.config.weatherEnabled === true &&
|
|
102
102
|
(this.config.weatherInDailyStats === undefined || this.config.weatherInDailyStats === null)
|
|
103
103
|
) {
|
|
104
|
-
this.log.
|
|
104
|
+
this.log.debug('Migration: Setting weatherInDailyStats to true (default)');
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// Log configuration
|
|
@@ -109,124 +109,134 @@ class PvNotifications extends utils.Adapter {
|
|
|
109
109
|
`Configuration: Full=${this.config.thresholdFull}%, Empty=${this.config.thresholdEmpty}%, Intermediate=[${this.config.intermediateSteps}]`,
|
|
110
110
|
);
|
|
111
111
|
|
|
112
|
+
// Create channel objects
|
|
113
|
+
await this.setObjectNotExists('statistics', { type: 'channel', common: { name: 'Statistics' }, native: {} });
|
|
114
|
+
await this.setObjectNotExists('info', { type: 'channel', common: { name: 'Info' }, native: {} });
|
|
115
|
+
|
|
112
116
|
// Create statistics states
|
|
113
|
-
this.log.
|
|
117
|
+
this.log.debug('Creating statistics states...');
|
|
114
118
|
await this.setObjectNotExists('statistics.fullCyclesToday', {
|
|
115
119
|
type: 'state',
|
|
116
|
-
common: { name: '
|
|
120
|
+
common: { name: 'Full cycles today', type: 'number', role: 'value', read: true, write: false, def: 0 },
|
|
117
121
|
});
|
|
118
122
|
await this.setObjectNotExists('statistics.emptyCyclesToday', {
|
|
119
123
|
type: 'state',
|
|
120
|
-
common: { name: '
|
|
124
|
+
common: { name: 'Empty cycles today', type: 'number', role: 'value', read: true, write: false, def: 0 },
|
|
121
125
|
});
|
|
122
|
-
await this.
|
|
126
|
+
await this.extendObject('statistics.maxSOCToday', {
|
|
123
127
|
type: 'state',
|
|
124
|
-
common: { name: 'Max SOC
|
|
128
|
+
common: { name: 'Max SOC today', type: 'number', role: 'value.battery', read: true, write: false, def: 0, unit: '%' },
|
|
125
129
|
});
|
|
126
|
-
await this.
|
|
130
|
+
await this.extendObject('statistics.minSOCToday', {
|
|
127
131
|
type: 'state',
|
|
128
|
-
common: { name: 'Min SOC
|
|
132
|
+
common: { name: 'Min SOC today', type: 'number', role: 'value.battery', read: true, write: false, def: 100, unit: '%' },
|
|
129
133
|
});
|
|
130
134
|
await this.setObjectNotExists('statistics.fullCyclesWeek', {
|
|
131
135
|
type: 'state',
|
|
132
|
-
common: { name: '
|
|
136
|
+
common: { name: 'Full cycles this week', type: 'number', role: 'value', read: true, write: false, def: 0 },
|
|
133
137
|
});
|
|
134
138
|
await this.setObjectNotExists('statistics.emptyCyclesWeek', {
|
|
135
139
|
type: 'state',
|
|
136
|
-
common: { name: '
|
|
140
|
+
common: { name: 'Empty cycles this week', type: 'number', role: 'value', read: true, write: false, def: 0 },
|
|
137
141
|
});
|
|
138
|
-
await this.
|
|
142
|
+
await this.extendObject('statistics.currentSOC', {
|
|
139
143
|
type: 'state',
|
|
140
|
-
common: { name: '
|
|
144
|
+
common: { name: 'Current SOC', type: 'number', role: 'value.battery', read: true, write: false, def: 0, unit: '%' },
|
|
141
145
|
});
|
|
142
|
-
await this.
|
|
146
|
+
await this.extendObject('statistics.currentEnergyKWh', {
|
|
143
147
|
type: 'state',
|
|
144
148
|
common: {
|
|
145
|
-
name: '
|
|
149
|
+
name: 'Current energy',
|
|
146
150
|
type: 'number',
|
|
147
|
-
role: 'value',
|
|
151
|
+
role: 'value.energy',
|
|
148
152
|
read: true,
|
|
149
153
|
write: false,
|
|
150
154
|
def: 0,
|
|
155
|
+
unit: 'kWh',
|
|
151
156
|
},
|
|
152
157
|
});
|
|
153
|
-
await this.
|
|
158
|
+
await this.extendObject('statistics.currentPower', {
|
|
154
159
|
type: 'state',
|
|
155
|
-
common: { name: '
|
|
160
|
+
common: { name: 'Current power', type: 'number', role: 'value.power', read: true, write: false, def: 0, unit: 'W' },
|
|
156
161
|
});
|
|
157
|
-
await this.
|
|
162
|
+
await this.extendObject('statistics.currentTotalProduction', {
|
|
158
163
|
type: 'state',
|
|
159
164
|
common: {
|
|
160
|
-
name: '
|
|
165
|
+
name: 'Total production today',
|
|
161
166
|
type: 'number',
|
|
162
|
-
role: 'value',
|
|
167
|
+
role: 'value.energy',
|
|
163
168
|
read: true,
|
|
164
169
|
write: false,
|
|
165
170
|
def: 0,
|
|
171
|
+
unit: 'kWh',
|
|
166
172
|
},
|
|
167
173
|
});
|
|
168
|
-
await this.
|
|
174
|
+
await this.extendObject('statistics.currentFeedIn', {
|
|
169
175
|
type: 'state',
|
|
170
|
-
common: { name: '
|
|
176
|
+
common: { name: 'Feed-in today', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
|
|
171
177
|
});
|
|
172
|
-
await this.
|
|
178
|
+
await this.extendObject('statistics.currentConsumption', {
|
|
173
179
|
type: 'state',
|
|
174
|
-
common: { name: '
|
|
180
|
+
common: { name: 'Consumption today', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
|
|
175
181
|
});
|
|
176
|
-
await this.
|
|
182
|
+
await this.extendObject('statistics.currentGridPower', {
|
|
177
183
|
type: 'state',
|
|
178
|
-
common: { name: '
|
|
184
|
+
common: { name: 'Grid power today', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
|
|
179
185
|
});
|
|
180
186
|
|
|
181
187
|
// States für letzte Monats-/Wochenstatistik
|
|
182
|
-
await this.
|
|
188
|
+
await this.extendObject('statistics.lastMonthProduction', {
|
|
183
189
|
type: 'state',
|
|
184
190
|
common: {
|
|
185
|
-
name: '
|
|
191
|
+
name: 'Production last month',
|
|
186
192
|
type: 'number',
|
|
187
|
-
role: 'value',
|
|
193
|
+
role: 'value.energy',
|
|
188
194
|
read: true,
|
|
189
195
|
write: false,
|
|
190
196
|
def: 0,
|
|
197
|
+
unit: 'kWh',
|
|
191
198
|
},
|
|
192
199
|
});
|
|
193
|
-
await this.
|
|
200
|
+
await this.extendObject('statistics.lastMonthConsumption', {
|
|
194
201
|
type: 'state',
|
|
195
202
|
common: {
|
|
196
|
-
name: '
|
|
203
|
+
name: 'Consumption last month',
|
|
197
204
|
type: 'number',
|
|
198
|
-
role: 'value',
|
|
205
|
+
role: 'value.energy',
|
|
199
206
|
read: true,
|
|
200
207
|
write: false,
|
|
201
208
|
def: 0,
|
|
209
|
+
unit: 'kWh',
|
|
202
210
|
},
|
|
203
211
|
});
|
|
204
|
-
await this.
|
|
212
|
+
await this.extendObject('statistics.lastMonthFeedIn', {
|
|
205
213
|
type: 'state',
|
|
206
214
|
common: {
|
|
207
|
-
name: '
|
|
215
|
+
name: 'Feed-in last month',
|
|
208
216
|
type: 'number',
|
|
209
|
-
role: 'value',
|
|
217
|
+
role: 'value.energy',
|
|
210
218
|
read: true,
|
|
211
219
|
write: false,
|
|
212
220
|
def: 0,
|
|
221
|
+
unit: 'kWh',
|
|
213
222
|
},
|
|
214
223
|
});
|
|
215
|
-
await this.
|
|
224
|
+
await this.extendObject('statistics.lastMonthGridPower', {
|
|
216
225
|
type: 'state',
|
|
217
226
|
common: {
|
|
218
|
-
name: '
|
|
227
|
+
name: 'Grid power last month',
|
|
219
228
|
type: 'number',
|
|
220
|
-
role: 'value',
|
|
229
|
+
role: 'value.energy',
|
|
221
230
|
read: true,
|
|
222
231
|
write: false,
|
|
223
232
|
def: 0,
|
|
233
|
+
unit: 'kWh',
|
|
224
234
|
},
|
|
225
235
|
});
|
|
226
236
|
await this.setObjectNotExists('statistics.lastMonthFullCycles', {
|
|
227
237
|
type: 'state',
|
|
228
238
|
common: {
|
|
229
|
-
name: '
|
|
239
|
+
name: 'Full cycles last month',
|
|
230
240
|
type: 'number',
|
|
231
241
|
role: 'value',
|
|
232
242
|
read: true,
|
|
@@ -237,7 +247,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
237
247
|
await this.setObjectNotExists('statistics.lastMonthEmptyCycles', {
|
|
238
248
|
type: 'state',
|
|
239
249
|
common: {
|
|
240
|
-
name: '
|
|
250
|
+
name: 'Empty cycles last month',
|
|
241
251
|
type: 'number',
|
|
242
252
|
role: 'value',
|
|
243
253
|
read: true,
|
|
@@ -245,40 +255,42 @@ class PvNotifications extends utils.Adapter {
|
|
|
245
255
|
def: 0,
|
|
246
256
|
},
|
|
247
257
|
});
|
|
248
|
-
await this.
|
|
258
|
+
await this.extendObject('statistics.lastWeekProduction', {
|
|
249
259
|
type: 'state',
|
|
250
260
|
common: {
|
|
251
|
-
name: '
|
|
261
|
+
name: 'Production last week',
|
|
252
262
|
type: 'number',
|
|
253
|
-
role: 'value',
|
|
263
|
+
role: 'value.energy',
|
|
254
264
|
read: true,
|
|
255
265
|
write: false,
|
|
256
266
|
def: 0,
|
|
267
|
+
unit: 'kWh',
|
|
257
268
|
},
|
|
258
269
|
});
|
|
259
|
-
await this.
|
|
270
|
+
await this.extendObject('statistics.lastWeekConsumption', {
|
|
260
271
|
type: 'state',
|
|
261
|
-
common: { name: '
|
|
272
|
+
common: { name: 'Consumption last week', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
|
|
262
273
|
});
|
|
263
|
-
await this.
|
|
274
|
+
await this.extendObject('statistics.lastWeekFeedIn', {
|
|
264
275
|
type: 'state',
|
|
265
276
|
common: {
|
|
266
|
-
name: '
|
|
277
|
+
name: 'Feed-in last week',
|
|
267
278
|
type: 'number',
|
|
268
|
-
role: 'value',
|
|
279
|
+
role: 'value.energy',
|
|
269
280
|
read: true,
|
|
270
281
|
write: false,
|
|
271
282
|
def: 0,
|
|
283
|
+
unit: 'kWh',
|
|
272
284
|
},
|
|
273
285
|
});
|
|
274
|
-
await this.
|
|
286
|
+
await this.extendObject('statistics.lastWeekGridPower', {
|
|
275
287
|
type: 'state',
|
|
276
|
-
common: { name: '
|
|
288
|
+
common: { name: 'Grid power last week', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
|
|
277
289
|
});
|
|
278
290
|
await this.setObjectNotExists('statistics.lastWeekFullCycles', {
|
|
279
291
|
type: 'state',
|
|
280
292
|
common: {
|
|
281
|
-
name: '
|
|
293
|
+
name: 'Full cycles last week',
|
|
282
294
|
type: 'number',
|
|
283
295
|
role: 'value',
|
|
284
296
|
read: true,
|
|
@@ -289,7 +301,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
289
301
|
await this.setObjectNotExists('statistics.lastWeekEmptyCycles', {
|
|
290
302
|
type: 'state',
|
|
291
303
|
common: {
|
|
292
|
-
name: '
|
|
304
|
+
name: 'Empty cycles last week',
|
|
293
305
|
type: 'number',
|
|
294
306
|
role: 'value',
|
|
295
307
|
read: true,
|
|
@@ -302,10 +314,10 @@ class PvNotifications extends utils.Adapter {
|
|
|
302
314
|
await this.setObjectNotExists('testButton', {
|
|
303
315
|
type: 'state',
|
|
304
316
|
common: {
|
|
305
|
-
name: '
|
|
317
|
+
name: 'Send test notification',
|
|
306
318
|
type: 'boolean',
|
|
307
319
|
role: 'button',
|
|
308
|
-
read:
|
|
320
|
+
read: false,
|
|
309
321
|
write: true,
|
|
310
322
|
def: false,
|
|
311
323
|
},
|
|
@@ -313,7 +325,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
313
325
|
|
|
314
326
|
// Explicitly subscribe (for js-controller 7+)
|
|
315
327
|
this.subscribeStates('testButton');
|
|
316
|
-
this.log.
|
|
328
|
+
this.log.debug('Subscription for testButton created');
|
|
317
329
|
|
|
318
330
|
await this.setObjectNotExists('info.connection', {
|
|
319
331
|
type: 'state',
|
|
@@ -331,7 +343,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
331
343
|
if (this.config.batterySOC) {
|
|
332
344
|
// Use subscribeForeignStates for external states
|
|
333
345
|
this.subscribeForeignStates(this.config.batterySOC);
|
|
334
|
-
this.log.
|
|
346
|
+
this.log.debug(`Subscription for ${this.config.batterySOC} created (foreign)`);
|
|
335
347
|
}
|
|
336
348
|
|
|
337
349
|
// Create subscriptions for all data points
|
|
@@ -361,7 +373,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
361
373
|
|
|
362
374
|
// Re-subscribe all states after all subscriptions
|
|
363
375
|
this.subscribeStates('*');
|
|
364
|
-
this.log.
|
|
376
|
+
this.log.debug('All states subscribed (*)');
|
|
365
377
|
|
|
366
378
|
// Start scheduled tasks
|
|
367
379
|
this.startScheduledTasks();
|
|
@@ -378,7 +390,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
378
390
|
// Signal that adapter is ready
|
|
379
391
|
this.setState('info.connection', true, true);
|
|
380
392
|
this.log.info('PV Notifications Adapter is ready');
|
|
381
|
-
this.log.
|
|
393
|
+
this.log.debug(`Adapter namespace: ${this.namespace}`);
|
|
382
394
|
}
|
|
383
395
|
|
|
384
396
|
/**
|
|
@@ -469,7 +481,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
469
481
|
this.stats.lastMonthEmptyCycles =
|
|
470
482
|
lastMonthEmptyCycles && lastMonthEmptyCycles.val !== null ? lastMonthEmptyCycles.val : 0;
|
|
471
483
|
|
|
472
|
-
this.log.
|
|
484
|
+
this.log.debug('Statistics loaded from states');
|
|
473
485
|
} catch (e) {
|
|
474
486
|
this.log.error(`Error loading statistics: ${e.message}`);
|
|
475
487
|
}
|
|
@@ -480,14 +492,14 @@ class PvNotifications extends utils.Adapter {
|
|
|
480
492
|
*/
|
|
481
493
|
async refreshCurrentValues() {
|
|
482
494
|
try {
|
|
483
|
-
this.log.
|
|
495
|
+
this.log.debug('Refreshing current values...');
|
|
484
496
|
|
|
485
497
|
// Read and process SOC (using getForeignStateAsync for external states)
|
|
486
498
|
if (this.config.batterySOC) {
|
|
487
|
-
this.log.
|
|
499
|
+
this.log.debug(`Reading SOC from ${this.config.batterySOC}...`);
|
|
488
500
|
const socState = await this.getForeignStateAsync(this.config.batterySOC);
|
|
489
501
|
if (socState && socState.val !== null) {
|
|
490
|
-
this.log.
|
|
502
|
+
this.log.debug(`SOC read: ${socState.val}%`);
|
|
491
503
|
this.onBatterySOCChange(socState.val);
|
|
492
504
|
} else {
|
|
493
505
|
this.log.warn('SOC state is null or undefined');
|
|
@@ -512,7 +524,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
512
524
|
}
|
|
513
525
|
}
|
|
514
526
|
}
|
|
515
|
-
this.log.
|
|
527
|
+
this.log.debug('Current values updated');
|
|
516
528
|
} catch (e) {
|
|
517
529
|
this.log.error(`Error updating values: ${e.message}`);
|
|
518
530
|
}
|
|
@@ -561,8 +573,8 @@ class PvNotifications extends utils.Adapter {
|
|
|
561
573
|
// Only when set to true and not already running
|
|
562
574
|
if (state.val === true && !this.status.testMessageRunning) {
|
|
563
575
|
this.status.testMessageRunning = true; // Set flag
|
|
564
|
-
this.log.
|
|
565
|
-
this.log.
|
|
576
|
+
this.log.debug(`Test button state received: ${id}, val=${state.val}`);
|
|
577
|
+
this.log.debug('Test button was pressed');
|
|
566
578
|
await this.sendTestMessage();
|
|
567
579
|
// Reset state
|
|
568
580
|
await this.setStateAsync('testButton', false, true);
|
|
@@ -720,7 +732,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
720
732
|
this.sendTelegram(message);
|
|
721
733
|
this.status.intermediateNotified.push(step);
|
|
722
734
|
this.status.lastNotification.intermediate = Date.now();
|
|
723
|
-
this.log.info(`Intermediate ${step}% - Telegram
|
|
735
|
+
this.log.info(`Intermediate ${step}% - Telegram sent`);
|
|
724
736
|
}
|
|
725
737
|
break;
|
|
726
738
|
}
|
|
@@ -846,7 +858,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
846
858
|
if (result && result.error) {
|
|
847
859
|
this.log.error(`Telegram error: ${result.error}`);
|
|
848
860
|
} else {
|
|
849
|
-
this.log.
|
|
861
|
+
this.log.debug(fullMessage);
|
|
850
862
|
this.log.info(`Telegram sent successfully to: ${usersList.join(', ')}`);
|
|
851
863
|
}
|
|
852
864
|
},
|
|
@@ -1087,12 +1099,8 @@ class PvNotifications extends utils.Adapter {
|
|
|
1087
1099
|
// Einheitlicher Status-Text für alle Intermediate-Stufen
|
|
1088
1100
|
const statusText =
|
|
1089
1101
|
direction === 'up'
|
|
1090
|
-
? this.
|
|
1091
|
-
|
|
1092
|
-
: '✅ Battery charging'
|
|
1093
|
-
: this.systemLang === 'ru'
|
|
1094
|
-
? '⚠️ Батарея разряжается'
|
|
1095
|
-
: '⚠️ Battery discharging';
|
|
1102
|
+
? this.translate('Battery charging')
|
|
1103
|
+
: this.translate('Battery discharging');
|
|
1096
1104
|
|
|
1097
1105
|
// Einheitliche Nachricht für alle Stufen (20, 40, 60, 80)
|
|
1098
1106
|
const batteryAt = this.translate('Battery at');
|
|
@@ -1143,7 +1151,7 @@ ${statusText}
|
|
|
1143
1151
|
if (weatherTodayText || weatherTodayTemp) {
|
|
1144
1152
|
const weatherDesc = weatherTodayText ? this.getWeatherDescription(weatherTodayText) : '🌡️';
|
|
1145
1153
|
message += `\n🌤️ ${this.translate('Weather today')}: ${weatherDesc}${todayTempText}`;
|
|
1146
|
-
this.log.
|
|
1154
|
+
this.log.debug(`Weather today added to intermediate message: ${weatherDesc}${todayTempText}`);
|
|
1147
1155
|
}
|
|
1148
1156
|
}
|
|
1149
1157
|
|
|
@@ -1173,7 +1181,7 @@ ${statusText}
|
|
|
1173
1181
|
if (weatherText) {
|
|
1174
1182
|
const weatherDesc = this.getWeatherDescription(weatherText);
|
|
1175
1183
|
message += `\n🌤️ ${this.translate('Weather tomorrow')}: ${weatherDesc}${tempText}`;
|
|
1176
|
-
this.log.
|
|
1184
|
+
this.log.debug(`Weather tomorrow added to intermediate message: ${weatherDesc}${tempText}`);
|
|
1177
1185
|
}
|
|
1178
1186
|
}
|
|
1179
1187
|
} catch (e) {
|
|
@@ -1481,7 +1489,7 @@ ${statusText}
|
|
|
1481
1489
|
*/
|
|
1482
1490
|
startScheduledTasks() {
|
|
1483
1491
|
// Check every minute
|
|
1484
|
-
this.scheduledInterval = setInterval(() => {
|
|
1492
|
+
this.scheduledInterval = this.setInterval(() => {
|
|
1485
1493
|
const now = new Date();
|
|
1486
1494
|
const hours = now.getHours();
|
|
1487
1495
|
const minutes = now.getMinutes();
|
|
@@ -1820,12 +1828,27 @@ ${statusText}
|
|
|
1820
1828
|
en: 'If there are many cycles, check battery settings',
|
|
1821
1829
|
ru: 'При большом количестве циклов проверьте настройки батареи',
|
|
1822
1830
|
},
|
|
1831
|
+
'Battery charging': {
|
|
1832
|
+
de: '✅ Batterie lädt',
|
|
1833
|
+
en: '✅ Battery charging',
|
|
1834
|
+
ru: '✅ Батарея заряжается',
|
|
1835
|
+
},
|
|
1836
|
+
'Battery discharging': {
|
|
1837
|
+
de: '⚠️ Batterie entlädt',
|
|
1838
|
+
en: '⚠️ Battery discharging',
|
|
1839
|
+
ru: '⚠️ Батарея разряжается',
|
|
1840
|
+
},
|
|
1841
|
+
'Production last week': {
|
|
1842
|
+
de: 'Produktion letzte Woche',
|
|
1843
|
+
en: 'Production last week',
|
|
1844
|
+
ru: 'Производство на прошлой неделе',
|
|
1845
|
+
},
|
|
1823
1846
|
};
|
|
1824
1847
|
|
|
1825
1848
|
if (translations[key] && translations[key][this.systemLang]) {
|
|
1826
1849
|
return translations[key][this.systemLang];
|
|
1827
1850
|
}
|
|
1828
|
-
return (translations[key] && translations[key]['
|
|
1851
|
+
return (translations[key] && translations[key]['en']) || key;
|
|
1829
1852
|
}
|
|
1830
1853
|
|
|
1831
1854
|
/**
|
|
@@ -1984,7 +2007,7 @@ ${statusText}
|
|
|
1984
2007
|
|
|
1985
2008
|
// Clear interval timer
|
|
1986
2009
|
if (this.scheduledInterval) {
|
|
1987
|
-
clearInterval(this.scheduledInterval);
|
|
2010
|
+
this.clearInterval(this.scheduledInterval);
|
|
1988
2011
|
this.scheduledInterval = null;
|
|
1989
2012
|
}
|
|
1990
2013
|
|
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "iobroker.pv-notifications",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Alex1808 via LLM: Qwen",
|
|
7
|
-
"email": "sadam6752@gmail.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/sadam6752-tech/ioBroker.pv-notifications",
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"ioBroker",
|
|
13
|
-
"PV",
|
|
14
|
-
"Solar",
|
|
15
|
-
"Batterie",
|
|
16
|
-
"Telegram",
|
|
17
|
-
"Smart Home"
|
|
18
|
-
],
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/sadam6752-tech/ioBroker.pv-notifications.git"
|
|
22
|
-
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=20.0.0"
|
|
25
|
-
},
|
|
26
|
-
"main": "main.js",
|
|
27
|
-
"files": [
|
|
28
|
-
"admin{,/!(src)/**}/!(tsconfig|tsconfig.*).json",
|
|
29
|
-
"admin{,/!(src)/**}/*.{html,css,png,svg,jpg,js}",
|
|
30
|
-
"lib/**/*.js",
|
|
31
|
-
"io-package.json",
|
|
32
|
-
"LICENSE",
|
|
33
|
-
"main.js"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"test": "npm run test:package",
|
|
37
|
-
"test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
|
|
38
|
-
"test:package": "mocha test/package --exit",
|
|
39
|
-
"test:integration": "mocha test/integration --exit",
|
|
40
|
-
"lint": "eslint -c eslint.config.mjs .",
|
|
41
|
-
"lint:fix": "eslint -c eslint.config.mjs . --fix",
|
|
42
|
-
"translate": "translate-adapter",
|
|
43
|
-
"release": "release-script"
|
|
44
|
-
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@iobroker/adapter-core": "^3.3.2"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@alcalzone/release-script": "^5.1.1",
|
|
50
|
-
"@alcalzone/release-script-plugin-iobroker": "^5.1.2",
|
|
51
|
-
"@alcalzone/release-script-plugin-license": "^5.1.1",
|
|
52
|
-
"@alcalzone/release-script-plugin-manual-review": "^5.1.1",
|
|
53
|
-
"@iobroker/adapter-dev": "^1.5.0",
|
|
54
|
-
"@iobroker/eslint-config": "^2.2.0",
|
|
55
|
-
"@iobroker/testing": "^5.2.2",
|
|
56
|
-
"@types/node": "^25.5.0",
|
|
57
|
-
"typescript": "~5.9.3"
|
|
58
|
-
},
|
|
59
|
-
"bugs": {
|
|
60
|
-
"url": "https://github.com/alex/iobroker.pv-notifications/issues"
|
|
61
|
-
},
|
|
62
|
-
"readmeFilename": "README.md"
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "iobroker.pv-notifications",
|
|
3
|
+
"version": "1.2.21",
|
|
4
|
+
"description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Alex1808 via LLM: Qwen",
|
|
7
|
+
"email": "sadam6752@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/sadam6752-tech/ioBroker.pv-notifications",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"ioBroker",
|
|
13
|
+
"PV",
|
|
14
|
+
"Solar",
|
|
15
|
+
"Batterie",
|
|
16
|
+
"Telegram",
|
|
17
|
+
"Smart Home"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/sadam6752-tech/ioBroker.pv-notifications.git"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20.0.0"
|
|
25
|
+
},
|
|
26
|
+
"main": "main.js",
|
|
27
|
+
"files": [
|
|
28
|
+
"admin{,/!(src)/**}/!(tsconfig|tsconfig.*).json",
|
|
29
|
+
"admin{,/!(src)/**}/*.{html,css,png,svg,jpg,js}",
|
|
30
|
+
"lib/**/*.js",
|
|
31
|
+
"io-package.json",
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"main.js"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"test": "npm run test:package",
|
|
37
|
+
"test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
|
|
38
|
+
"test:package": "mocha test/package --exit",
|
|
39
|
+
"test:integration": "mocha test/integration --exit",
|
|
40
|
+
"lint": "eslint -c eslint.config.mjs .",
|
|
41
|
+
"lint:fix": "eslint -c eslint.config.mjs . --fix",
|
|
42
|
+
"translate": "translate-adapter",
|
|
43
|
+
"release": "release-script"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@iobroker/adapter-core": "^3.3.2"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@alcalzone/release-script": "^5.1.1",
|
|
50
|
+
"@alcalzone/release-script-plugin-iobroker": "^5.1.2",
|
|
51
|
+
"@alcalzone/release-script-plugin-license": "^5.1.1",
|
|
52
|
+
"@alcalzone/release-script-plugin-manual-review": "^5.1.1",
|
|
53
|
+
"@iobroker/adapter-dev": "^1.5.0",
|
|
54
|
+
"@iobroker/eslint-config": "^2.2.0",
|
|
55
|
+
"@iobroker/testing": "^5.2.2",
|
|
56
|
+
"@types/node": "^25.5.0",
|
|
57
|
+
"typescript": "~5.9.3"
|
|
58
|
+
},
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/alex/iobroker.pv-notifications/issues"
|
|
61
|
+
},
|
|
62
|
+
"readmeFilename": "README.md"
|
|
63
|
+
}
|
|
Binary file
|