danielperna84 / hahomematic

Python 3 Interface for Home Assistant to interact with HomeMatic devices
MIT License
136 stars 21 forks source link

Setup problem: Unexpected exception importing platform custom_components.homematicip_local.* #546

Closed DennisWilken closed 2 years ago

DennisWilken commented 2 years ago

custom_component/hahomematic version (if applicable): 1.12.1

Home Assistant version (if applicable): 2022.6.7

CCU version:

Problem-relevant configuration:

Do you use tls? yes Do you use callback? yes, but shouldn't be necessary Do you use username and password? yes Which interfaces do you use (hmip/bidcos/wired)? hmip

Describe the bug

After installation I get two error messages (see below). The integration sucessfully connects to my CCU but only adds 2 devices and 1 service (HmIP-RCV-50 HmIP-RCV-1, HM-RCV-50 BidCoS-RF, "CCU"). I have two Homematic IP devices (HmIP-eTRV-2, HmIP-BSM) connected to my CCU which are not transfered to Home Assistant.

To Reproduce

Screenshots (if applicable) grafik

Relevant HA log entries (full log)

This error originated from a custom integration.

Logger: homeassistant.loader
Source: custom_components/homematicip_local/entity_helpers.py:56
Integration: Homematic(IP) Local (documentation, issues)
First occurred: 2:36:18 PM (10 occurrences)
Last logged: 2:36:19 PM

Unexpected exception importing platform custom_components.homematicip_local.button
Unexpected exception importing platform custom_components.homematicip_local.cover
Unexpected exception importing platform custom_components.homematicip_local.siren
Unexpected exception importing platform custom_components.homematicip_local.select
Unexpected exception importing platform custom_components.homematicip_local.climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 618, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 635, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/homematicip_local/binary_sensor.py", line 19, in <module>
    from .generic_entity import (
  File "/config/custom_components/homematicip_local/generic_entity.py", line 23, in <module>
    from .entity_helpers import get_entity_description
  File "/config/custom_components/homematicip_local/entity_helpers.py", line 56, in <module>
    "FREQUENCY": HmNumberEntityDescription(
TypeError: __init__() got an unexpected keyword argument 'native_unit_of_measurement'

Second Error:

Logger: homeassistant.setup
Source: setup.py:298
First occurred: 2:36:18 PM (11 occurrences)
Last logged: 2:36:19 PM

Unable to prepare setup for platform homematicip_local.cover: Platform not found (Exception importing custom_components.homematicip_local.cover).
Unable to prepare setup for platform homematicip_local.siren: Platform not found (Exception importing custom_components.homematicip_local.siren).
Unable to prepare setup for platform homematicip_local.select: Platform not found (Exception importing custom_components.homematicip_local.select).
Unable to prepare setup for platform homematicip_local.climate: Platform not found (Exception importing custom_components.homematicip_local.climate).
Unable to prepare setup for platform homematicip_local.number: Platform not found (cannot import name 'RestoreNumber' from 'homeassistant.components.number' (/usr/src/homeassistant/homeassistant/components/number/__init__.py)).

Diagnostic Information (available on every device)

{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2022.6.7",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.9.12",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "4.4.180+",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.26.0",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "pyscript": {
      "version": "1.3.3",
      "requirements": [
        "croniter==1.3.4",
        "watchdog==2.1.6"
      ]
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "spotcast": {
      "version": "v3.6.29",
      "requirements": [
        "spotify_token==1.0.0"
      ]
    },
    "volkswagencarnet": {
      "version": "v4.4.58",
      "requirements": [
        "pytz",
        "volkswagencarnet==4.4.53"
      ]
    },
    "homematicip_local": {
      "version": "1.12.1",
      "requirements": [
        "hahomematic==2022.7.11"
      ]
    },
    "nodered": {
      "version": "1.0.9",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "homematicip_local",
    "name": "Homematic(IP) Local",
    "config_flow": true,
    "documentation": "https://github.com/danielperna84/custom_homematic",
    "issue_tracker": "https://github.com/danielperna84/hahomematic/issues",
    "requirements": [
      "hahomematic==2022.7.11"
    ],
    "ssdp": [
      {
        "manufacturer": "EQ3",
        "manufacturerURL": "http://www.homematic.com"
      }
    ],
    "zeroconf": [],
    "homekit": {},
    "dependencies": [],
    "codeowners": [
      "@danielperna84",
      "@SukramJ"
    ],
    "iot_class": "local_push",
    "loggers": [
      "hahomematic"
    ],
    "version": "1.12.1",
    "is_built_in": false
  },
  "data": {
    "config": {
      "entry_id": "289c6a102b7498e56bde6deed95cf56f",
      "version": 1,
      "domain": "homematicip_local",
      "title": "CCU",
      "data": {
        "instance_name": "CCU",
        "host": "192.168.1.20",
        "username": "**REDACTED**",
        "password": "**REDACTED**",
        "tls": true,
        "verify_tls": false,
        "callback_host": "192.168.1.110",
        "callback_port": null,
        "json_port": null,
        "interface": {
          "HmIP-RF": {
            "port": 42010
          },
          "BidCos-RF": {
            "port": 42001
          },
          "VirtualDevices": {
            "port": 49292,
            "path": "/groups"
          }
        }
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": "58A9A7096B",
      "disabled_by": null
    },
    "platform_stats": {},
    "devices": []
  }
}

Expected behavior

I wouldn't expect the errors in the log. Second, I would expect the devices connected to the CCU to be added to home assistant.

Additional context

Today, I wanted to start using my CCU after I have stopped using it like two years ago. I haven't checked if a fresh installation solves the problem.

Homeassistants runs on a docker on a Synology DS920+. It got its own IP address via macvlan.

SukramJ commented 2 years ago

This release requires HA 2022.7