freitdav / BDRthermostatHA

BDR (Baxi, De Dietrich, Remeha) thermostat custom component integration for Home Assistant
GNU General Public License v3.0
48 stars 20 forks source link

Problème récupération entité #23

Open paverneuil opened 2 years ago

paverneuil commented 2 years ago

Hello, After the integration in HA of the plugin I manage to get only two entities, the entity allowing to have the water temperature (sensor.bdr_thermostat_water_temperature) and the error report (sensor.bdr_thermostat_errors)

This is a de Dietrich installation, with a smart TC GTW-16. Everything works fine on the smart TC application, but I would like to be able to control it directly from HA to limit the number of applications and connect it to my other modules.

Here is a copy of my HA logs: 2022-11-05 19:04:56.210 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration bdr_thermostat 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 2022-11-05 19:05:02.530 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 291, in async_update status = await self._bdr_api.get_status() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 195, in get_status api_endpoint = self.capabilities["centralHeatingZones"]["statusUri"] KeyError: 'statusUri' 2022-11-05 19:05:02.538 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 328, in async_update status = await self._bdr_api.get_status() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 195, in get_status api_endpoint = self.capabilities["centralHeatingZones"]["statusUri"] KeyError: 'statusUri' 2022-11-05 19:05:02.539 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 175, in async_update consumptions = await self._bdr_api.get_consumptions() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 233, in get_consumptions api_endpoint = self.capabilities["producers"]["energyConsumptionUri"] KeyError: 'energyConsumptionUri' 2022-11-05 19:05:02.540 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 214, in async_update consumptions = await self._bdr_api.get_consumptions() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 233, in get_consumptions api_endpoint = self.capabilities["producers"]["energyConsumptionUri"] KeyError: 'energyConsumptionUri' 2022-11-05 19:05:02.548 ERROR (MainThread) [homeassistant.components.climate] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/climate.py", line 96, in async_update status = await self._bdr_api.get_status() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 195, in get_status api_endpoint = self.capabilities["centralHeatingZones"]["statusUri"] KeyError: 'statusUri' 2022-11-05 19:05:03.318 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 97, in async_update water_pressure = await self._bdr_api.get_water_pressure() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 240, in get_water_pressure return await self.async_get_request(api_endpoint) File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 139, in async_get_request return response.json() if response else response File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 2022-11-05 19:05:04.865 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Canon MG4200 series' for ipp integration not ready yet: Invalid response from API: Error occurred while communicating with IPP server.; Retrying in background 2022-11-05 19:05:48.931 ERROR (MainThread) [homeassistant.components.climate] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/climate.py", line 96, in async_update status = await self._bdr_api.get_status() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 195, in get_status api_endpoint = self.capabilities["centralHeatingZones"]["statusUri"] KeyError: 'statusUri' 2022-11-05 19:05:48.940 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 291, in async_update status = await self._bdr_api.get_status() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 195, in get_status api_endpoint = self.capabilities["centralHeatingZones"]["statusUri"] KeyError: 'statusUri' 2022-11-05 19:05:48.942 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 328, in async_update status = await self._bdr_api.get_status() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 195, in get_status api_endpoint = self.capabilities["centralHeatingZones"]["statusUri"] KeyError: 'statusUri' 2022-11-05 19:05:48.943 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 175, in async_update consumptions = await self._bdr_api.get_consumptions() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 233, in get_consumptions api_endpoint = self.capabilities["producers"]["energyConsumptionUri"] KeyError: 'energyConsumptionUri' 2022-11-05 19:05:48.944 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 214, in async_update consumptions = await self._bdr_api.get_consumptions() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 233, in get_consumptions api_endpoint = self.capabilities["producers"]["energyConsumptionUri"] KeyError: 'energyConsumptionUri' 2022-11-05 19:05:49.681 ERROR (MainThread) [homeassistant.components.sensor] bdr_thermostat: Error on device update! Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/config/custom_components/bdr_thermostat/sensor.py", line 97, in async_update water_pressure = await self._bdr_api.get_water_pressure() File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 240, in get_water_pressure return await self.async_get_request(api_endpoint) File "/config/custom_components/bdr_thermostat/BdrAPI.py", line 139, in async_get_request return response.json() if response else response File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 2022-11-05 19:08:10.355 WARNING (MainThread) [zigpy.application] Unknown device AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x30D2) 2022-11-05 19:08:10.361 WARNING (MainThread) [zigpy.application] Unknown device AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x30D2) 2022-11-05 19:09:26.726 WARNING (MainThread) [zigpy.application] Unknown device AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x30D2) 2022-11-05 19:09:26.730 WARNING (MainThread) [zigpy.application] Unknown device AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x30D2)

Merci à vous