Viessmann Component

Alright, I managed to get it working :partying_face:

I updated to your latest version, deleted all old ā€œvicareā€ entities that were still present and did a reboot. The integration was not autodetected (or I wasnā€™t waiting too long), but I could select it under ā€œIntegrationsā€.

Also, the detection of the two circuits worked perfectly :slight_smile:

The only thing that is now missing is the power production part of the fuel cell. No entities were created for those.

Thank you, @oischinger, for the work you put into this!

Am I right that currently there is only one entity

type: thermostat
entity: climate.vicare_heating

And there is no way to command heating circuits separately?

Currently multiple circuits are only created for sensors. I guess we should do that for climate and water heater as well.
Would you expect that for your installation to have 2 climate entities?

I believe Viessmann supports up to 3 heating circuits but I have two. Having ability to turn them on and off would be enough. Additionally, for me personally it would be great if I could manipulate heating curves as well.
Iā€™ve been trying to add some features by myself several times but constant lack of time effectively holds me back. I will keep trying, meanwhile I definitely volunteer to test whatever you implement.

is water_heater.set_temperature working in this newer custom version ?

yes it is. Uses latest PyViCare

1 Like

Hi to all.
Iā€™ve just installed HA ver. 2021.9.0.
Is it possible to integrate Viesmann component on new gas panel of HA?
Actually, iā€™ve no entity to do this.
Please, let me know.
Regards,

Alessandro

Not yet but Iā€™m working on it. Sorry for the slow progress.

1 Like

I just ran a ā€œCheck Home Assistant configurationā€ against 2021.9.0, and it threw an error for ViCare :

Testing configuration at /tmp/config
Failed config
  homeassistant.packages.hvac.vicare: 
    - Package hvac setup failed. Component vicare No module named 'pkce'

this is the success-window shown by the config-flow branch.
image

Looks a bit strange, no ? The the unit is a Vitodens 222w.

Hi everyone,
I am one of the users of the ViCare integration who went through the shutdown by Viessmann on 15-07-2021. Prior that date, everthying was working fine, now I am experiencing some issues.

Home Assistant Version: core-2021.9.2
Python Version: 3.8.6

Let me mention that I have followed the guide at Viessmann ViCare - Home Assistant and obtained a OAuth client at https://developer.viessmann.com/en/clients.

Then I have updated my configuration in ā€œconfiguration.yamlā€ as follows:

vicare:
   username: *my registration email*
   password: *my password*
   client_id: *my client ID*[/u]

It seems everything is set up properly. Nonetheless, I cannot get the integration back to work again, and I receive this error from the logs (No module named ā€˜pkceā€™):

vicare_error

Any ideas what I could try?
Thanks!

I had the same issue.
Switching to the ViCare custom-component config-flow branch (instead of the integrated official version) has solved this for me.
oischinger/ha_vicare at config_flow (github.com)

Thanks @Tommmii - I noticed you had the same issues with PKCE.
Iā€™ll give custom-component a shot.

Since I couldnā€™t make it with custom-component, I tried installing PKCE in Home Assistant environment.
This is what worked for me:

sudo systemctl stop home-assistant@homeassistant
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install pkce
exit
sudo systemctl start home-assistant@homeassistant

After rebooting, Viessmann ViCare official integration is working again for me.

1 Like

Hi @Tommmii
concerning your strangely named device: What you are seeing is the model of the device which I retrieve via PyVicare getModel(). No idea why Viessmann uses these strange model names internally which differ from the official models.
I have a Vitodens 300W and getModel() returns VScotHO1_200.
It seems the mapping of these names is defined here: UnterstĆ¼tzte GerƤte

1 Like

@ddokupil I just updated https://github.com/oischinger/ha_vicare/pull/43 and you should be seeing multiple climate and water heater devices (one for each circuit).

Could you maybe give it a try and give me some feedback?

@oischinger

Hi, I tested today your integration and want to provide you with some data:

My system:

  • HASS.OS 2021.9.6 on RPi4
  • ViCare Integration ā€œconfig_flowā€ from github
  • Viessmann W200 gas heating system from 2020 (The new model with WLAN only)
  • Two heating circuits + 160L hot water (over a ā€˜mischerā€™ extension)

The old Viessmann API was working fine and provided me with a lot of data. But it wasnā€™t working any moreā€¦

