Viessmann Component

Same email to me.

“we would like to invite you to an early access to the Developer Portal. If you are interested, please fill out this short form. The access to the pre-version of the Portal will be sent to you within the next weeks”

I’ll wait their news.

Alessandro

That email was sent to all accounts that are using the API outside of the Vicare smartphone app.
At this point in time, there is nothing to worry about, accounts are not permanently banned.

Viessmann are making changes, the vicare integration is also undergoing modifications.

Until the dust has settled, the HA integration will be a bit slow (up to 15 minutes lag) when showing the stats from your Viessmann burner.

Thank you so much for your reply.
HAve you got a date? Weeks, moths?

Regards,

Alessandro

Hi Tom,

How do you remove the water_heater component? Just delete or rename the water_heater.py in vicare-integration?

Ask Viessmann ? They are the ones setting up their developer portal api thing…
After that, for changes to the HA component, our own developer will take care of it - I’m sure.

If you need to ask this, then you most likely do not have the water_heater: component configured.
The docs about water_heater are Viessmann ViCare - Home Assistant

Just remove this config from your yaml :

water_heater:
  platform: vicare

I have

vicare:
  username: xxx
  password: xxx
  heating_type: gas

This also creates me the water_heater component. Concerning to the documentation Viessmann ViCare - Home Assistant this is how it works…

Two components will be created: climate.vicare_heating and water_heater.vicare_water (for domestic hot water). Unless you specify a circuit parameter, it will pick up the first heating circuit of your installation.

Or must I specify the heating circuit and then the water_heater component will not be created?

hmm…i guess that there’s no way to disable the DHW then…

@oischinger Are we supposed to make a custom_component in order to increase the interval ?

@oischinger can you give us information on how changes to the climate settings (e.g. changing temp from 22 to 20 degrees) will be sent to the api? Are requests directly sent or are these requests beeing queued and sent to api after the timeout has been reached?

They are sent directly to the API.

I have uploaded a new custom component which makes use of PyViCare 0.1.10 which reduces the number of API requests towards the Viessmann services (thanks @crazyfx1 !).

Now you can set a scan_interval parameter to whatever suits your needs. The default value is 60 seconds.

Let’s see how it holds up.

1 Like

Nice work. I will try it out as soon as my daily ban is expired :wink:

guys…could some-one please give detailed instructions how to get the custom_component installed & active ?
And, after installation - is there a way to verify that HA is actually using the custom instead of the normal integration ?

Things that I did (have installed HA in Python venv on my raspi 4 4GB):

Updating PyViCare to 0.1.10:
Login via shell then change user to homeassistant, and enter Python venv:

sudo -u homeassistant -H -s
cd /srv/homeassistant
source bin/activate

Now update PyViCare:

pip3 install --upgrade PyViCare
exit

Now clone ha_vicare custom component (https://github.com/oischinger/ha_vicare) from git:

cd ~
sudo git clone https://github.com/oischinger/ha_vicare.git

Now move downloaded folder into homeassistant custom component folder:

mv ha_vicare/vicare /home/homeassistant/.homeassistant/custom_components

Then restart HA and it will automatically choose the custom component instead of the official.

@oischinger: I saw, that SCAN_INTERVAL = 900 secs. which was introduced 8 days ago, is still alive in code. Is that correct? I thought, that from version 0.1.10, PyViCare will manage that the Viessmann api will not be fired with requests. Thanks for a short statement.

@Tommmii
Installing it is super-simple: Just download the files in here: https://github.com/oischinger/ha_vicare/tree/master/vicare and put them under HOME_ASSISTANT_CONFIG_DIR/custom_components/vicare

On startup you will get a log entry in Home Assistant that vicare is a custom component and might not have been tested, etc.
You will also notice it because the update frequency of the ViCare data is higher if you plot it on a graoh :wink:

Thanks for the hint with the SCAN_INTERVAL=900. I fixed that now on master.

Note that you should not have to manually update to pyvicare 0.1.10. In my case Home assistent did that for me because I added it to manifest.json

Ah okay, thanks for information. I didn’t knew, that HA will update to version concerning manifest.json :slight_smile:

Is adding vicare: to the yaml configuration needed, or is the custom component added via the Integrations page ?

well, something isn’t working as expected, values don’t update.

➜  vicare pwd
/config/custom_components/vicare
➜  vicare ls -lha
total 44K    
drwxr-xr-x    3 root     root        4.0K Mar 25 11:21 .
drwxr-xr-x    3 root     root        4.0K Mar 25 10:17 ..
-rw-r--r--    1 root     root          17 Mar 24 21:38 .gitignore
-rw-r--r--    1 root     root        2.7K Mar 24 21:38 __init__.py
drwxr-xr-x    2 root     root        4.0K Mar 25 11:21 __pycache__
-rw-r--r--    1 root     root       11.5K Mar 24 21:38 climate.py
-rw-r--r--    1 root     root         222 Mar 24 21:38 manifest.json
-rw-r--r--    1 root     root        5.9K Mar 24 21:38 water_heater.py
➜  vicare 
➜  vicare ha core restart & tail -f /config/home-assistant.log
[1] 1047
⣾ Processing... 
⣯ Processing... 2020-03-25 12:40:35 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vicare which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
⣯ Processing... 2020-03-25 12:40:53 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.vicare_heatcurve_target_temperature fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/template/sensor.py", line 224, in async_update
    self._state = self._template.async_render()
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 221, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
Processing... Done.
Command completed successfully.

[1]  + 1047 done       ha core restart

My yaml config :

vicare:
  username: !secret vicare_email
  password: !secret vicare_password
  heating_type: gas
  scan_interval: 60

This is a failure of a sensor that is not from my integration: sensor.vicare_heatcurve_target_temperature

Does the integration also fail?

Yours didn’t refresh, but then I saw above that the 900s interval was still hardcoded.
Updated to the newer version, seems ok now.

I did get the sensor.vicare_heatcurve_target_temperature from you, indirectly :