Skip to content

Commit 67c11df

Browse files
committed
0.7.1
1 parent f574178 commit 67c11df

File tree

4 files changed

+43
-9
lines changed

4 files changed

+43
-9
lines changed

io-package.json

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
{
22
"common": {
33
"name": "vaillant",
4-
"version": "0.7.0",
4+
"version": "0.7.1",
55
"news": {
6+
"0.7.1": {
7+
"en": "Fix for status fetching",
8+
"de": "Fix für Statusabfrage",
9+
"ru": "Исправление для получения статуса",
10+
"pt": "Correção para busca de status",
11+
"nl": "Fix voor status ophalen",
12+
"fr": "Correction pour la récupération de l'état",
13+
"it": "Correzione per il recupero dello stato",
14+
"es": "Corrección para la obtención de estado",
15+
"pl": "Poprawka dla pobierania statusu",
16+
"uk": "Виправлення для отримання статусу",
17+
"zh-cn": "状态获取修复"
18+
},
619
"0.7.0": {
720
"en": "The statistics structure have been changed. Please adopt your vis and script to the new stats structure. Added room support",
821
"de": "Die Statistikstruktur wurde geändert. Bitte passen Sie Ihr Vis und Skript an die neue Statistikstruktur an. Raumunterstützung hinzugefügt",

main.js

+26-5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Vaillant extends utils.Adapter {
3030
this.on("unload", this.onUnload.bind(this));
3131
this.session = {};
3232
this.deviceArray = [];
33+
this.disabledRooms = [];
3334
this.json2iob = new Json2iob(this);
3435
this.cookieJar = new tough.CookieJar();
3536
this.requestClient = axios.create({
@@ -280,7 +281,7 @@ class Vaillant extends utils.Adapter {
280281
"Accept-Language": "de-de",
281282
"x-client-locale": "de-DE",
282283
"x-idm-identifier": "KEYCLOAK",
283-
"User-Agent": "myVAILLANT/13324 CFNetwork/1240.0.4 Darwin/20.6.0",
284+
"User-Agent": "myVAILLANT/21469 CFNetwork/1410.1 Darwin/22.6.0",
284285
"Content-Type": "application/x-www-form-urlencoded",
285286
},
286287
data: qs.stringify({
@@ -411,7 +412,7 @@ class Vaillant extends utils.Adapter {
411412
"x-client-locale": "de-DE",
412413
"x-idm-identifier": "KEYCLOAK",
413414
"ocp-apim-subscription-key": "1e0a2f3511fb4c5bbb1c7f9fedd20b1c",
414-
"User-Agent": "myVAILLANT/13324 CFNetwork/1240.0.4 Darwin/20.6.0",
415+
"User-Agent": "myVAILLANT/21469 CFNetwork/1410.1 Darwin/22.6.0",
415416
},
416417
})
417418
.then(async (res) => {
@@ -540,6 +541,13 @@ class Vaillant extends utils.Adapter {
540541

541542
const headers = {
542543
Authorization: "Bearer " + this.session.access_token,
544+
"x-app-identifier": "VAILLANT",
545+
"Accept-Language": "de-de",
546+
Accept: "application/json, text/plain, */*",
547+
"x-client-locale": "de-DE",
548+
"x-idm-identifier": "KEYCLOAK",
549+
"ocp-apim-subscription-key": "1e0a2f3511fb4c5bbb1c7f9fedd20b1c",
550+
"User-Agent": "myVAILLANT/21469 CFNetwork/1410.1 Darwin/22.6.0",
543551
};
544552
if (this.etags[url]) {
545553
headers["If-None-Match"] = this.etags[url];
@@ -575,9 +583,19 @@ class Vaillant extends utils.Adapter {
575583
}
576584
async updateMyvRooms() {
577585
for (const device of this.deviceArray) {
586+
if (this.disabledRooms.includes(device.systemId)) {
587+
continue;
588+
}
578589
const url = `https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/api/v1/ambisense/facilities/${device.systemId}/rooms`;
579590
const headers = {
580591
Authorization: "Bearer " + this.session.access_token,
592+
"x-app-identifier": "VAILLANT",
593+
"Accept-Language": "de-de",
594+
Accept: "application/json, text/plain, */*",
595+
"x-client-locale": "de-DE",
596+
"x-idm-identifier": "KEYCLOAK",
597+
"ocp-apim-subscription-key": "1e0a2f3511fb4c5bbb1c7f9fedd20b1c",
598+
"User-Agent": "myVAILLANT/21469 CFNetwork/1410.1 Darwin/22.6.0",
581599
};
582600
if (this.etags[url]) {
583601
headers["If-None-Match"] = this.etags[url];
@@ -605,9 +623,12 @@ class Vaillant extends utils.Adapter {
605623
this.log.debug("No changes for " + url);
606624
return;
607625
}
608-
this.log.error("Failed to get status for " + device.systemId);
626+
627+
this.log.error("Failed to get room status for " + device.systemId);
609628
this.log.error(error);
610629
error.response && this.log.error(JSON.stringify(error.response.data));
630+
this.log.info("Stop fetching of rooms until restart");
631+
this.disabledRooms.push(device.systemId);
611632
});
612633
}
613634
}
@@ -647,7 +668,7 @@ class Vaillant extends utils.Adapter {
647668
"x-client-locale": "de-DE",
648669
"x-idm-identifier": "KEYCLOAK",
649670
"ocp-apim-subscription-key": "1e0a2f3511fb4c5bbb1c7f9fedd20b1c",
650-
"User-Agent": "myVAILLANT/13324 CFNetwork/1240.0.4 Darwin/20.6.0",
671+
"User-Agent": "myVAILLANT/21469 CFNetwork/1410.1 Darwin/22.6.0",
651672
},
652673
})
653674
.then(async (res) => {
@@ -708,7 +729,7 @@ class Vaillant extends utils.Adapter {
708729
"x-client-locale": "de-DE",
709730
"x-idm-identifier": "KEYCLOAK",
710731
"ocp-apim-subscription-key": "1e0a2f3511fb4c5bbb1c7f9fedd20b1c",
711-
"User-Agent": "myVAILLANT/13324 CFNetwork/1240.0.4 Darwin/20.6.0",
732+
"User-Agent": "myVAILLANT/21469 CFNetwork/1410.1 Darwin/22.6.0",
712733
},
713734
})
714735
.then(async (res) => {

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@
4747
"test:package": "mocha test/package --exit",
4848
"test:unit": "mocha test/unit --exit"
4949
},
50-
"version": "0.7.0"
50+
"version": "0.7.1"
5151
}

0 commit comments

Comments
 (0)