diff --git a/admin/index_m.html b/admin/index_m.html index 53dec1f..1308e1a 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -70,7 +70,11 @@
- Visit https://app.developer.viessmann.com and create a new client.

+ Visit + https://app.developer.viessmann.com + and create a new client.

Name: iobroker
Google reCAPTCHA deaktivieren
Redirect URI: http://localhost:4200/
@@ -111,6 +115,13 @@
+ +
+
+ + +
+
diff --git a/io-package.json b/io-package.json index df665c5..ca3de4d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,9 @@ { "common": { "name": "viessmannapi", - "version": "2.1.0", + "version": "2.1.1", "news": { - "2.1.0": { + "2.1.1": { "en": "update to new api endpoint", "de": "Update auf neue API Endpunkte" }, @@ -105,7 +105,8 @@ "password": "", "client_id": "", "interval": 5, - "eventInterval": 300 + "eventInterval": 300, + "gatewayIndex": 1 }, "objects": [], "instanceObjects": [ diff --git a/main.js b/main.js index 659071a..6e5a38f 100644 --- a/main.js +++ b/main.js @@ -243,9 +243,16 @@ class Viessmannapi extends utils.Adapter { installation.gateways = installation.gateways.filter((gateway) => { return gateway.aggregatedStatus !== "Offline"; }); - this.log.info("Found " + installation.gateways.length + " online gateways select first gateway."); + this.log.warn( + "Found " + + installation.gateways.length + + " online gateways select " + + this.config.gatewayIndex + + " gateway.", + ); } - for (const device of installation.gateways[0].devices) { + const gateway = installation.gateways[this.config.gatewayIndex - 1]; + for (const device of gateway.devices) { await this.setObjectNotExistsAsync(installationId + "." + device.id, { type: "device", common: {