oischinger / ha_vicare Goto Github PK
View Code? Open in Web Editor NEWInofficial Home Assistant custom component for Viessmann ViCare API
Inofficial Home Assistant custom component for Viessmann ViCare API
Using 2021.12 with latest ha_vicare, I created an automation to set DHW water (water_heater.vicare_water_0) temp to 10℃ when set to off according to time schedule, and to 48℃ when programmed to heat the water. I believe this is the 'charging' attribute?
The value appears to be set correctly, I can see it in the ViCare app. However, after a number of seconds, it disappears again in HA and shows 'null'. Sometimes the automations are triggered incorrectly, it would be nice to always have the correct value available.
min_temp: 10 max_temp: 60 current_temperature: 31 temperature: null target_temp_high: null target_temp_low: null charging_active: true circulation_pump_active: false friendly_name: ViCare Water 0 supported_features: 1
It would be great not only showing sensor.vicare_supply_temperature
of the primaryCircuit, but also of the secondaryCircuit.
I have configured the integration for my viessmann heater, it correctly displays attributes from my heater but I can't set any parameters (neither water heater temperature nor preset_modes. There are no relevant entries in the log that would explain what's happening. How can I troubleshoot the issue further?
Are you far away from integration in the official repository?
It would be cool.
Do you need any help?
anyone else ?
Logger: homeassistant.components.vicare.water_heater
Source: components/vicare/water_heater.py:98
Integration: Viessmann ViCare (documentation, issues)
First occurred: March 16, 2021, 1:16:48 PM (1 occurrences)
Last logged: March 16, 2021, 1:16:48 PM
Unable to decode data from ViCare server
Adding the Integration throws this error:
Logger: homeassistant.components.http.view
Source: components/http/view.py:59
Integration: HTTP (documentation, issues)
First occurred: 10:31:14 (1 occurrences)
Last logged: 10:31:14
Unable to serialize to JSON: Object of type HeatingType is not JSON serializable {'type': 'form', 'flow_id': 'a54e529417c241b1908b07f4b8a99426', 'handler': 'vicare', 'step_id': 'user', 'data_schema': [{'type': 'string', 'name': 'username', 'required': True}, {'type': 'string', 'name': 'password', 'required': True}, {'type': 'string', 'name': 'client_id', 'required': True}, {'type': 'select', 'options': [(<HeatingType.auto: 'auto'>, <HeatingType.auto: 'auto'>), ('gas', 'gas'), ('heatpump', 'heatpump'), ('fuelcell', 'fuelcell')], 'name': 'heating_type', 'optional': True, 'default': <HeatingType.auto: 'auto'>}, {'type': 'string', 'name': 'name', 'optional': True, 'default': 'ViCare'}, {'type': 'integer', 'valueMin': 30, 'name': 'scan_interval', 'optional': True, 'default': 60}], 'errors': {}, 'description_placeholders': None, 'last_step': None}
Hello, is it possible to view the entities for gas AND heatpump for the Viessmann 222-F? heating_type: gas shows the gasvalues; heating type: heatpump the values for the heatpump. I need gas AND heatpump.
Hey there,
currently the climate and water_heater components doesn't generate a unique_id.
Could you please add the property?
Thanks,
HerrDepence
Currently, the installation is done by manually downloading the repo and putting the vicare
folder under custom_components
it would be great to allow the installation (and updating) via HACS. See: https://hacs.xyz/docs/publish/start
This requires moving the vicare
folder to an additional folder custom_components
. (content_in_root: false
)
I have this problem, can you help me?
Logger: homeassistant.setup
Source: setup.py:280
First occurred: 11:36:27 (1 occurrences)
Last logged: 11:36:27
Unable to prepare setup for platform vicare.sensor: Platform not found (cannot import name 'UNIT_PERCENTAGE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).
Hello,
I am lost as I tried everything that I found myself on the internet. Since yesterday 1 pm I am getting this error in ha:
Protokolldetails ( ERROR )
Logger: homeassistant.setup
Source: custom_components/vicare/init.py:68
First occurred: Invalid Date (1 occurrences)
Last logged: 9:35:06
Error during setup of component vicare
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/vicare/init.py", line 68, in setup
vicare_api = HeatPump(conf[CONF_USERNAME], conf[CONF_PASSWORD], **params)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareDevice.py", line 40, in init
self.service = ViCareService(username, password, token_file, circuit)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 58, in init
self._getInstallations()
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 219, in _getInstallations
self.id=self.installations["entities"][0]["properties"]["id"]
KeyError: 'entities'
I already tried adding the custom_component (in this case) but it throws the same error as with the onboard component of vicare.
I am grateful for any help.
Thanks in advance and cheers
Hi,
In the piVicare api librarary there is support for fuelcell heating type. Would it be possible to integrate this also in the ha_vicare integration ?
Regards
Raf
water_heater.set_temperature was working properly in 2021.8.0
About 4 days ago, it stopped working.
HA is now on core-2021.8.7, I have downgraded to 8.0 - no joy
There is no error in the logs, just the DHW temp doesn’t get set.
Other functions ( like setting the heating temp) , work just fine.
My boiler has no room sensor and the supply temperature is not available either.
So any click on the heating part in HA results in an error.
I would suggest another if with
FYI, I also added getBurnerModulation()
I believe this is available only for gaz burners, so I added it to the GazBoiler object.
I noticed also several new API endpoint about solar. Didn't implement it yet.
Hello,
from the very beginning I have a problem with this integration, the HA displays the temperature of domestic water and heating, but I can not change anything, nor, for example, turn off the heating. I can only set the temperature of domestic water. I tried the version with energy support, but there was no new entity for gas or electricity consumption, and I have all this data in the Vicare application.
Below I am pasting the log that was generated when I tried to turn off the heating.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/vicare/climate.py:277
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:23:01 (1 occurrences)
Last logged: 12:23:01
[140010213410080] (PyViCareCommandError(...), 'Command failed with status code 422. Reason given was: VALIDATION_ERROR')
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 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1530, 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 667, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 863, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 704, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 470, in async_set_hvac_mode
await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/climate.py", line 277, in set_hvac_mode
self._circuit.setMode(vicare_mode)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 330, in setMode
r = self.service.setProperty(
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 29, 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 422. Reason given was: VALIDATION_ERROR')
Today's Vicare server outage causes the following :
Also, HA takes a long time to restart, guessing the component is timing out, and holding up the restart ?
2020-02-09 14:29:22 ERROR (MainThread) [homeassistant.setup] Error during setup of component vicare
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 164, in __get
r=self.oauth.get(url).json()
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 478, in request
url, http_method=method, body=data, headers=headers
File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 300, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f41d916ef90>: Failed to establish a new connection: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='iam.viessmann.com', port=443): Max retries exceeded with url: /idp/v1/authorize?response_type=code&client_id=79742319e39245de5f91d15ff4cac2a8&redirect_uri=vicare%3A%2F%2Foauth-callback%2Feverest&scope=openid&state=F2nWSPQ2AHUjccGv5ADWGzAeM8niYx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f41d916ef90>: Failed to establish a new connection: [Errno 110] Operation timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/__init__.py", line 66, in setup
vicare_api = GazBoiler(conf[CONF_USERNAME], conf[CONF_PASSWORD], **params)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareDevice.py", line 40, in __init__
self.service = ViCareService(username, password, token_file, circuit)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 62, in __init__
self._getInstallations()
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 218, in _getInstallations
self.installations = self.__get(apiURLBase+"/general-management/installations?expanded=true&")
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 172, in __get
self.renewToken()
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 145, in renewToken
self.oauth=self.__getNewToken(self.username,self.password,self.token_file)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 120, in __getNewToken
response = requests.post(authorization_url, headers=header,auth=(username,password))
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='iam.viessmann.com', port=443): Max retries exceeded with url: /idp/v1/authorize?response_type=code&client_id=79742319e39245de5f91d15ff4cac2a8&redirect_uri=vicare%3A%2F%2Foauth-callback%2Feverest&scope=openid&state=F2nWSPQ2AHUjccGv5ADWGzAeM8niYx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f41d916ef90>: Failed to establish a new connection: [Errno 110] Operation timed out'))
2020-02-09 14:29:22 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform vicare.water_heater: Unable to set up component.
2020-02-09 14:29:22 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 459, 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'
Failures in http connections result in exception tracebacks in home-assistant.log
Most possibly this should be catched and handled?
2019-02-03 11:02:02 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.vicare fails
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.5/http/client.py", line 1198, in getresponse
response.begin()
File "/usr/lib/python3.5/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.5/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
Hello
Since yesterday I lost communication with these four sensors. I was trying to rollback HassOS from last snapshot but the same problem occur. Probably this issue is related with some maintenance work on Viessman side.
Before rollback sensors were reported as unavailable with additional information:
This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.
If the entity is no longer in use, you can clean it up by removing it.
Regards
Arek
Hi everyone,
I'm a great fan of this HA implementation! Does anyone know what I'm doing wrong? Everytime I restart HA I'll get this error message. After waiting one or two hours and the another restart it works fine. The update interval in the settings is 120sec.
Thanks a lot for your suggestions.
Benedikt
Logger: homeassistant.setup
Source: components/vicare/init.py:80
First occurred: 11:10:45 (1 occurrences)
Last logged: 11:10:45
Error during setup of component vicare
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.9/socket.py", line 953, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fbbe50a5ac0>: Failed to establish a new connection: [Errno -3] Try again
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.viessmann.com', port=443): Max retries exceeded with url: /iot/v1/equipment/installations?includeGateways=true (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbbe50a5ac0>: Failed to establish a new connection: [Errno -3] Try again'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 255, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 80, in setup
vicare_api = GazBoiler(conf[CONF_USERNAME], conf[CONF_PASSWORD], **params)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 60, in init
self.service = ViCareCachedService(username, password, cacheDuration, client_id, token_file, circuit)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 8, in init
ViCareService.init(self, username, password, client_id, token_file, circuit)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 77, in init
self._getInstallations()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 269, in _getInstallations
self.installations = self.__get(apiURLBase+"/equipment/installations?includeGateways=true")
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 201, in __get
r=self.oauth.get(url).json()
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 515, in request
return super(OAuth2Session, self).request(
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.viessmann.com', port=443): Max retries exceeded with url: /iot/v1/equipment/installations?includeGateways=true (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbbe50a5ac0>: Failed to establish a new connection: [Errno -3] Try again'))
'ViCareClimate' object has no attribute '_current_operation'
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/websocket_api/commands.py", line 122, in handle_call_service
connection.context(msg))
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 188, in handle_service
self._platforms.values(), func, call, service_name
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 314, in entity_service_call
future.result() # pop exception if have
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 330, in _handle_service_platform_call
await func(entity, data)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/climate/init.py", line 564, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/vicare/climate.py", line 216, in set_temperature
self._api.setProgramTemperature(self._current_operation, self._target_temperature)
AttributeError: 'ViCareClimate' object has no attribute '_current_operation'
limitResetDate of the PyViCareRateLimitError exception shall be used to stop polling if we exceeded limits
I just found that a bunch of rather useful attributes went suddenly missing from the ViCare climate integration in HA:
Is this vanishing an expected behavior?
I can still see most of these attributes in the ViCare app (except for outside temp).
Unfortunately I do not know, when these attributes vanished. I just found them missing today.
They were all quite important in monitoring the condition of the Viessmann heating.
Hi !
I had an error with the latest HA because of simplejson missing.
I tried not to rely on this library but adding it was the only way I found to solve the error.
I published PyVicare 0.1.7 with the fix. I also merge the latest PR.
Feel free to test (I insist :-) )and integrate.
Regards,
I am getting a traceback on every query of my device (Vitodens 333)
Removing the current power from the list of ViCareSensor fixes this issue. It would be good to have check if the attribute is present and ignore ViCareSensors, which are not present.
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/sensor/vicare.py", line 79, in update
api_method = getattr(ViCareSession, "get" + self.sensorName)
AttributeError: type object 'ViCareSession' has no attribute 'getCurrentPower'
Hi
Is any chance to add support multilanguage to this component ? I am ready to help with translation POLISH language.
I've configured vicare using your instructions.
I can see the following stack trace in home assistant log. I can see the vicare climate entities, and not the sensor entities.
019-09-04 16:52:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 402, in _async_add_entity
await entity.async_update_ha_state()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 254, in async_update_ha_state
self._async_write_ha_state()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state
state = self.state
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 176, in state
return self.hvac_mode
File "/home/homeassistant/.homeassistant/custom_components/vicare/climate.py", line 166, in hvac_mode
return VICARE_TO_HA_HVAC_HEATING[self._current_mode]
KeyError: 'unknown'
2019-09-04 16:52:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 402, in _async_add_entity
await entity.async_update_ha_state()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 254, in async_update_ha_state
self._async_write_ha_state()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state
state = self.state
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 176, in state
return self.hvac_mode
File "/home/homeassistant/.homeassistant/custom_components/vicare/climate.py", line 302, in hvac_mode
return VICARE_TO_HA_HVAC_DHW[self._current_mode]
KeyError: 'unknown'
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/vicare/__init__.py:118
Integration: Viessmann ViCare
First occurred: 8:42:21 AM (1 occurrences)
Last logged: 8:42:21 AM
Error setting up entry ViCare for vicare
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/vicare/__init__.py", line 105, in async_setup_entry
await 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/__init__.py", line 118, in setup_vicare_api
vicare_api.initWithCredentials(
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCare.py", line 24, in initWithCredentials
self.initWithExternalOAuth(ViCareOAuthManager(
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCare.py", line 29, in initWithExternalOAuth
self.__loadInstallations()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCare.py", line 43, in __loadInstallations
self.devices = list(self.__readInstallations(installations["data"]))
KeyError: 'data'
Hello,
My HA log is filled up with many vicare integration DEVICE_COMMUNICATION_ERROR messages. Sample below.
Is that something you'll change to be less frequent (e.g. not for every sensor but only once per API call or something similar)?
I think we all know that this API is not a perfectly stable and available so would be good to have less error messages in the log.
2021-10-08 23:53:02 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.vicare_heating fails
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 438, in async_update_ha_state
await self.async_device_update()
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 625, in async_device_update
raise exc
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/homeassistant/custom_components/vicare/climate.py", line 208, in update
_room_temperature = self._circuit.getRoomTemperature()
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareUtils.py", line 45, in feature_flag_wrapper
return wrapper(*args, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareUtils.py", line 38, in wrapper
return func(*args, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareDevice.py", line 410, in getRoomTemperature
return self.service.getProperty(f"heating.circuits.{self.circuit}.sensors.temperature.room")["properties"]["value"]["value"]
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
data = self.__get_or_update_cache()
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareCachedService.py", line 36, in __get_or_update_cache
data = self.fetch_all_features()
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareService.py", line 56, in fetch_all_features
return self.oauth_manager.get(url)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 41, in get
self.__handle_server_error(response)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 60, in __handle_server_error
raise PyViCareInternalServerError(response)
PyViCare.PyViCareUtils.PyViCareInternalServerError: (PyViCareInternalServerError(...), 'Request failed with status code 502 and message "DEVICE_COMMUNICATION_ERROR". ViCare ErrorId: req-44a4f22bc8c84a0ea277889be438f711')
Thanks in advance!
Hi, as just now my Viessmann raised an error, I realised that the attribute active_error disappeared fromt he climate.vicare_heating
Is this because it's not available anymore since the API switch? Just wondering as it helped me getting noticed from failures on my installation.
Thanks!
While using Home Assistant 2021.9.7, the integration is not been loaded because of a missing version number within the manifest.json.
Error:
[homeassistant.loader] The custom integration 'vicare' does not have a valid version key (None) in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/20
Solution would be:
Add the attribute "version" to the manifest.json
We should add a integration with the new energy feature for home assistant:
https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics
After updating to energy-support, I noticed that the graphs in lovelace for sensor.vicare_supply_temperature
and sensor.vicare_outside_temperature
look like this :
They used to look like a line graph similar to :
Could this be because units of measurement are missing in sensor.vicare_supply_temperature
and sensor.vicare_outside_temperature
?
versus
Logger: homeassistant.components.sensor
Source: util/async_.py:140
Integration: Sensor (documentation, issues)
First occurred: 08:45:51 (1 occurrences)
Last logged: 08:45:51
Error while setting up vicare platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/vicare/sensor.py", line 300, in async_setup_entry
entity = _build_entity(
File "/config/custom_components/vicare/sensor.py", line 277, in _build_entity
sensor.value_getter(vicare_api)
File "/config/custom_components/vicare/sensor.py", line 80, in <lambda>
value_getter=lambda api: api.getOutsideTemperature(),
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 45, in feature_flag_wrapper
return wrapper(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareUtils.py", line 38, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareDevice.py", line 51, in getOutsideTemperature
return self.service.getProperty("heating.sensors.temperature.outside")["properties"]["value"]["value"]
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
data = self.__get_or_update_cache()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareCachedService.py", line 36, in __get_or_update_cache
data = self.fetch_all_features()
File "/usr/local/lib/python3.9/site-packages/PyViCare/PyViCareService.py", line 56, in fetch_all_features
return self.oauth_manager.get(url)
File "/usr/local/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/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 515, in request
return super(OAuth2Session, self).request(
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/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/lib/python3.9/site-packages/urllib3/connection.py", line 219, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 151, in protected_loop_func
check_loop()
File "/usr/src/homeassistant/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/sensor.py, line 80: value_getter=lambda api: api.getOutsideTemperature(),
Hi! I'm using the HA component and I'm getting the ERROR
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.7/http/client.py", line 1336, in getresponse
response.begin()
File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.7/http/client.py", line 275, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.7/http/client.py", line 1336, in getresponse
response.begin()
File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.7/http/client.py", line 275, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 441, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/vicare/climate.py", line 99, in update
_room_temperature = self._api.getRoomTemperature()
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareDevice.py", line 148, in getRoomTemperature
return self.service.getProperty("heating.circuits." + str(self.service.circuit) + ".sensors.temperature.room")["properties"]["value"]["value"]
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 231, in getProperty
j=self.__get(url)
File "/usr/local/lib/python3.7/site-packages/PyViCare/PyViCareService.py", line 164, in __get
r=self.oauth.get(url).json()
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 425, in request
headers=headers, data=data, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
If you need any kind of information just let me know
I am not quite sure, if the current implementation of away mode is correct. It is not consistent with ViCare App at least with my device. It might also be that implementing hold mode would be correct for this (CLIMATE.SET_HOLD_MODE), which is currently not implemented.
Setting away on the ViCare App results in forcedReduced to be set as Mode. Setting home in ViCare changes the mode to forcedNormal.
Is this away mode in ViCare App supposed to be implemented by CLIMATE.SET_HOLD_MODE or CLIMATE.SET_AWAY_MODE?
Hello,
I've just re-enabled vicare (official) integration in my HA after updating the core (running on venv) to 2021.8.0
but the process failed since the python module 'pkce' is missing (or at least it was) in my installation.
I think there's a dependency missing here or maybe in PyViCare: I'm not really expert on python dependency requirements declaration but I've checked this repository manifest and it only requires pyvicare.
I'm not sure if I should open an issue in official HA but since I understand this is where everything starts I've come here to signal the issue.
After manually installing 'pkce' in my venv everything looks fine: vicare gets loaded correctly.
Thank you for your work on Viessmann integration!
The Viessmann API returns a value for the DomesticHotWaterPump status.
Would it be possible to add this an attribute for use withing HA?
I'm using the new custom component and the scan interval seems to be still 15 minutes on default. I dont have any scan_interval set in my configuration.yaml
I suspect it might be because of the SCAN_INTERVAL in water_heater.py and climate.py
ha_vicare/vicare/water_heater.py
Line 46 in 697faa7
Setting away/hold modes is sometimes not working.
Problem is the call to setMode('forcedReduced')
Result is sometimes: {'error': 'Bad Gateway', 'message': 'DEVICE_COMMUNICATION_ERROR', 'statusCode': 502}
See issue: somm15/PyViCare#9
When setting up via config flow for a discovered Vicare integration the menu shows "Unknown error occurred" message.
I have the current config_flow branch in custom_components and PyVicare version 2.10.0 library. Also tested with 2.11.1 with the same outcome. Message in the log:
2021-10-07 09:59:26 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 144, in auth_middleware
return await handler(request)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 157, in post
return await super().post(request, flow_id)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 111, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 198, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/local/share/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 256, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/home/homeassistant/homeassistant/custom_components/vicare/config_flow.py", line 59, in async_step_user
await self.hass.async_add_executor_job(vicare_login, user_input)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: vicare_login() missing 1 required positional argument: 'conf'
Please add the heating.solar.sensors.*
Hey at All,
i try to install the ViCare Integration.
First there is an Translation error. I don't know if this bug is bad.
After I have entered all of my data, the error "Unknown error occurred" appears.
I find the following two errors in the logs
Once the Error Handling:
and the Missing data
I once installed the ViCare app. But that was before the changeover. After that I unfortunately couldn't get it to work anymore. It may also be that I still have to delete something.
Can someone tell me what else I could do other than start over?
I have already deleted the file (.storage / vicare_token.save) as a test. But this was unsuccessful.
Best regards
Julian
As described in detail here, I have a hybrid installation containing a heatpump and a gas burner as support. The Home Assistant integration currently can only support one device, which happens to be the first one returned by the API.
It would be great if all available devices show up in Home Assistant.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.