klejejs / ha-thermia-heat-pump-integration

Thermia Heat Pump Integration for Home Assistant
GNU General Public License v3.0
30 stars 7 forks source link

Errors during home assistant restart #31

Closed zama737 closed 1 year ago

zama737 commented 1 year ago

Hi,

Thank you for all the efforts with integration.

I am seen error in the log after homeassistant restart. Have tried to fix it, but error stays. Finally loads ok after sometime, and works then ok but for some reason errors below are raised to homeassistant.log.

2022-10-08 20:31:11.411 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/cast.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.cast' 2022-10-08 20:31:19.481 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/diagnostics.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.diagnostics' 2022-10-08 20:31:19.487 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/recorder.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.recorder' 2022-10-08 20:31:19.488 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/logbook.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.logbook' 2022-10-08 20:31:19.491 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/media_source.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.media_source' 2022-10-08 20:31:19.493 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/system_health.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.system_health' 2022-10-08 20:31:19.495 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/group.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.group'

2022-10-08 20:32:10.772 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing thermia/significant_change.py Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component platform = integration.get_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.thermia_water_heater.significant_change'

image

klejejs commented 1 year ago

Unfortunately, I cannot replicate this issue. Is it still present for you? From the logs, it looks like something wrong has happened with either this integration's or Home Assistant's installation as in this case Home Assistant tries accessing entities that it should not be accessed from Thermia.

Stefan71a commented 1 year ago

Hello,

I was in contact with Termia in another issue relate to the Thermia Online and they informed me that they was developing the Genisis integration to allow better support to control the behavior of the heatpump to run when the energy prices are high. They could not anser if this should be the case also for the older integration later on.

Regards Stefan

19 okt. 2022 kl. 17:07 skrev Krisjanis Lejejs @.***>:

Unfortunately, I cannot replicate this issue. Is it still present for you? From the logs, it looks like something wrong has happened with either this integration's or Home Assistant's installation as in this case Home Assistant tries accessing entities that it should not be accessed from Thermia.

— Reply to this email directly, view it on GitHub https://github.com/klejejs/ha-thermia-heat-pump-integration/issues/31#issuecomment-1284165715, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJZ7VKYETI5RNEVSOSAWNDWEAFD3ANCNFSM6AAAAAARAKYB7U. You are receiving this because you are subscribed to this thread.

zama737 commented 1 year ago

Hi @klejejs,

Still seeing the issue. Did do some troubleshooting:

  1. Did copy and replace files in custom_components with fresh ones, restarted ha --> error still seen
  2. Did uninstall thermia integration, ha restart without integration --> no error seen
  3. Installed integration, restarted ha --> error seen again

Somehow it is related to the integration. Luckily it starts finally despite of errors.

klejejs commented 1 year ago

@mmmahammm Thanks, I'll think about what could be wrong.

klejejs commented 1 year ago

There has been some significant code refactoring in the latest releases and I cannot replicate the issue. If it is still present, please comment and I will reopen the case.