iobroker.easee 1.0.6 → 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 +6 -0
- package/io-package.json +13 -1
- package/lib/enum.js +3 -3
- package/main.js +7 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,6 +30,12 @@ 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
|
+
|
|
33
39
|
### 1.0.5
|
|
34
40
|
* (marwin79) More Features supported and convert values to expected datatypes
|
|
35
41
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "easee",
|
|
4
|
-
"version": "1.0.
|
|
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
|
+
},
|
|
6
18
|
"1.0.6": {
|
|
7
19
|
"en": "Changed that smart charging is editable",
|
|
8
20
|
"de": "Geändert, dass Smart Charging bearbeitet werden kann",
|
package/lib/enum.js
CHANGED
|
@@ -334,6 +334,9 @@ const easeeIds = {
|
|
|
334
334
|
44: '.config.smartButtonEnabled',
|
|
335
335
|
|
|
336
336
|
48: '.config.dynamicChargerCurrent',
|
|
337
|
+
111: '.config.dynamicCircuitCurrentP1',
|
|
338
|
+
112: '.config.dynamicCircuitCurrentP2',
|
|
339
|
+
113: '.config.dynamicCircuitCurrentP3',
|
|
337
340
|
|
|
338
341
|
//Status
|
|
339
342
|
46: '.status.ledMode',
|
|
@@ -343,9 +346,6 @@ const easeeIds = {
|
|
|
343
346
|
102: '.status.smartCharging',
|
|
344
347
|
103: '.status.cableLocked',
|
|
345
348
|
109: '.status.chargerOpMode',
|
|
346
|
-
111: '.status.dynamicCircuitCurrentP1',
|
|
347
|
-
112: '.status.dynamicCircuitCurrentP2',
|
|
348
|
-
113: '.status.dynamicCircuitCurrentP3',
|
|
349
349
|
110: '.status.outputCurrent',
|
|
350
350
|
120: '.status.totalPower',
|
|
351
351
|
122: '.status.energyPerHour',
|
package/main.js
CHANGED
|
@@ -56,7 +56,7 @@ class Easee extends utils.Adapter {
|
|
|
56
56
|
} else {
|
|
57
57
|
//Value is in ioBroker, update it
|
|
58
58
|
const tmpValueId = data.mid + data_name;
|
|
59
|
-
this.log.
|
|
59
|
+
this.log.debug('New value over SignalR for: ' + tmpValueId + ', value: ' + data.value);
|
|
60
60
|
switch (data.dataType) {
|
|
61
61
|
case 2:
|
|
62
62
|
data.value = data.value == '1';
|
|
@@ -109,7 +109,6 @@ class Easee extends utils.Adapter {
|
|
|
109
109
|
this.log.error('No password set');
|
|
110
110
|
} else {
|
|
111
111
|
this.log.debug('Api login started');
|
|
112
|
-
this.log.debug('Password is:' + this.config.client_secret);
|
|
113
112
|
const login = await this.login(this.config.username, this.config.client_secret);
|
|
114
113
|
if (login) {
|
|
115
114
|
//Erstes Objekt erstellen
|
|
@@ -159,7 +158,7 @@ class Easee extends utils.Adapter {
|
|
|
159
158
|
async readAllStates() {
|
|
160
159
|
if(expireTime <= Date.now()) {
|
|
161
160
|
//Token ist expired!
|
|
162
|
-
this.log.info('Token
|
|
161
|
+
this.log.info('Token has expired - refresh');
|
|
163
162
|
await this.refreshToken();
|
|
164
163
|
}
|
|
165
164
|
|
|
@@ -179,7 +178,7 @@ class Easee extends utils.Adapter {
|
|
|
179
178
|
arrCharger.push(charger.id);
|
|
180
179
|
}
|
|
181
180
|
|
|
182
|
-
this.log.debug('Charger
|
|
181
|
+
this.log.debug('Charger found');
|
|
183
182
|
this.log.debug(JSON.stringify(charger));
|
|
184
183
|
try {
|
|
185
184
|
|
|
@@ -247,11 +246,9 @@ class Easee extends utils.Adapter {
|
|
|
247
246
|
this.log.debug('Update circuitMaxCurrent to: ' + state.val);
|
|
248
247
|
this.log.debug('Get infos from site:');
|
|
249
248
|
this.log.debug(JSON.stringify(site));
|
|
250
|
-
this.log.debug('Get infos from site:');
|
|
251
|
-
this.log.debug(JSON.stringify(site));
|
|
252
249
|
|
|
253
250
|
this.changeMaxCircuitConfig(site.id, site.circuits[0].id, state.val);
|
|
254
|
-
this.log.debug('Changes
|
|
251
|
+
this.log.debug('Changes sent to API');
|
|
255
252
|
});
|
|
256
253
|
} else if (tmpControl[4] == 'dynamicCircuitCurrentP1' || tmpControl[4] == 'dynamicCircuitCurrentP2' || tmpControl[4] == 'dynamicCircuitCurrentP3') {
|
|
257
254
|
|
|
@@ -288,7 +285,7 @@ class Easee extends utils.Adapter {
|
|
|
288
285
|
} else {
|
|
289
286
|
this.log.debug('update config to API: ' + id);
|
|
290
287
|
this.changeConfig(tmpControl[2], tmpControl[4], state.val);
|
|
291
|
-
this.log.debug('Changes
|
|
288
|
+
this.log.debug('Changes sent to API');
|
|
292
289
|
}
|
|
293
290
|
}
|
|
294
291
|
} else {
|
|
@@ -397,7 +394,7 @@ class Easee extends utils.Adapter {
|
|
|
397
394
|
async login(username, password) {
|
|
398
395
|
|
|
399
396
|
try {
|
|
400
|
-
const response = await axios.post(apiUrl + '/api/accounts/
|
|
397
|
+
const response = await axios.post(apiUrl + '/api/accounts/login', {
|
|
401
398
|
userName: username,
|
|
402
399
|
password: password
|
|
403
400
|
});
|
|
@@ -1367,6 +1364,7 @@ class Easee extends utils.Adapter {
|
|
|
1367
1364
|
},
|
|
1368
1365
|
native: {},
|
|
1369
1366
|
});
|
|
1367
|
+
this.subscribeStates(charger.id + '.config.smartButtonEnabled');
|
|
1370
1368
|
|
|
1371
1369
|
//wiFiSSID
|
|
1372
1370
|
await this.setObjectNotExistsAsync(charger.id + '.config.wiFiSSID', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.easee",
|
|
3
|
-
"version": "1.0.
|
|
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.
|
|
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",
|