Viessmann Component

Resolved with latest PyVicare lib and the latest custom integration:

3 Likes

Works for me thank you! :slightly_smiling_face: Also got a few new entities.

Hey,

I got all vicare data into my influx/grafana (I am on HA 7.1) and using the inbuilt vicare (not external implementation)
But I struggle to get water_heater.vicare_water into into it.
I can see climate.vicare_heating in the influx but no data is in it, but it shows also up in the lovelace
I have no includes in my influx configā€¦so see everything including sun and updater.

many thanks
Ingo

Hello, how long does it take until this is available under integrations?
Still got the same error.

I created a PR to Home Assistant Core: Update PyVicare to 2.16.1 by oischinger Ā· Pull Request #65073 Ā· home-assistant/core Ā· GitHub
I guess itā€™ll make it into the upcoming release on wednesday (or one of the betas in the next days)

2 Likes

Thanks oischinger for all your work! Looks like the PR was just accepted too. So it could already be in 2022.02.0b1.

1 Like

I could not get it running, after updating the custom vicare component Iā€™m receiving the following in the log:

2022-01-27 22:03:26 ERROR (MainThread) [homeassistant.components.climate] Error while setting up vicare platform for climate
Traceback (most recent call last):
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/home/homeassistant/homeassistant/custom_components/vicare/climate.py", line 115, in async_setup_entry
    for circuit in hass.data[DOMAIN][config_entry.entry_id][VICARE_API].circuits:
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 59, in circuits
    return list([self.getCircuit(x) for x in self.getAvailableCircuits()])
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 45, in feature_flag_wrapper
    return wrapper(*args, **kwargs)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 38, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 331, in getAvailableCircuits
    return self.service.getProperty("heating.circuits")["properties"]["enabled"]["value"]
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
    data = self.__get_or_update_cache()
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 36, in __get_or_update_cache
    data = self.fetch_all_features()
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 64, in fetch_all_features
    return self.oauth_manager.get(url)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 37, in get
    response = self.__oauth.get(f"{API_BASE_URL}{url}").json()
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 515, in request
    return super(OAuth2Session, self).request(
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.9/http/client.py", line 1279, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.9/http/client.py", line 1290, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 219, in putrequest
    return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 151, in protected_loop_func
    check_loop()
  File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 140, in check_loop
    raise RuntimeError(
RuntimeError: I/O must be done in the executor; Use `await hass.async_add_executor_job()` at custom_components/vicare/climate.py, line 115: for circuit in hass.data[DOMAIN][config_entry.entry_id][VICARE_API].circuits:

Iā€™ve checked and I have the right PyViCare installed (pip list shows PyViCare 2.16.1)
Any ideas how to solve it? For now I rolled back to previous version of vicare custom component which so far works ok (except those missing burner sensors).

1 Like

After the update to HA 2021.12.10 I also get the same error for the climate entitie with the custom component. With the integrated component, the climate entitie works.

Thanks for the quick reports. I accidentally introduced some I/O in the event loop :frowning:
Fixed with latest custom component. HA Core PR is waiting for approval.

3 Likes

Many thanks for super fast fixes. Works ok for me now.

Gentlemen,
I accidentally deleted some entities.
Updating them manually does not help. How can I restore them?

If you deleted an integration, it will be discovered again after a restart of Home Assistant.

Great problems here. I tried to uninstall, deleted all entities, removed the entries from config yaml. Although some entities still popped up. So i activated the config entries and tried another install job. No luck.
Iā€™m highly interested in the gas consumptionā€¦ I hope that one day this integration i working as expected.

I have already tried removing the integration and adding it again.
HA reboot. Unfortunately the deleted entities do not appear.
Previously there were 17 now I have 14.


Which ones are you missing? There are a few entities that stopped working due to viessmann api change and will be fixed in next update (or you can use custom component to have it already now). Thise were related burner hours, modulation etc.

Yes, they were, hours, modulation etc.

I had them available early on.
Unfortunately I deleted them manually, by accident.
They have not appeared again.
When will there be an update?

They worked up until youā€™ve restarted HA so they wonā€™t show up again until the fix is implemented either as part of HA update (in Feb) or by installing it as custom component from the repo GitHub - oischinger/ha_vicare: Home Assistant component for Viessmann Vitodata service

AFAIK the next release of HA is planned for tomorrow! :partying_face:

2 Likes

Great! Finally Iā€™ll be able to move back to the standard integration instead of custom component :slight_smile:

Also having the 422 validation error some users are having when you try to change heating mode on the lovelace. I am assuming it has something to do with the hvacmode being passed to the API Viessmann ViCare - Home Assistant
My device does not seem to have forcedReduced or ForcedNormal but these values

                             "enum": [
                                "standby",
                                "heating",
                                "dhw",
                                "dhwAndHeating"
                            ]

It is showing correctly (and working) in the service dev tool.
I am new to home assistant and not sure where to go from here. Do I need to create my own card or can I change this mapping to the correct values? Thanks in advance!