Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Update for sensor.vaillant_outdoor_temperature fails #41

Closed
Wiggum127 opened this issue Apr 1, 2021 · 11 comments
Closed

Update for sensor.vaillant_outdoor_temperature fails #41

Wiggum127 opened this issue Apr 1, 2021 · 11 comments

Comments

@Wiggum127
Copy link

Wiggum127 commented Apr 1, 2021

Cloned the latest repo and tried custom integration for Vaillant (VRC 700)

Found following in the log files (error):

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 277, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, in async_device_update
    raise exc
  File "/config/custom_components/vaillant/entities.py", line 46, in async_update
    await self.hub.update_system()
  File "/config/custom_components/vaillant/hub.py", line 77, in _update_system
    self.system = await self._manager.get_system()
  File "/usr/local/lib/python3.8/site-packages/pymultimatic/systemmanager.py", line 94, in get_system
    zones = mapper.map_zones(full_system)
  File "/usr/local/lib/python3.8/site-packages/pymultimatic/model/mapper.py", line 214, in map_zones
    zone = map_zone(raw_zone)
  File "/usr/local/lib/python3.8/site-packages/pymultimatic/model/mapper.py", line 233, in map_zone
    active_function = ActiveFunction[configuration.get("active_function")]
  File "/usr/local/lib/python3.8/enum.py", line 387, in __getitem__
    return cls._member_map_[name]
KeyError: None
@thomasgermain
Copy link
Owner

I'm about to release a new version, could you check with the last beta before the release ? https://github.com/thomasgermain/vaillant-component/releases/tag/1.5.0b6

@Wiggum127
Copy link
Author

removed the integration, downloaded the new directory, renamed multimatic to vaillant (not required ?) and moved to custom_components/vaillant, stopped HA via app and restarted HA docker-compose.

Added the multimatic integration.

No error showing up anymore. Seems to be resolved for now.

Possible small regression: when adding the integration you're supposed to add user, pwd and serialno. The UI does not tell you what info you're supposed to enter anymore. It used to tell the user what is supposed to be filled in. Now it just shows you three blank fields to fill in.

Feedback: the name change from vaillant to multimatic, makes sense. However, make sure to adapt documentation and user guidelines to avoid confusion for new users.

@Wiggum127
Copy link
Author

Now getting an error:

´Logger: homeassistant.helpers.integration_platform
Source: loader.py:504
First occurred: 11:51:35 (4 occurrences)
Last logged: 11:51:35

Unexpected error importing multimatic/media_source.py
Unexpected error importing multimatic/group.py
Unexpected error importing multimatic/logbook.py
Unexpected error importing multimatic/system_health.py
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 30, in _process
platform = integration.get_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 499, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 504, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.vaillant.media_source'
´

@thomasgermain
Copy link
Owner

you shouldn't have these files (media_source, group, logbook, system_health) inside multimatic folder

@Wiggum127
Copy link
Author

I don't have these files in the folder. Perhaps it has to do with the fact I renamed the folder into vaillant when downloading and installing ?

Today I'm still getting this upon restart of HA:

`Logger: homeassistant.helpers.integration_platform
Source: loader.py:504
First occurred: 2:43:18 PM (4 occurrences)
Last logged: 2:43:18 PM

Unexpected error importing multimatic/media_source.py
Unexpected error importing multimatic/logbook.py
Unexpected error importing multimatic/system_health.py
Unexpected error importing multimatic/group.py
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 30, in _process
platform = integration.get_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 499, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 504, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.vaillant.media_source'
`

@Wiggum127
Copy link
Author

just upgraded HA docker image to 2021.5 and restarted. Still getting this error:

`Logger: homeassistant.helpers.integration_platform
Source: loader.py:498
First occurred: 12:07:16 (4 occurrences)
Last logged: 12:07:16

Unexpected error importing multimatic/media_source.py
Unexpected error importing multimatic/group.py
Unexpected error importing multimatic/logbook.py
Unexpected error importing multimatic/system_health.py
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 33, in _process
platform = integration.get_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 493, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 498, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.vaillant.media_source'
`

@thomasgermain
Copy link
Owner

could you try to delete your multimatic folder inside custom_components and installing the integration through HACS (see https://hacs.xyz/docs/faq/custom_repositories/, for now it's still using custom repository) ?

@Wiggum127
Copy link
Author

I'm running HA Docker, not HACS. So I don't have the option to add a custom component via the GUI.

Content of my custom_components/vaillant folder:

-rw-r--r-- 1 root root 15723 Apr 2 10:50 binary_sensor.py
-rw-r--r-- 1 root root 16187 Apr 2 10:50 climate.py
-rw-r--r-- 1 root root 3764 Apr 2 10:50 config_flow.py
-rw-r--r-- 1 root root 1317 Apr 2 10:50 const.py
-rw-r--r-- 1 root root 3129 Apr 2 10:50 entities.py
-rw-r--r-- 1 root root 3932 Apr 2 10:50 fan.py
-rw-r--r-- 1 root root 14578 Apr 2 10:50 hub.py
-rw-r--r-- 1 root root 2748 Apr 2 10:50 init.py
-rw-r--r-- 1 root root 340 Apr 2 10:50 manifest.json
drwxr-xr-x 2 root root 4096 Apr 2 11:51 pycache
-rw-r--r-- 1 root root 3659 Apr 2 10:50 sensor.py
-rw-r--r-- 1 root root 4090 Apr 2 10:50 service.py
-rw-r--r-- 1 root root 1578 Apr 2 10:50 services.yaml
-rw-r--r-- 1 root root 704 Apr 2 10:50 strings.json
drwxr-xr-x 2 root root 4096 Apr 2 10:50 translations
-rw-r--r-- 1 root root 1384 Apr 2 10:50 utils.py
-rw-r--r-- 1 root root 6515 Apr 2 10:50 water_heater.py

@thomasgermain
Copy link
Owner

I think you should be able to install HACS on any type of installation: https://hacs.xyz/docs/installation/installation. Anyway, this is not required if you don't want to.

You should not have any vaillant folder anymore, except if you're running version 1.4.x.

Starting with version 1.5.x, the integration has been renamed to multimatic, thus the folder inside custom_components should be named multimatic. See https://github.com/thomasgermain/vaillant-component/releases/tag/1.5.0 for migration guide.

@Wiggum127
Copy link
Author

I've migrated the integration as per the instructions mentioned on release 1.5.0.

There now appears to be a different error:

Logger: custom_components.multimatic.hub
Source: custom_components/multimatic/hub.py:104
Integration: Multimatic (documentation, issues)
First occurred: 13:23:37 (3 occurrences)
Last logged: 13:27:37

Unexpected error fetching multimatic data: None
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 180, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 140, in _async_update_data
return await self.update_method()
File "/config/custom_components/multimatic/hub.py", line 104, in _fetch_data
system = await self._manager.get_system()
File "/usr/local/lib/python3.8/site-packages/pymultimatic/systemmanager.py", line 97, in get_system
zones = mapper.map_zones(full_system)
File "/usr/local/lib/python3.8/site-packages/pymultimatic/model/mapper.py", line 219, in map_zones
zone = map_zone(raw_zone)
File "/usr/local/lib/python3.8/site-packages/pymultimatic/model/mapper.py", line 238, in map_zone
active_function = ActiveFunction[configuration.get("active_function")]
File "/usr/local/lib/python3.8/enum.py", line 387, in getitem
return cls.member_map[name]
KeyError: None

@thomasgermain
Copy link
Owner

yup, see #48 .. I'm checking with vaillant why their API doesn't return correct responses

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants