home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.3k stars 30.61k forks source link

Viessmann ViCare Integration Not Showing All Entities #126447

Open dubinsky opened 1 month ago

dubinsky commented 1 month ago

The problem

I can change the water temperature using ViCare application, but in Home Assistant, the entities to do that are missing.

I suspect that the problem is similar to https://github.com/home-assistant/core/issues/122056 and that E3_TCU19_x05 should also be added to the UNSUPPORTED_DEVICES list...

What do you think @CFenner?

Thanks!

What version of Home Assistant Core has the issue?

core-2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ViCare

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vicare

Diagnostics information

vicare-log.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @cfenner, mind taking a look at this issue as it has been labeled with an integration (vicare) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `vicare` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign vicare` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vicare documentation vicare source (message by IssueLinks)

CFenner commented 1 month ago

Can you share the diagnostics file, please.

CFenner commented 1 month ago

We should add the E3 as a gateway directly here: https://github.com/openviess/PyViCare/blob/eb6ac51c0fe588db923265f7deec37f955964504/PyViCare/PyViCareDeviceConfig.py#L87C14-L87C28

Therefore it would be interesting to see the output of the gateway features api call. But that you would need to do with the terminal.

Looks like your device has no circuits, which is as far as I know unusual. The dhw control uses the circuits to access the mode (which is no really necessary / up to date anymore). Therefore creating the entity probably fails.

dubinsky commented 1 month ago

Can you share the diagnostics file, please.

This?

config_entry-vicare-90d30cd8c3c26777f1b744ca03bfe845 (1).json

dubinsky commented 1 month ago

it would be interesting to see the output of the gateway features api call. But that you would need to do with the terminal.

curl -X GET --url https://api.viessmann.com/iot/v2/features/installations/2547267/gateways/7633301003392224/features returns:

features.json

platini76 commented 1 month ago

I have the same problem, my entity for pressure won't appear. what do you suggest?

CFenner commented 1 month ago

@dubinsky I added some dhw storage sensors with https://github.com/home-assistant/core/pull/126570/files they will be in the 2024.11 release.

Just to be sure, in the diagnostic file above there is one empty dataset. Can you verify that the devices feature are actually returning something:

curl -X GET --url https://api.viessmann.com/iot/v2/features/installations/2547267/gateways/7633301003392224/devices/0/features
CFenner commented 1 month ago

@platini76 please have a look at the api docs, I think pressure is a paid feature. Anything else that you miss?

Bildschirmfoto 2024-10-01 um 07 45 02
dubinsky commented 1 month ago

@CFenner

Can you verify that the devices feature are actually returning something:

curl -X GET --url https://api.viessmann.com/iot/v2/features/installations/2547267/gateways/7633301003392224/devices/0/features

returned device-features.json

dubinsky commented 1 month ago

@CFenner

I added some dhw storage sensors with https://github.com/home-assistant/core/pull/126570/files

Will this make it possible to change the DHW temperature?

Thank you!

McGiverGim commented 1 month ago

I added some dhw storage sensors with https://github.com/home-assistant/core/pull/126570/files

I'm not too sure if this is the "correct" way to add the sensor. In my Viessmann Vitocare 050-W, the integration adds a ´water_heater´ sensor, but it does not work as water heater because it only has the current_temperature attribute, but not the "configured" one, the list of operations, etc. Maybe this temperature must be added as target_temperature here https://developers.home-assistant.io/docs/core/entity/water-heater/

@CFenner can you see it you can add the missing attributes to the water heater entity?

CFenner commented 1 month ago

@dubinsky you probably have no control over the water heater because your device has no circuits.

Fortunately, this coupling is no longer necessary.

November 2022

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.

I will have a look if we can distinguish the water heater handling for legacy and e3 devices.

CFenner commented 1 month ago

@McGiverGim target and current temp are set in the water heater entity.

https://github.com/home-assistant/core/blob/0fde5c21b7ddf73c3c10a108d3c6a66d141e6fea/homeassistant/components/vicare/water_heater.py#L125-L133

McGiverGim commented 1 month ago

@CFenner then something seems not to be working, this is the state of my water heater: image

As you can see, there is a temperature (with null value), but not a target_temperature.

This remembers me the other issue, where the device_class is not being populated. I don't know if maybe they are related.

CFenner commented 1 month ago

Just had a look at the library, there is a complex logic behind the getDomesticHotWaterDesiredTemperature. It checks the schedule and from that derives the mode, depending on the mode a target temp is set or not. So you probably can only change the target temp if the schedule says the dhw should be on.

We probably need to overhaul that..

McGiverGim commented 1 month ago

Yes, it has not too much sense at least in my case. My boiler has not any schedule, and the water temp is configured from there.

This are the only "options" I have, comfort, eco or off modes

        "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"
              }
            },

and set the temperature:

            "apiVersion": 1,
            "commands": {
              "setTargetTemperature": {
                "isExecutable": true,
                "name": "setTargetTemperature",
                "params": {
                  "temperature": {
                    "constraints": {
                      "efficientLowerBorder": 30,
                      "efficientUpperBorder": 60,
                      "max": 60,
                      "min": 30,
                      "stepping": 1
                    },
                    "required": true,
                    "type": "number"
                  }
                },
                "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/heating.dhw.temperature.main/commands/setTargetTemperature"
              }
            },

This second one is working if I use the "new sensor" added in this version, so only the "modes" is missing and the integration of all in the water_heater.

dubinsky commented 3 weeks ago

@CFenner

I will have a look if we can distinguish the water heater handling for legacy and e3 devices.

Thank you!

McGiverGim commented 3 weeks ago

In the changelog, https://documentation.viessmann.com/static/changelog in November 2022, says how to detect the base.