iobroker.amtronwallbox 0.2.10 → 0.2.12

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
@@ -54,7 +54,10 @@ Note: Since the boxes have different interfaces, it may be that not all interfac
54
54
  Placeholder for the next version (at the beginning of the line):
55
55
  ### **WORK IN PROGRESS**
56
56
  -->
57
- ### 0.2.10 (2023-12-16)
57
+ ### 0.2.12 (2023-12-23)
58
+ * (René) see issue #162: ignore unused data from wallbox
59
+
60
+ ### 0.2.11 (2023-12-16)
58
61
  * (René) type of adapter changed back to "energy"
59
62
 
60
63
  ### 0.2.9 (2023-12-16)
package/io-package.json CHANGED
@@ -1,9 +1,22 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "amtronwallbox",
4
- "version": "0.2.10",
4
+ "version": "0.2.12",
5
5
  "news": {
6
- "0.2.10": {
6
+ "0.2.12": {
7
+ "en": "(René) see issue #162: ignore unused data from wallbox",
8
+ "de": "(René) siehe Ausgabe #162: Nicht genutzte Daten von wallbox ignorieren",
9
+ "ru": "(René) см. номер #162: игнорировать неиспользуемые данные из настенного ящика",
10
+ "pt": "(René) ver número #162: ignorar dados não utilizados da wallbox",
11
+ "nl": "Vertaling:",
12
+ "fr": "(René) voir le numéro #162: ignorer les données inutilisées de la boîte murale",
13
+ "it": "(René) vedi numero #162: ignora i dati inutilizzati dal wallbox",
14
+ "es": "(René) ver el número #162: ignorar los datos no utilizados de wallbox",
15
+ "pl": "(René) ↓, s. 11",
16
+ "uk": "(René) див. питання #162: ігнорувати невикористані дані з скриньки",
17
+ "zh-cn": "(René) 见第162号:无视墙壁数据"
18
+ },
19
+ "0.2.11": {
7
20
  "en": "(René) type of adapter changed back to \"energy\"",
8
21
  "de": "(René) Typ des Adapters zurück in die Energie",
9
22
  "ru": "(René) тип адаптера изменился обратно к энергии",
@@ -16,6 +29,19 @@
16
29
  "uk": "(René) тип адаптера змінився назад до енергії",
17
30
  "zh-cn": "(René) 适应者类型改为能源"
18
31
  },
32
+ "0.2.10": {
33
+ "en": "(René) type of adapter changed back to \"energy\"",
34
+ "de": "(René) Typ des Adapters zurückgestellt auf 'Energie'",
35
+ "ru": "(René) тип адаптера изменился обратно к энергии",
36
+ "pt": "(René) tipo de adaptador alterado de volta à energia",
37
+ "nl": "Een soort van adapter veranderde terug in energie",
38
+ "fr": "(René) type d'adaptateur changé en énergie",
39
+ "it": "(René) tipo di adattatore cambiato di nuovo in energia",
40
+ "es": "(René) tipo de adaptador cambiado de nuevo a la energía",
41
+ "pl": "(René) rodzaj adaptatora zmieniał się z powrotem do energii",
42
+ "uk": "(René) тип адаптера змінився назад до енергії",
43
+ "zh-cn": "(René) 适应者类型改为能源"
44
+ },
19
45
  "0.2.9": {
20
46
  "en": "dependencies updated",
21
47
  "de": "Abhängigkeiten aktualisiert",
@@ -67,32 +93,6 @@
67
93
  "pl": "dalsze przygotowania do najnowszego repozytorium",
68
94
  "uk": "подальша підготовка до останнього сховища",
69
95
  "zh-cn": "为最新存储库做进一步准备"
70
- },
71
- "0.2.5": {
72
- "en": "smaller bug fixes",
73
- "de": "kleinere Fehlerbehebungen",
74
- "ru": "мелкие исправления ошибок",
75
- "pt": "correções de bugs menores",
76
- "nl": "kleinere bugfixes",
77
- "fr": "petites corrections de bugs",
78
- "it": "correzioni di bug minori",
79
- "es": "correcciones de errores más pequeñas",
80
- "pl": "mniejsze poprawki błędów",
81
- "uk": "менші виправлення помилок",
82
- "zh-cn": "较小的错误修复"
83
- },
84
- "0.2.4": {
85
- "en": "dependencies updated",
86
- "de": "Abhängigkeiten aktualisiert",
87
- "ru": "зависимости обновлены",
88
- "pt": "dependências atualizadas",
89
- "nl": "afhankelijkheden bijgewerkt",
90
- "fr": "dépendances mises à jour",
91
- "it": "dipendenze aggiornate",
92
- "es": "dependencias actualizadas",
93
- "pl": "zaktualizowane zależności",
94
- "uk": "залежності оновлено",
95
- "zh-cn": "依赖项已更新"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/main.js CHANGED
@@ -191,6 +191,37 @@ async function read_MHCP_DevInfo(system) {
191
191
 
192
192
  adapter.log.debug("got status data: " + typeof buffer.data + " " + JSON.stringify(buffer.data));
193
193
 
194
+ /*
195
+ "DevName":"Wall-e",
196
+ "LocTime":1703263828,
197
+ "Summer":true,
198
+ "Tz":120,
199
+ "ItemNo":"1344201",
200
+ "Sn":420101388,
201
+ "Hcc3":"HCC3 V1.13",
202
+ "Hmi":"SW:1.8 HW:0x3 SN:0xa",
203
+ "Rfid":null,
204
+ "Wifi":"BA 1.1.9",
205
+ "FixedVehCosts":0,
206
+ "OldVehCosts":0,
207
+ "Color":0,
208
+ "DevMode":"Remote",
209
+ "ChgState":"Idle",
210
+ "WifiOn":true,
211
+ "AutoChg":true,
212
+ "ChgContinue":true,
213
+ "Err":0,
214
+ "Battery":5000,
215
+ "Phases":3,
216
+ "Cable":true,
217
+ "Auth":false,
218
+ "DsoEnabled":false,
219
+ "EmEnabled":false,
220
+ "MaxCurr":0,
221
+ "MaxPwr":0,
222
+ "MaxCurrWb":0
223
+ */
224
+
194
225
  const SystemName = system.Name.replace(adapter.FORBIDDEN_CHARS, "_");
195
226
 
196
227
  if (buffer != null && buffer.status == 200 && buffer.data != null) {
@@ -231,12 +262,72 @@ async function read_MHCP_ChargeData(system) {
231
262
 
232
263
  adapter.log.debug("got charge data: " + typeof buffer.data + " " + JSON.stringify(buffer.data));
233
264
 
265
+ /*
266
+
267
+ "ChgState": "Idle",
268
+ "Tariff": "T1",
269
+ "Price": 270,
270
+ "Uid": "",
271
+ "ChgDuration": 18613,
272
+ "ChgNrg": 12648,
273
+ "NrgDemand": 0,
274
+ "Solar": 0,
275
+ "EmTime": 1440,
276
+ "RemTime": 1440,
277
+ "ActPwr": 0,
278
+ "ActCurr": 0,
279
+ "MaxCurrT1": 0,
280
+ "BeginH_T1": 4,
281
+ "BeginM_T1": 30,
282
+ "PriceT1": 270,
283
+ "MaxCurrT2": 0,
284
+ "BeginH_T2": 22,
285
+ "BeginM_T2": 0,
286
+ "PriceT2": 200,
287
+ "RemoteCurr": 0,
288
+ "SolarPrice": 0,
289
+ "ExcessNrg": true,
290
+ "TMaxCurrT1": 0,
291
+ "TBeginH_T1": 4,
292
+ "TBeginM_T1": 30,
293
+ "TPriceT1": 270,
294
+ "TMaxCurrT2": 0,
295
+ "TBeginH_T2": 22,
296
+ "TBeginM_T2": 0,
297
+ "TPriceT2": 200,
298
+ "TRemoteCurr": 0,
299
+ "TSolarPrice": 0,
300
+ "TExcessNrg": true,
301
+ "HCCP": "A11"
302
+ */
303
+
304
+
305
+
306
+
307
+
234
308
  const SystemName = system.Name.replace(adapter.FORBIDDEN_CHARS, "_");
235
309
 
236
310
  if (buffer != null && buffer.status == 200 && buffer.data != null) {
237
311
 
238
312
  for (const entry in buffer.data) {
239
- await adapter.setStateAsync(SystemName + ".charge." + entry, { ack: true, val: buffer.data[entry] });
313
+
314
+ if (entry == "TMaxCurrT1"
315
+ || entry == "TBeginH_T1"
316
+ || entry == "TBeginM_T1"
317
+ || entry == "TPriceT1"
318
+ || entry == "TMaxCurrT2"
319
+ || entry == "TBeginH_T2"
320
+ || entry == "TBeginM_T2"
321
+ || entry == "TPriceT2"
322
+ || entry == "TRemoteCurr"
323
+ || entry == "TSolarPrice"
324
+ || entry == "TExcessNrg"
325
+ ) {
326
+ //do nothing
327
+ }
328
+ else {
329
+ await adapter.setStateAsync(SystemName + ".charge." + entry, { ack: true, val: buffer.data[entry] });
330
+ }
240
331
  }
241
332
  }
242
333
  }
@@ -458,7 +549,7 @@ async function read_rest(system) {
458
549
  }
459
550
  }
460
551
 
461
-
552
+ /*
462
553
  function toDate(sDate) {
463
554
 
464
555
  //yyyymmdd
@@ -470,6 +561,7 @@ function toDate(sDate) {
470
561
 
471
562
  return oDate.toLocaleDateString();
472
563
  }
564
+ */
473
565
 
474
566
  async function HandleStateChange(id, state) {
475
567
 
@@ -504,7 +596,7 @@ async function updateInfo(id,state) {
504
596
 
505
597
  if (SystemName == systemName && system.IsActive) {
506
598
  if (system.Type === "ChargeControl") {
507
-
599
+ //nothing to do
508
600
  }
509
601
  else if (system.Type === "Compact") {
510
602
  await write_MHCP_DevInfo(system, id,state);
@@ -531,7 +623,7 @@ async function updateCharge(id, state) {
531
623
 
532
624
  if (SystemName == systemName && system.IsActive) {
533
625
  if (system.Type === "ChargeControl") {
534
-
626
+ //nothing to do
535
627
  }
536
628
  else if (system.Type === "Compact") {
537
629
  await write_MHCP_ChargeData(system, id, state);
@@ -628,10 +720,10 @@ function subscribeVars() {
628
720
 
629
721
  if (system.IsActive) {
630
722
  if (system.Type === "ChargeControl") {
631
-
723
+ //nothing to do
632
724
  }
633
725
  else if (system.Type === "Compact") {
634
-
726
+ //nothing to do
635
727
  }
636
728
  else if (system.Type === "Xtra") {
637
729
 
@@ -687,7 +779,7 @@ async function checkVariables() {
687
779
  await checkVariables_rest(system);
688
780
  }
689
781
  else if (system.Type === "Compact") {
690
-
782
+ //nothing to do
691
783
  }
692
784
  else if (system.Type === "Xtra") {
693
785
  await checkVariables_MHCP(system);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.amtronwallbox",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "ioBroker Adapter for AMTRON wallboxes",
5
5
  "author": {
6
6
  "name": "René G.",
@@ -34,11 +34,11 @@
34
34
  "@alcalzone/release-script-plugin-license": "3.7.0",
35
35
  "@iobroker/adapter-dev": "1.2.0",
36
36
  "@iobroker/testing": "4.1.0",
37
- "@types/chai": "4.3.10",
37
+ "@types/chai": "4.3.11",
38
38
  "@types/chai-as-promised": "7.1.8",
39
39
  "@types/gulp": "4.0.17",
40
40
  "@types/mocha": "10.0.4",
41
- "@types/node": "20.9.1",
41
+ "@types/node": "20.10.4",
42
42
  "@types/proxyquire": "1.3.31",
43
43
  "@types/request-promise-native": "1.0.21",
44
44
  "@types/sinon": "17.0.1",
@@ -46,7 +46,7 @@
46
46
  "axios": "1.6.2",
47
47
  "chai": "4.3.10",
48
48
  "chai-as-promised": "7.1.1",
49
- "eslint": "8.54.0",
49
+ "eslint": "8.56.0",
50
50
  "gulp": "4.0.2",
51
51
  "mocha": "10.2.0",
52
52
  "proxyquire": "2.1.3",