Now I deleted all vicare entries from my configuration.yaml, deleted all orphaned entiries in HA, installed the new vicare integration from your git:

Installation was easy, the W200-Heater was autodetected with two circuits. Thanks.

I have got the following entities in HA:

  • binary_sensor.vicare_burner_active
  • sensor.vicare_heating_gas_consumption_this_month
  • sensor.vicare_heating_gas_consumption_this_week
  • sensor.vicare_heating_gas_consumption_this_year
  • sensor.vicare_heating_gas_consumption_today
  • sensor.vicare_hot_water_gas_consumption_this_month
  • sensor.vicare_hot_water_gas_consumption_this_week
  • sensor.vicare_hot_water_gas_consumption_this_year
  • sensor.vicare_hot_water_gas_consumption_today
  • sensor.vicare_outside_temperature
  • sensor.vicare_supply_temperature_0
  • sensor.vicare_supply_temperature_1
  • water_heater.vicare_water_0
  • water_heater.vicare_water_1

Why do I have 2x times a water_heater? Okay, not a big problem.

There a two climate integrations, one for every circuit. But I canā€™t change the value and get an error:

PyViCare.PyViCareUtils.PyViCareCommandError: (PyViCareCommandError(ā€¦), ā€˜Command failed with status code 502. Reason given was: COMMAND_NOT_FOUNDā€™)

The climate integratons shows me the water temperature in the pipes, but not the target and actual temperature in my rooms. Does this make sense?

Iā€™am missing the following (for me the most important) values:

  • burner starts
  • burner hours
  • actual modulation of the burner

Your integartion ā€œViCareā€ is working so far. Thanks for your hard work. I guess there are more than the 100 user of vicare :wink:

RaKa

The full dump.json from ā€œPyViCareā€ ist here.

Thanks for testing @Rakaandro
I just noticed that I didnā€™t properly adapt to a breaking change in the latest PyVicare version. I should be able to fix the 3 values which you are missing.

Concerning the temperatures in climate entities:
The integration tries to retrieve the room temperature but it is not available on all devices. If it fails it falls back to the water temperature in the pipesā€¦ Is the room temperature available in the ViCare app for you?

One more question concerning the COMMAND_NOT_FOUND error: Was that when you tried to change the temperature of the climate device?

In the file PyViCare/PyViCare/PyViCareGazBoiler.py at 71688db8f3676bbbcd25b4e610efe0408bff459d Ā· somm15/PyViCare Ā· GitHub
you can find two classes:

  1. class GazBoiler(Device)
  2. class GazBurner(DeviceWithComponent)

It looks like the missing values are in the GazBurner(DeviceWithComponent). But Iā€™m not a python programmer ā€¦

You are right, there is no room temperature in the app, I donā€™t have any room sensors.

Yes, when I change the lovelace climate card. . It was working with the old version.
In Developer/Services I do have only one service for ViCare:

vicare.set_vicare_mode
data: {}

Error Log:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/vicare/climate.py:336
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 11:09:53 PM (10 occurrences)
Last logged: 11:10:21 PM

[547768558640] (PyViCareCommandError(...), 'Command failed with status code 502. Reason given was: COMMAND_NOT_FOUND')

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1492, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service await handler.job.target(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 843, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set await entity.async_set_temperature(**kwargs) File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 444, in async_set_temperature await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/vicare/climate.py", line 336, in set_temperature self._circuit.setProgramTemperature(self._current_program, temp) File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 353, in setProgramTemperature return self.service.setProperty(f"heating.circuits.{self.circuit}.operating.programs.{program}", "setTemperature", {'targetTemperature': temperature}) File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 34, in setProperty response = super().setProperty(property_name, action, data) File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 52, in setProperty return self.oauth_manager.post(url, post_data) File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 91, in post self.__handle_command_error(response) File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 67, in __handle_command_error raise PyViCareCommandError(response) PyViCare.PyViCareUtils.PyViCareCommandError: (PyViCareCommandError(...), 'Command failed with status code 502. Reason given was: COMMAND_NOT_FOUND')

Thanks for your fast reaction, RaKa

if you want to you can update the branch again. It should support the modulation, hours, starts again.
I canā€™t test it because my device has no burners on the API (for unknown reasons)