|
34 | 34 | # Necessary python package for funktion "generate_code_verifier": |
35 | 35 | from authlib.common.security import generate_token |
36 | 36 |
|
37 | | -AUTHORIZE_URL = 'https://iam.viessmann.com/idp/v3/authorize' |
38 | | -TOKEN_URL = 'https://iam.viessmann.com/idp/v3/token' |
| 37 | +#AUTHORIZE_URL = 'https://iam.viessmann.com/idp/v3/authorize' |
| 38 | +AUTHORIZE_URL = 'https://iam.viessmann-climatesolutions.com/idp/v3/authorize' |
| 39 | +#TOKEN_URL = 'https://iam.viessmann.com/idp/v3/token' |
| 40 | +TOKEN_URL = 'https://iam.viessmann-climatesolutions.com/idp/v3/token' |
| 41 | +#API_URL = 'https://api.viessmann.com' |
| 42 | +API_URL = 'https://api.viessmann-climatesolutions.com' |
| 43 | + |
39 | 44 |
|
40 | 45 | class Vicare(SmartPlugin): |
41 | | - PLUGIN_VERSION = '1.9.5' |
| 46 | + PLUGIN_VERSION = '1.9.6' |
42 | 47 |
|
43 | 48 | def __init__(self, sh): |
44 | 49 | """ |
@@ -390,7 +395,9 @@ def checkErrors(self, response): |
390 | 395 |
|
391 | 396 |
|
392 | 397 | def pollInstallationId(self): |
393 | | - url = f"https://api.viessmann.com/iot/v1/equipment/installations" |
| 398 | + #old url = f"https://api.viessmann.com/iot/v1/equipment/installations" |
| 399 | + url = f"{API_URL}/iot/v1/equipment/installations" |
| 400 | + |
394 | 401 | response = self.pollUrlInterface(url) |
395 | 402 |
|
396 | 403 | if response is None: |
@@ -423,7 +430,9 @@ def pollInstallationId(self): |
423 | 430 | self.logger.info(f"InstallationId is {self.installationId}") |
424 | 431 |
|
425 | 432 | def pollSerial(self): |
426 | | - url = f"https://api.viessmann.com/iot/v1/equipment/gateways" |
| 433 | + #old url = f"https://api.viessmann.com/iot/v1/equipment/gateways" |
| 434 | + url = f"{API_URL}/iot/v1/equipment/gateways" |
| 435 | + |
427 | 436 | response = self.pollUrlInterface(url) |
428 | 437 |
|
429 | 438 | if response is None: |
@@ -457,7 +466,9 @@ def pollDevices(self): |
457 | 466 | self.logger.debug(f"pollSerial, invalid installationId, aborting!") |
458 | 467 | return |
459 | 468 |
|
460 | | - url = f"https://api.viessmann.com/iot/v1/equipment/installations/{self.installationId}/gateways/{self.gatewaySerial}/devices" |
| 469 | + #old url = f"https://api.viessmann.com/iot/v1/equipment/installations/{self.installationId}/gateways/{self.gatewaySerial}/devices" |
| 470 | + url = f"{API_URL}/iot/v1/equipment/installations/{self.installationId}/gateways/{self.gatewaySerial}/devices" |
| 471 | + |
461 | 472 | response = self.pollUrlInterface(url) |
462 | 473 |
|
463 | 474 | if response is None: |
@@ -538,7 +549,9 @@ def pollFeatures(self): |
538 | 549 | self.logger.debug(f"pollFeatures, invalid deviceId, aborting!") |
539 | 550 | return |
540 | 551 |
|
541 | | - url = f"https://api.viessmann.com/iot/v2/features/installations/{self.installationId}/gateways/{self.gatewaySerial}/devices/{self.deviceId}/features" |
| 552 | + #old url = f"https://api.viessmann.com/iot/v2/features/installations/{self.installationId}/gateways/{self.gatewaySerial}/devices/{self.deviceId}/features" |
| 553 | + url = f"{API_URL}/iot/v2/features/installations/{self.installationId}/gateways/{self.gatewaySerial}/devices/{self.deviceId}/features" |
| 554 | + |
542 | 555 | response = self.pollUrlInterface(url) |
543 | 556 | if response is None: |
544 | 557 | return |
|
0 commit comments