Viessmann ViCare - Add Eco / Comfort modes

The Viessmann integration does not show some of the sensors. For example, the diagnostics feature shows this:

            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.active",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "value": {
                "type": "string",
                "value": "balanced"
              }
            },
            "timestamp": "2024-09-23T10:42:35.347Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.active"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.balanced",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "active": {
                "type": "boolean",
                "value": true
              }
            },
            "timestamp": "2024-09-23T10:42:35.347Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.balanced"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.comfort",
            "gatewayId": "################",
            "isEnabled": false,
            "isReady": true,
            "properties": {},
            "timestamp": "2024-09-23T10:42:35.347Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.comfort"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.eco",
            "gatewayId": "################",
            "isEnabled": false,
            "isReady": true,
            "properties": {},
            "timestamp": "2024-09-23T10:42:35.347Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.eco"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.off",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "active": {
                "type": "boolean",
                "value": false
              }
            },
            "timestamp": "2024-09-23T10:42:35.347Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.off"
          },

If I’m not wrong this implies the DHW can be in balanced / comfort / eco / off modes.
I don’t know exactly de difference between comfort and eco, but the eco mode, in my Viessmann Vitodens 050-W, disables the preheat of the circuit (that let’s the water be hot sooner).
I think it’s an important feature to know / disable (if possible) when we are away, to not waste energy if out of home, sleeping, etc.
I can’t see a way to enable this in the actual integration, so I suppose it’s missing @Hafenstrand can you confirm my finding? Do you think we can enable this feature at some point?

Thanks!

To give more information… the above json is what I have when I have “OpenTherm” protocol enabled. If I change the protocol to on/off, then it’s slighty different:

        "data": [
          {
            "apiVersion": 1,
            "commands": {
              "setMode": {
                "isExecutable": true,
                "name": "setMode",
                "params": {
                  "mode": {
                    "constraints": {
                      "enum": [
                        "comfort",
                        "eco",
                        "off"
                      ]
                    },
                    "required": true,
                    "type": "string"
                  }
                },
                "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.active/commands/setMode"
              }
            },
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.active",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "value": {
                "type": "string",
                "value": "eco"
              }
            },
            "timestamp": "2024-09-25T09:33:52.387Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.active"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.balanced",
            "gatewayId": "################",
            "isEnabled": false,
            "isReady": true,
            "properties": {},
            "timestamp": "2024-09-25T09:33:26.471Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.balanced"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.comfort",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "active": {
                "type": "boolean",
                "value": false
              }
            },
            "timestamp": "2024-09-25T09:33:52.387Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.comfort"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.eco",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "active": {
                "type": "boolean",
                "value": true
              }
            },
            "timestamp": "2024-09-25T09:33:52.387Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.eco"
          },
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "heating.dhw.operating.modes.off",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "active": {
                "type": "boolean",
                "value": false
              }
            },
            "timestamp": "2024-09-25T09:33:26.471Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.off"
          },

As you can see, now only comfort / eco / off modes are available.

  • comfort: the DHW has the preheat ON.
  • eco: the DHW has the preheat OFF.
  • off: the DGW is totally OFF (no hot water).

Looking at the first log, it’s missing the “execute” part:

       "data": [
          {
            "apiVersion": 1,
            "commands": {
              "setMode": {
                "isExecutable": true,
                "name": "setMode",
                "params": {
                  "mode": {
                    "constraints": {
                      "enum": [
                        "balanced",
                        "off"
                      ]
                    },
                    "required": true,
                    "type": "string"
                  }
                },
                "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.operating.modes.active/commands/setMode"
              }
            },

Looking at this, it seems only balanced and off are available.

Hey

What do you mean be “I have “OpenTherm” protocol enabled”? Where do you do this?

My boiler has the option to work in different ways. I can config it to use a thermostat with OpenTherm protocol, or a thermostat with the habitual ON/OFF. To do this, I need to wire the thermostat to a different place, an config it using a menu.
The first capture is what I obtain with OpenTherm enabled, the second one with ON/OFF. I have a Tado thermostat that can be used in both ways.

In both cases, the DHW entity in Home Assistant seems to have the modes missing, or at least I can’t modify it from Home Assistant. When in OpenTherm is more or less expected, because the thermostat is the only one able to make changes and the boiler ignores external commands, but in ON/OFF the modes must appear. I can’t change the mode or the temperature from Home Assistant.

Looking at this again, my first message is very wrong, it seems the problem is not that some sensors are missing. It’s that the water_heater sensor of the boiler can’t change the mode, and what I thought it was a missing sensor, in reality, was a water_heater sensor.

I will try to explain:
I have a gas boiler, for heating and for DHW. The DHW part generates a water_heater sensor in home assistant, but it does not define the modes that can be used, so it is not shown right in the UI and it can’t be used from Home Assistant.
Looking at the ViCare documentation: Viessmann ViCare - Home Assistant it says that the modes can’t be modified for the water heater sensor because it interferes with the heating part. I think this is not right, at least for my boiler. It has different “methods” in the Viessmann API and the heating modes are independent of the DHW modes.
It seems that before, or for some devices, this was right, I don’t know if now it’s true or not, but not for my boiler and I suppose than others.

EDIT: I think this thread is related Viessmann Climate Solutions Community - Viessmann Climate Solutions Community on it explains the change in the modes.

Looking again at this, it seems that the method to work with the “new” DHW modes exist in the PyViCare library:

but I can’t find where it gets the available modes. Sorry, my knowledge in python it’s very basic, maybe it’s there, but I can’t find it.

I worked out how to do this using curl on the cli.
To turn on hot water “comfort” mode do this:

curl -H "${AUTH}" -X POST "https://api.viessmann.com/iot/v2/features/gateways/XXXXX/devices/0/features/heating.dhw.operating.modes.active/commands/setMode" \
  --header 'content-type: application/json' \
  --data "{\"mode\": \"comfort\" }"

and instead of “comfort” you can also use “eco”. Those are the two modes.

and to get the current value:

curl -H "${AUTH}" -X GET  "https://api.viessmann.com/iot/v2/features/gateways/XXXXX/devices/0/features/heating.dhw.operating.modes.active"

Now. I am willing to try to get this into the integration, but tbh I have no idea where to start! I took me long enough to work out how to use the API with curl, let alone with python.

I have been looking at PyVicare Python library and whilst there is a function called “setDomesticHotWaterOperatingMode” which you can use to set the modes to ‘eco’ or ‘comfort’, it doesn’t look like there is a function to get the current setting.
So there is no “getDomesticHotWaterOperatingMode” for example.