iobroker.bmw 2.5.1 → 2.5.2
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/io-package.json +4 -1
- package/lib/extractKeys.js +1 -1
- package/main.js +7 -1
- package/package.json +58 -59
package/io-package.json
CHANGED
package/lib/extractKeys.js
CHANGED
|
@@ -324,7 +324,7 @@ const description = {
|
|
|
324
324
|
cbsType: "Service Art",
|
|
325
325
|
VEHICLE_CHECK: "Fahrzeug Überprüfung",
|
|
326
326
|
position: "Position",
|
|
327
|
-
heading: "
|
|
327
|
+
heading: "Richtung",
|
|
328
328
|
lat: "Latitude",
|
|
329
329
|
lon: "Longitude",
|
|
330
330
|
DCS_CCH_Activation: "DCS CCH Aktivierung",
|
package/main.js
CHANGED
|
@@ -56,7 +56,7 @@ class Bmw extends utils.Adapter {
|
|
|
56
56
|
}
|
|
57
57
|
await this.login();
|
|
58
58
|
if (this.session.access_token) {
|
|
59
|
-
await this.getVehicles();
|
|
59
|
+
// await this.getVehicles(); //old depracted api
|
|
60
60
|
await this.cleanObjects();
|
|
61
61
|
await this.getVehiclesv2();
|
|
62
62
|
this.updateInterval = setInterval(async () => {
|
|
@@ -102,6 +102,7 @@ class Bmw extends utils.Adapter {
|
|
|
102
102
|
return res.data;
|
|
103
103
|
})
|
|
104
104
|
.catch((error) => {
|
|
105
|
+
this.log.error("Login failed");
|
|
105
106
|
this.log.error(error);
|
|
106
107
|
if (error.response) {
|
|
107
108
|
this.log.error(JSON.stringify(error.response.data));
|
|
@@ -175,6 +176,7 @@ class Bmw extends utils.Adapter {
|
|
|
175
176
|
return res.data;
|
|
176
177
|
})
|
|
177
178
|
.catch((error) => {
|
|
179
|
+
this.log.error("Login step 3 failed");
|
|
178
180
|
this.log.error(error);
|
|
179
181
|
if (error.response) {
|
|
180
182
|
this.log.error(JSON.stringify(error.response.data));
|
|
@@ -234,6 +236,7 @@ class Bmw extends utils.Adapter {
|
|
|
234
236
|
}
|
|
235
237
|
})
|
|
236
238
|
.catch((error) => {
|
|
239
|
+
this.log.error("getVehicles failed");
|
|
237
240
|
this.log.error(error);
|
|
238
241
|
error.response && this.log.error(JSON.stringify(error.response.data));
|
|
239
242
|
});
|
|
@@ -310,6 +313,7 @@ class Bmw extends utils.Adapter {
|
|
|
310
313
|
}
|
|
311
314
|
})
|
|
312
315
|
.catch((error) => {
|
|
316
|
+
this.log.error("getvehicles v2 failed");
|
|
313
317
|
this.log.error(error);
|
|
314
318
|
});
|
|
315
319
|
}
|
|
@@ -370,6 +374,7 @@ class Bmw extends utils.Adapter {
|
|
|
370
374
|
this.nonChargingHistory[vin] = true;
|
|
371
375
|
return;
|
|
372
376
|
}
|
|
377
|
+
this.log.error("updateChargingSessionv2 failed");
|
|
373
378
|
this.log.error(element.url);
|
|
374
379
|
this.log.error(error);
|
|
375
380
|
error.response && this.log.error(JSON.stringify(error.response.data));
|
|
@@ -510,6 +515,7 @@ class Bmw extends utils.Adapter {
|
|
|
510
515
|
return res.data;
|
|
511
516
|
})
|
|
512
517
|
.catch((error) => {
|
|
518
|
+
this.log.error("Remote command failed");
|
|
513
519
|
this.log.error(error);
|
|
514
520
|
if (error.response) {
|
|
515
521
|
this.log.error(JSON.stringify(error.response.data));
|
package/package.json
CHANGED
|
@@ -1,60 +1,59 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
2
|
+
"name": "iobroker.bmw",
|
|
3
|
+
"version": "2.5.2",
|
|
4
|
+
"description": "Adapter for BMW",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "TA2k",
|
|
7
|
+
"email": "tombox2020@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/TA2k/ioBroker.bmw",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"BMW"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/TA2k/ioBroker.bmw"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@iobroker/adapter-core": "^2.6.0",
|
|
20
|
+
"axios": "^0.24.0",
|
|
21
|
+
"axios-cookiejar-support": "^1.0.1",
|
|
22
|
+
"json-bigint": "^1.0.0",
|
|
23
|
+
"qs": "^6.10.3",
|
|
24
|
+
"tough-cookie": "^4.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@iobroker/testing": "^2.5.6",
|
|
28
|
+
"@types/chai": "^4.3.0",
|
|
29
|
+
"@types/chai-as-promised": "^7.1.5",
|
|
30
|
+
"@types/gulp": "^4.0.9",
|
|
31
|
+
"@types/mocha": "^9.1.0",
|
|
32
|
+
"@types/node": "^14.18.12",
|
|
33
|
+
"@types/proxyquire": "^1.3.28",
|
|
34
|
+
"@types/sinon": "^10.0.11",
|
|
35
|
+
"@types/sinon-chai": "^3.2.8",
|
|
36
|
+
"chai": "^4.3.6",
|
|
37
|
+
"chai-as-promised": "^7.1.1",
|
|
38
|
+
"eslint": "^7.32.0",
|
|
39
|
+
"mocha": "^9.2.1",
|
|
40
|
+
"proxyquire": "^2.1.3",
|
|
41
|
+
"sinon": "^12.0.1",
|
|
42
|
+
"sinon-chai": "^3.7.0",
|
|
43
|
+
"typescript": "~4.4.4"
|
|
44
|
+
},
|
|
45
|
+
"main": "main.js",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
|
|
48
|
+
"test:package": "mocha test/package --exit",
|
|
49
|
+
"test:unit": "mocha test/unit --exit",
|
|
50
|
+
"test:integration": "mocha test/integration --exit",
|
|
51
|
+
"test": "npm run test:js && npm run test:package",
|
|
52
|
+
"check": "tsc --noEmit -p tsconfig.check.json",
|
|
53
|
+
"lint": "eslint"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/TA2k/ioBroker.bmw/issues"
|
|
57
|
+
},
|
|
58
|
+
"readmeFilename": "README.md"
|
|
59
|
+
}
|