openviess / PyViCare

Python Library to access Viessmann ViCare API
Apache License 2.0
140 stars 91 forks source link

Adapt to dhw api change effective in January 2023 #285

Open woehrl01 opened 2 years ago

woehrl01 commented 2 years ago

Important adjustment in IoT features: Split heating circuits and domestic hot water In our API we have coupled heating circuits (HC) and domestic hot water (DHW) support closely together to keep the backwards compatibility between Legacy devices and devices based on our Viessmann One Base control platform, also called E3. Viessmann One Base provides the HCs and DHW as independent systems with a chance to access HC- and DHW-features as independent features.

What is being adjusted?

The planned adjustments brings the following changes to our IoT features:

adjust heating.circuits.N.operating.modes. by removing existent DHW dependencies remove heating.circuits.N.operating.modes.dhw operating modes adjust heating.circuits.N.operating.modes.active to only show the following states for the “value” property: auto, heating, cooling, heatingCooling or testMode The DHW operating can in future be requested through the following new features:

introduce heating.dhw.operating.modes.off >> Shows whether the DHW is off adjust heating.dhw.operating.modes.active >> Shows the current DHW operating mode with the possible states for the “value” property: balanced, comfort, eco, off This change only affects our Viessmann One Base (E3) control platform (wifi integrated devices). For legacy devices, i.e. using a Vitoconnect, there are no changes. However, this also means, depending on the device, requesting and changing the DHW operating mode differs.

This will be likely a breaking change for API. We need to investigate how this can be hidden for consumers. This is also the first time we have to use different endpoints based on the sub type.

oischinger commented 1 year ago

Having different endpoints based on the sub type is gonna be a challenge. I guess we will have to check dynamically which endpoint is available. Otherwise we would need to maintain a device type/supported endpoints list :(

woehrl01 commented 1 year ago

I just saw today, that I already made the roles available inside the service class. So this should be easier to implement then I expected.

BrechtMo commented 1 year ago

I'm having issues controlling my vitodens since this afternoon using Home Assistant. Perhaps related?

/usr/src/homeassistant/homeassistant/components/vicare/climate.py", line 370, in set_vicare_mode
    raise ValueError(f"Cannot set invalid vicare mode: {vicare_mode}.")
ValueError: Cannot set invalid vicare mode: dhwAndHeating.

This used to work without issue.

oischinger commented 1 year ago

Seems like the API was finally broken by Viessmann. See above HA Core issue.

phipz commented 1 year ago

Can confirm the same issue for Vitodens 100. However, "vicare.set_vicare_mode" to "off" and "heating" still works. Cannot see or change water on/off anymore.

Nice side effect: Changing the current target temperature finally works from home assistant (didn't work before the API change)... Weird.

adorobis commented 1 year ago

Vitodens 200-W (2008 model) here and all modes still work ok. Is that something that is a rolling change or not impacting all devices? Edit: I've just read the change log and it won't affect the "legacy" devices: This change only affects our Viessmann One Base (E3) control platform (wifi integrated devices). For legacy devices, i.e. using a Vitoconnect, there are no changes. However, this also means, depending on the device, requesting and changing the DHW operating mode differs.

gras55 commented 1 year ago

Do we have any updates when this will be fixed for newer models?

gras55 commented 1 year ago

As of today the hot water is still unable to be controlled from Home Assistant!