Viessmann Component

@oischinger May I ask a direct question:
I searching a way to not only get the power consumtion of my heatpump (Vitocal-A250), I also like to know the production eg. 20kWh consumtion results in 80kWh of gas heating. Or acutual electric power 750W resutls in 3,4kWh heating power.

The Viessmann mobile app provide this data, also i seaching the API calls and found somthing maybe for fuelcell / heatpump? BUT it’s marked “advanced”.

In the official repo in “sensors.py” I found entries like this:

    ViCareSensorEntityDescription(
        key="power_production_today",
        name="Energy production today",
        native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
        value_getter=lambda api: api.getPowerProductionToday(),
        device_class=SensorDeviceClass.ENERGY,
        state_class=SensorStateClass.TOTAL_INCREASING,

I upgraded to ViCare Plus (testing 30 Days trail) but still get no additional entities in my integration.

As Creator of the inofficial intigration, you may have a better understanding why this is not working and not available.

I would like to set the schedule for my circulation pump using PyViCare. I noticed that a method has already been implemented: https://github.com/somm15/PyViCare/blob/8ba411483a865e074d1146fd1b8b7a8c4f4be122/PyViCare/PyViCareHeatingDevice.py#L286

How can I expose this method as Home Assistant service?

Thanks in advance!

Hi there,
I am trying to control my 200A heatpump with home assistant and nodered. Struggling changing the preset_modes, always get an API error. Does anybody know what might be wrong at my side.
Thanks JJ

I have the same situation for 200W gas boiler. Those modes are listed as available but cannot be activated via the API. You can check which features are really available for your system.
Btw, are you receiving any error message when trying to activate those preset_modes?
You can also follow instructions on this git repo to get entire scope of what’s available for your device: GitHub - somm15/PyViCare: Python Library to access Viessmann ViCare API The result of the step 3 will show you all available data and active features.

You would need to implement a respective service in the vicare integration and submit a PR.
You can have a look at this PR: Add set_heating_curve service by adorobis · Pull Request #117 · oischinger/ha_vicare · GitHub in which I’ve implemented a service to set heating curve. Yours will be a bit more complicated though :slight_smile:
Edit:
Btw, I’ve found it quite easy to manage schedule via the ViCare app so not bothered to implement it in the HA integration.

Hope it’s fine if I crosspost it here. Was curious if anyone has any success with getting rid of cloud on their Viessmann boilers: community.home-assistant.io/t/controlling-viessmann-vitodens-gas-heater-boilers-locally-100w-111w-200w

I might be willing to sponsor such development.

Regarding getting rid of the cloud : If you have a new device there is an awesome project utilizing the can bus.

Info in German forum:

Source code:

I have it running on Vitocal 250a an works great.

Cheers
SanMiggel

3 Likes

And for the devices running the optolink interface there is already a solution on esphome. In PR stage at the moment but should be soon added as official integration:

Works great, super reliable for me.

3 Likes

adorobis, I found such information:

  • Use above data to replace {installationId}, {gatewaySerial} and {deviceId} in this URL to investigate the Viessmann API:https://api.viessmann.com/iot/v1/features/installations/{installationId}/gateways/{gatewaySerial}/devices/{deviceId}/features

And then I used this link:

https://api.viessmann.com/iot/v1/equipment/installations?includeGateways=true

But there is no deviceId. .
installationId and gatewaySerial are OK.

So if there is no deviceId, I can’t use this address:
https://api.viessmann.com/iot/v1/features/installations/{installationId}/gateways/{gatewaySerial}/devices/{deviceId}/features

What type of device do you have? Does it show up when adding the integration to HA?

Hello,
Of course, the integration is fully working in HA. It shows 58 entities.
It is a Vitodens 200 B2HF, gas boiler, Polish market.


You can try to find the device id here, either in the diagnostic data from the integration or in the /.config/ files. Not sure if it is stored there though.

Could it be that deviceId is zero?

"data": [
      {
        "data": [
          {
            "apiVersion": 1,
            "commands": {},
            "deviceId": "0",
            "feature": "device.serial",
            "gatewayId": "################",
            "isEnabled": true,
            "isReady": true,
            "properties": {
              "value": {
                "type": "string",
                "value": "################"
              }
            },
            "timestamp": "2024-01-21T08:41:43.664Z",
            "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/device.serial"
          },

Unfortunately, when I try deviceId=0 I get this:

{
    "viErrorId": "|00-af399487d8bb4f2bb873d5a67d7a32fa-e4775c389ea548ee-01.62609e26_",
    "errorType": "EVEREST_ERROR",
    "message": "",
    "extendedPayload": {
        "code": "404",
        "reason": "Client does not exist"
    }
}

I’ve just checked and for my heater the deviceId is 0 as well so this is normal.
Have you authenticated properly first? Is it in Postman or you do it in a different way?

OK, so perhaps I have not been authenticated properly. Thank you.
I just logged in here:
Developer Portal (viessmann.com)
And then I entered the required address in my browser:
https://api.viessmann.com/iot/v1/features/installations/{installationId}/gateways/{gatewaySerial}/devices/{deviceId}/features
This is probably wrong?
How to send my credentials correctly?

Do I need another token for that? Or the one used for HA integration can be used?

I just wanted to make sure.
Is this statement correct?
Since using HA I have limited my use of ViCare app to save on my limit. But perhaps unnecessarily?

Ah, no, this won’t work. You have to use a Postman (a desktop app) - the instructions are on the vicare repo. Or you can also use a python program. Whichever would be easier for you. Postman is pretty simple.

Thanks.
Should I generate a new token, in addition to the one I already have for PyViCare, for use in Postman?

The same token should work.