iobroker.easee 1.0.4 → 1.0.7

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
@@ -30,6 +30,15 @@ chargerOpMode =
30
30
  dynamicCircuitCurrentPX -> All phases must be set within 500ms (script) otherwise the phase will be set to 0.
31
31
 
32
32
  ## Changelog
33
+ ### 1.0.7
34
+ * (Newan) Changed login URL
35
+
36
+ ### 1.0.6
37
+ * (Newan) Changed that smart charging is editable
38
+
39
+ ### 1.0.5
40
+ * (marwin79) More Features supported and convert values to expected datatypes
41
+
33
42
  ### 1.0.4
34
43
  * (Newan) dynamicCircuitCurrentPX writeable (set all Phases in 500ms) to limit ampere
35
44
 
package/io-package.json CHANGED
@@ -1,8 +1,44 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "easee",
4
- "version": "1.0.4",
4
+ "version": "1.0.7",
5
5
  "news": {
6
+ "1.0.7": {
7
+ "en": "Changed login URL",
8
+ "de": "Änderung der Login-URL",
9
+ "ru": "Изменить URL входа",
10
+ "pt": "URL de login alterado",
11
+ "nl": "Veranderde login URL",
12
+ "fr": "Changement d'URL de connexion",
13
+ "it": "URL di login modificato",
14
+ "es": "URL de inicio de sesión cambiado",
15
+ "pl": "Zmienił login URL",
16
+ "zh-cn": "变化的伐木"
17
+ },
18
+ "1.0.6": {
19
+ "en": "Changed that smart charging is editable",
20
+ "de": "Geändert, dass Smart Charging bearbeitet werden kann",
21
+ "ru": "Изменено, что умная зарядка доступна для редактирования",
22
+ "pt": "Alterado que o carregamento inteligente é editável",
23
+ "nl": "Gewijzigd dat slim opladen bewerkbaar is",
24
+ "fr": "Changé que la charge intelligente est modifiable",
25
+ "it": "Modificato che la ricarica intelligente è modificabile",
26
+ "es": "Se modificó que la carga inteligente es editable",
27
+ "pl": "Zmieniono, że inteligentne ładowanie można edytować",
28
+ "zh-cn": "更改智能充电可编辑"
29
+ },
30
+ "1.0.5": {
31
+ "en": "marwin79 - More Features supported and convert values to expected datatypes",
32
+ "de": "marwin79 - Weitere unterstützte Funktionen und Konvertieren von Werten in erwartete Datentypen",
33
+ "ru": "marwin79 - Поддерживаются дополнительные функции и преобразование значений в ожидаемые типы данных",
34
+ "pt": "marwin79 - Mais recursos suportados e convertem valores em tipos de dados esperados",
35
+ "nl": "marwin79 - Meer ondersteunde functies en converteer waarden naar verwachte datatypes",
36
+ "fr": "marwin79 - Plus de fonctionnalités prises en charge et convertir les valeurs en types de données attendus",
37
+ "it": "marwin79 - Altre funzionalità supportate e converte i valori nei tipi di dati previsti",
38
+ "es": "marwin79: se admiten más funciones y se convierten los valores en los tipos de datos esperados",
39
+ "pl": "marwin79 - Więcej funkcji obsługiwanych i konwertowanie wartości na oczekiwane typy danych",
40
+ "zh-cn": "marwin79 - 支持更多功能并将值转换为预期的数据类型"
41
+ },
6
42
  "1.0.4": {
7
43
  "en": "dynamicCircuitCurrentPX writeable (set all phases in 500ms) to limit ampere ",
8
44
  "de": "dynamicCircuitCurrentPX beschreibbar (alle Phasen in 500ms einstellen) um Ampere zu begrenzen",
package/lib/enum.js CHANGED
@@ -331,16 +331,21 @@ const easeeIds = {
331
331
  36: '.config.wiFiSSID',
332
332
  38: '.config.phaseMode',
333
333
  40: '.config.ledStripBrightness',
334
+ 44: '.config.smartButtonEnabled',
335
+
334
336
  48: '.config.dynamicChargerCurrent',
337
+ 111: '.config.dynamicCircuitCurrentP1',
338
+ 112: '.config.dynamicCircuitCurrentP2',
339
+ 113: '.config.dynamicCircuitCurrentP3',
335
340
 
336
341
  //Status
342
+ 46: '.status.ledMode',
337
343
  68: '.status.wiFiAPEnabled',
338
344
  82: '.status.chargerFirmware',
345
+ 96: '.status.reasonForNoCurrent',
346
+ 102: '.status.smartCharging',
339
347
  103: '.status.cableLocked',
340
348
  109: '.status.chargerOpMode',
341
- 111: '.status.dynamicCircuitCurrentP1',
342
- 112: '.status.dynamicCircuitCurrentP2',
343
- 113: '.status.dynamicCircuitCurrentP3',
344
349
  110: '.status.outputCurrent',
345
350
  120: '.status.totalPower',
346
351
  122: '.status.energyPerHour',
@@ -353,8 +358,17 @@ const easeeIds = {
353
358
  182: '.status.inCurrentT2',
354
359
  183: '.status.inCurrentT3',
355
360
  184: '.status.inCurrentT4',
356
- 186: '.status.inCurrentT5',
357
-
361
+ 185: '.status.inCurrentT5',
362
+ 190: '.status.inVoltageT1T2',
363
+ 191: '.status.inVoltageT1T3',
364
+ 192: '.status.inVoltageT1T4',
365
+ 193: '.status.inVoltageT1T5',
366
+ 194: '.status.inVoltageT2T3',
367
+ 195: '.status.inVoltageT2T4',
368
+ 196: '.status.inVoltageT2T5',
369
+ 197: '.status.inVoltageT3T4',
370
+ 198: '.status.inVoltageT3T5',
371
+ 199: '.status.inVoltageT4T5',
358
372
  };
359
373
  Object.freeze(easeeIds);
360
374
 
package/main.js CHANGED
@@ -18,7 +18,6 @@ let roundCounter = 0;
18
18
  const arrCharger = [];
19
19
 
20
20
  //Variable für dynamicCircuitCurrentPX
21
- let timerDynamicCircuitCurrent;
22
21
  let dynamicCircuitCurrentP1 = 0;
23
22
  let dynamicCircuitCurrentP2 = 0;
24
23
  let dynamicCircuitCurrentP3 = 0;
@@ -49,23 +48,36 @@ class Easee extends utils.Adapter {
49
48
  .build();
50
49
 
51
50
  connection.on('ProductUpdate', data => {
52
- //haben einen neuen Wert über SIgnalR erhalten
53
- if(objEnum.getNameByEnum(data.id) == undefined) {
51
+ //haben einen neuen Wert über SignalR erhalten
52
+ const data_name = objEnum.getNameByEnum(data.id);
53
+ if (data_name == undefined) {
54
54
  this.log.debug('New SignalR-ID, possible new Value: ' + data.id);
55
55
  this.log.debug(JSON.stringify(data));
56
56
  } else {
57
57
  //Value is in ioBroker, update it
58
- const tmpValueId = data.mid + objEnum.getNameByEnum(data.id);
59
- this.log.info('New value over SignalR for: ' + tmpValueId + 'value: ' + data.value);
58
+ const tmpValueId = data.mid + data_name;
59
+ this.log.debug('New value over SignalR for: ' + tmpValueId + ', value: ' + data.value);
60
+ switch (data.dataType) {
61
+ case 2:
62
+ data.value = data.value == '1';
63
+ break;
64
+ case 3:
65
+ data.value = parseFloat(data.value);
66
+ break;
67
+ case 4:
68
+ data.value = parseInt(data.value);
69
+ break;
70
+ //case 6: JSON
71
+ }
60
72
  this.setStateAsync(tmpValueId, { val: data.value, ack: true });
61
73
  }
62
74
  });
63
75
 
64
76
  connection.start().then(() => {
65
77
  //for each charger subscribe SignalR
66
- arrCharger.forEach(charger => {
67
- connection.send('SubscribeWithCurrentState', 'EH530097', true).then(() => {
68
- this.log.info('Charger registrate in SignalR: ' + charger.id);
78
+ arrCharger.forEach(charger_id => {
79
+ connection.send('SubscribeWithCurrentState', charger_id, true).then(() => {
80
+ this.log.info('Charger registrate in SignalR: ' + charger_id);
69
81
  });
70
82
  });
71
83
  });
@@ -97,7 +109,6 @@ class Easee extends utils.Adapter {
97
109
  this.log.error('No password set');
98
110
  } else {
99
111
  this.log.debug('Api login started');
100
- this.log.debug('Password is:' + this.config.client_secret);
101
112
  const login = await this.login(this.config.username, this.config.client_secret);
102
113
  if (login) {
103
114
  //Erstes Objekt erstellen
@@ -147,7 +158,7 @@ class Easee extends utils.Adapter {
147
158
  async readAllStates() {
148
159
  if(expireTime <= Date.now()) {
149
160
  //Token ist expired!
150
- this.log.info('Token is Expired - refresh');
161
+ this.log.info('Token has expired - refresh');
151
162
  await this.refreshToken();
152
163
  }
153
164
 
@@ -167,7 +178,7 @@ class Easee extends utils.Adapter {
167
178
  arrCharger.push(charger.id);
168
179
  }
169
180
 
170
- this.log.debug('Charger gefunden');
181
+ this.log.debug('Charger found');
171
182
  this.log.debug(JSON.stringify(charger));
172
183
  try {
173
184
 
@@ -189,9 +200,12 @@ class Easee extends utils.Adapter {
189
200
  //etzen die Objekte
190
201
  this.setNewSessionToCharger(charger, tmpChargerSession);
191
202
  }
192
- } catch (err) {
193
- //geben die Fehlermeldng der API-funktion aus
194
- this.log.error(err);
203
+ } catch (error) {
204
+ if (typeof error === 'string') {
205
+ this.log.error(error);
206
+ } else if (error instanceof Error) {
207
+ this.log.error(error.message);
208
+ }
195
209
  }
196
210
 
197
211
  });
@@ -232,11 +246,9 @@ class Easee extends utils.Adapter {
232
246
  this.log.debug('Update circuitMaxCurrent to: ' + state.val);
233
247
  this.log.debug('Get infos from site:');
234
248
  this.log.debug(JSON.stringify(site));
235
- this.log.debug('Get infos from site:');
236
- this.log.debug(JSON.stringify(site));
237
249
 
238
250
  this.changeMaxCircuitConfig(site.id, site.circuits[0].id, state.val);
239
- this.log.debug('Changes send to API');
251
+ this.log.debug('Changes sent to API');
240
252
  });
241
253
  } else if (tmpControl[4] == 'dynamicCircuitCurrentP1' || tmpControl[4] == 'dynamicCircuitCurrentP2' || tmpControl[4] == 'dynamicCircuitCurrentP3') {
242
254
 
@@ -248,13 +260,13 @@ class Easee extends utils.Adapter {
248
260
  //setze die WErte für das Update
249
261
  switch(tmpControl[4]) {
250
262
  case 'dynamicCircuitCurrentP1':
251
- dynamicCircuitCurrentP1 = state.val;
263
+ dynamicCircuitCurrentP1 = Number(state.val);
252
264
  break;
253
265
  case 'dynamicCircuitCurrentP2':
254
- dynamicCircuitCurrentP2 = state.val;
266
+ dynamicCircuitCurrentP2 = Number(state.val);
255
267
  break;
256
268
  case 'dynamicCircuitCurrentP3':
257
- dynamicCircuitCurrentP3 = state.val;
269
+ dynamicCircuitCurrentP3 = Number(state.val);
258
270
  break;
259
271
  }
260
272
 
@@ -273,7 +285,7 @@ class Easee extends utils.Adapter {
273
285
  } else {
274
286
  this.log.debug('update config to API: ' + id);
275
287
  this.changeConfig(tmpControl[2], tmpControl[4], state.val);
276
- this.log.debug('Changes send to API');
288
+ this.log.debug('Changes sent to API');
277
289
  }
278
290
  }
279
291
  } else {
@@ -327,31 +339,43 @@ class Easee extends utils.Adapter {
327
339
  await this.setStateAsync(charger.id + '.status.wiFiRSSI', charger_states.wiFiRSSI, true);
328
340
  await this.setStateAsync(charger.id + '.status.chargerFirmware', charger_states.chargerFirmware, true);
329
341
  await this.setStateAsync(charger.id + '.status.latestFirmware', charger_states.latestFirmware, true);
342
+ await this.setStateAsync(charger.id + '.status.reasonForNoCurrent', charger_states.reasonForNoCurrent, true);
330
343
  await this.setStateAsync(charger.id + '.status.voltage', charger_states.voltage, true);
331
344
  await this.setStateAsync(charger.id + '.status.outputCurrent', charger_states.outputCurrent, true);
332
345
  await this.setStateAsync(charger.id + '.status.isOnline', charger_states.isOnline, true);
333
346
  await this.setStateAsync(charger.id + '.status.wiFiAPEnabled', charger_states.wiFiAPEnabled, true);
347
+ await this.setStateAsync(charger.id + '.status.ledMode', charger_states.ledMode, true);
334
348
  await this.setStateAsync(charger.id + '.status.lifetimeEnergy', charger_states.lifetimeEnergy, true);
335
349
  await this.setStateAsync(charger.id + '.status.energyPerHour', charger_states.energyPerHour, true);
336
350
  await this.setStateAsync(charger.id + '.status.inCurrentT2', charger_states.inCurrentT2, true);
337
351
  await this.setStateAsync(charger.id + '.status.inCurrentT3', charger_states.inCurrentT3, true);
338
352
  await this.setStateAsync(charger.id + '.status.inCurrentT4', charger_states.inCurrentT4, true);
339
353
  await this.setStateAsync(charger.id + '.status.inCurrentT5', charger_states.inCurrentT5, true);
354
+ await this.setStateAsync(charger.id + '.status.inVoltageT1T2', charger_states.inVoltageT1T2, true);
355
+ await this.setStateAsync(charger.id + '.status.inVoltageT1T3', charger_states.inVoltageT1T3, true);
356
+ await this.setStateAsync(charger.id + '.status.inVoltageT1T4', charger_states.inVoltageT1T4, true);
357
+ await this.setStateAsync(charger.id + '.status.inVoltageT1T5', charger_states.inVoltageT1T5, true);
358
+ await this.setStateAsync(charger.id + '.status.inVoltageT2T3', charger_states.inVoltageT2T3, true);
359
+ await this.setStateAsync(charger.id + '.status.inVoltageT2T4', charger_states.inVoltageT2T4, true);
360
+ await this.setStateAsync(charger.id + '.status.inVoltageT2T5', charger_states.inVoltageT2T5, true);
361
+ await this.setStateAsync(charger.id + '.status.inVoltageT3T4', charger_states.inVoltageT3T4, true);
362
+ await this.setStateAsync(charger.id + '.status.inVoltageT3T5', charger_states.inVoltageT3T5, true);
363
+ await this.setStateAsync(charger.id + '.status.inVoltageT4T5', charger_states.inVoltageT4T5, true);
340
364
 
341
365
  //wert der config wird nur hier gesendet
342
366
  await this.setStateAsync(charger.id + '.config.dynamicChargerCurrent', { val: charger_states.dynamicChargerCurrent, ack: true });
343
367
  await this.setStateAsync(charger.id + '.config.dynamicCircuitCurrentP1', { val: charger_states.dynamicCircuitCurrentP1, ack: true });
344
368
  await this.setStateAsync(charger.id + '.config.dynamicCircuitCurrentP2', { val: charger_states.dynamicCircuitCurrentP2, ack: true });
345
369
  await this.setStateAsync(charger.id + '.config.dynamicCircuitCurrentP3', { val: charger_states.dynamicCircuitCurrentP3, ack: true });
346
-
370
+ await this.setStateAsync(charger.id + '.config.smartCharging', charger_states.smartCharging, true);
347
371
  }
348
372
 
349
-
350
373
  //Setzen alle Status für Config
351
374
  async setConfigStatus(charger, charger_config) {
352
375
  await this.setStateAsync(charger.id + '.config.isEnabled',{ val: charger_config.isEnabled, ack: true } );
353
376
  await this.setStateAsync(charger.id + '.config.phaseMode', { val: charger_config.phaseMode, ack: true });
354
377
  await this.setStateAsync(charger.id + '.config.ledStripBrightness', { val: charger_config.ledStripBrightness, ack: true });
378
+ await this.setStateAsync(charger.id + '.config.smartButtonEnabled', { val: charger_config.smartButtonEnabled, ack: true });
355
379
  await this.setStateAsync(charger.id + '.config.wiFiSSID', { val: charger_config.wiFiSSID, ack: true });
356
380
  await this.setStateAsync(charger.id + '.config.maxChargerCurrent', { val: charger_config.maxChargerCurrent, ack: true });
357
381
 
@@ -359,8 +383,6 @@ class Easee extends utils.Adapter {
359
383
  await this.setStateAsync(charger.id + '.config.circuitMaxCurrentP1', { val: charger_config.circuitMaxCurrentP1, ack: true });
360
384
  await this.setStateAsync(charger.id + '.config.circuitMaxCurrentP2', { val: charger_config.circuitMaxCurrentP3, ack: true });
361
385
  await this.setStateAsync(charger.id + '.config.circuitMaxCurrentP3', { val: charger_config.circuitMaxCurrentP3, ack: true });
362
-
363
-
364
386
  }
365
387
 
366
388
  /*************************************************************************
@@ -372,7 +394,7 @@ class Easee extends utils.Adapter {
372
394
  async login(username, password) {
373
395
 
374
396
  try {
375
- const response = await axios.post(apiUrl + '/api/accounts/token', {
397
+ const response = await axios.post(apiUrl + '/api/accounts/login', {
376
398
  userName: username,
377
399
  password: password
378
400
  });
@@ -387,7 +409,11 @@ class Easee extends utils.Adapter {
387
409
  return true;
388
410
  } catch (error) {
389
411
  this.log.error('Api login error - check Username and password');
390
- this.log.debug(error.message);
412
+ if (typeof error === 'string') {
413
+ this.log.error(error);
414
+ } else if (error instanceof Error) {
415
+ this.log.error(error.message);
416
+ }
391
417
  await this.setStateAsync('info.connection', false, true);
392
418
  return false;
393
419
  }
@@ -775,6 +801,19 @@ class Easee extends utils.Adapter {
775
801
  native: {},
776
802
  });
777
803
 
804
+ //"reasonForNoCurrent": 0,
805
+ await this.setObjectNotExistsAsync(charger.id + '.status.reasonForNoCurrent', {
806
+ type: 'state',
807
+ common: {
808
+ name: 'Reason for not offering current to the car',
809
+ type: 'number',
810
+ role: 'value',
811
+ read: true,
812
+ write: false,
813
+ },
814
+ native: {},
815
+ });
816
+
778
817
  //"voltage": 0,
779
818
  await this.setObjectNotExistsAsync(charger.id + '.status.voltage', {
780
819
  type: 'state',
@@ -853,6 +892,127 @@ class Easee extends utils.Adapter {
853
892
  native: {},
854
893
  });
855
894
 
895
+ //"inVoltageT1T2": 0,
896
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT1T2', {
897
+ type: 'state',
898
+ common: {
899
+ name: 'Current Voltage for between inputs T1 and T2 [Volts]',
900
+ type: 'number',
901
+ role: 'value.voltage',
902
+ read: true,
903
+ write: false,
904
+ },
905
+ native: {},
906
+ });
907
+ //"inVoltageT1T3": 0,
908
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT1T3', {
909
+ type: 'state',
910
+ common: {
911
+ name: 'Current Voltage for between inputs T1 and T3 [Volts]',
912
+ type: 'number',
913
+ role: 'value.voltage',
914
+ read: true,
915
+ write: false,
916
+ },
917
+ native: {},
918
+ });
919
+ //"inVoltageT1T4": 0,
920
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT1T4', {
921
+ type: 'state',
922
+ common: {
923
+ name: 'Current Voltage for between inputs T1 and T4 [Volts]',
924
+ type: 'number',
925
+ role: 'value.voltage',
926
+ read: true,
927
+ write: false,
928
+ },
929
+ native: {},
930
+ });
931
+ //"inVoltageT1T5": 0,
932
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT1T5', {
933
+ type: 'state',
934
+ common: {
935
+ name: 'Current Voltage for between inputs T1 and T5 [Volts]',
936
+ type: 'number',
937
+ role: 'value.voltage',
938
+ read: true,
939
+ write: false,
940
+ },
941
+ native: {},
942
+ });
943
+ //"inVoltageT2T3": 0,
944
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT2T3', {
945
+ type: 'state',
946
+ common: {
947
+ name: 'Current Voltage for between inputs T2 and T3 [Volts]',
948
+ type: 'number',
949
+ role: 'value.voltage',
950
+ read: true,
951
+ write: false,
952
+ },
953
+ native: {},
954
+ });
955
+ //"inVoltageT2T4": 0,
956
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT2T4', {
957
+ type: 'state',
958
+ common: {
959
+ name: 'Current Voltage for between inputs T2 and T4 [Volts]',
960
+ type: 'number',
961
+ role: 'value.voltage',
962
+ read: true,
963
+ write: false,
964
+ },
965
+ native: {},
966
+ });
967
+ //"inVoltageT2T5": 0,
968
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT2T5', {
969
+ type: 'state',
970
+ common: {
971
+ name: 'Current Voltage for between inputs T2 and T5 [Volts]',
972
+ type: 'number',
973
+ role: 'value.voltage',
974
+ read: true,
975
+ write: false,
976
+ },
977
+ native: {},
978
+ });
979
+ //"inVoltageT3T4": 0,
980
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT3T4', {
981
+ type: 'state',
982
+ common: {
983
+ name: 'Current Voltage for between inputs T3 and T4 [Volts]',
984
+ type: 'number',
985
+ role: 'value.voltage',
986
+ read: true,
987
+ write: false,
988
+ },
989
+ native: {},
990
+ });
991
+ //"inVoltageT3T5": 0,
992
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT3T5', {
993
+ type: 'state',
994
+ common: {
995
+ name: 'Current Voltage for between inputs T3 and T5 [Volts]',
996
+ type: 'number',
997
+ role: 'value.voltage',
998
+ read: true,
999
+ write: false,
1000
+ },
1001
+ native: {},
1002
+ });
1003
+ //"inVoltageT4T5": 0,
1004
+ await this.setObjectNotExistsAsync(charger.id + '.status.inVoltageT4T5', {
1005
+ type: 'state',
1006
+ common: {
1007
+ name: 'Current Voltage for between inputs T4 and T5 [Volts]',
1008
+ type: 'number',
1009
+ role: 'value.voltage',
1010
+ read: true,
1011
+ write: false,
1012
+ },
1013
+ native: {},
1014
+ });
1015
+
856
1016
  //"isOnline": true,
857
1017
  await this.setObjectNotExistsAsync(charger.id + '.status.isOnline', {
858
1018
  type: 'state',
@@ -879,6 +1039,19 @@ class Easee extends utils.Adapter {
879
1039
  native: {},
880
1040
  });
881
1041
 
1042
+ //"ledMode": true,
1043
+ await this.setObjectNotExistsAsync(charger.id + '.status.ledMode', {
1044
+ type: 'state',
1045
+ common: {
1046
+ name: 'Charger LED mode',
1047
+ type: 'number',
1048
+ role: 'value',
1049
+ read: true,
1050
+ write: false,
1051
+ },
1052
+ native: {},
1053
+ });
1054
+
882
1055
  //"lifetimeEnergy": 0,
883
1056
  await this.setObjectNotExistsAsync(charger.id + '.status.lifetimeEnergy', {
884
1057
  type: 'state',
@@ -1165,6 +1338,34 @@ class Easee extends utils.Adapter {
1165
1338
  });
1166
1339
  this.subscribeStates(charger.id + '.config.ledStripBrightness');
1167
1340
 
1341
+ //"smartCharging": true,
1342
+ await this.setObjectNotExistsAsync(charger.id + '.config.smartCharging', {
1343
+ type: 'state',
1344
+ common: {
1345
+ name: 'Smart charging state enabled by capacitive touch button',
1346
+ type: 'boolean',
1347
+ role: 'value',
1348
+ read: true,
1349
+ write: true,
1350
+ },
1351
+ native: {},
1352
+ });
1353
+ this.subscribeStates(charger.id + '.config.smartCharging');
1354
+
1355
+ //smartButtonEnabled
1356
+ await this.setObjectNotExistsAsync(charger.id + '.config.smartButtonEnabled', {
1357
+ type: 'state',
1358
+ common: {
1359
+ name: 'Smart Button Enabled/Disabled',
1360
+ type: 'boolean',
1361
+ role: 'indicator.state',
1362
+ read: true,
1363
+ write: true,
1364
+ },
1365
+ native: {},
1366
+ });
1367
+ this.subscribeStates(charger.id + '.config.smartButtonEnabled');
1368
+
1168
1369
  //wiFiSSID
1169
1370
  await this.setObjectNotExistsAsync(charger.id + '.config.wiFiSSID', {
1170
1371
  type: 'state',
@@ -1179,6 +1380,7 @@ class Easee extends utils.Adapter {
1179
1380
  });
1180
1381
  this.subscribeStates(charger.id + '.config.wiFiSSID');
1181
1382
 
1383
+
1182
1384
  }
1183
1385
  }
1184
1386
 
@@ -1194,6 +1396,3 @@ if (module.parent) {
1194
1396
  new Easee();
1195
1397
  }
1196
1398
 
1197
-
1198
-
1199
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.easee",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "Adapter to connect Easee Wallbox",
5
5
  "author": {
6
6
  "name": "Jens Nachtigal",
@@ -21,7 +21,7 @@
21
21
  "axios": "^0.21.1"
22
22
  },
23
23
  "devDependencies": {
24
- "@iobroker/testing": "^2.5.2",
24
+ "@iobroker/testing": "^2.5.4",
25
25
  "@types/chai": "^4.2.14",
26
26
  "@types/chai-as-promised": "^7.1.3",
27
27
  "@types/gulp": "^4.0.8",