jens-maus / RaspberryMatic

:house: A feature-rich but lightweight, buildroot-based Linux operating system alternative for your CloudFree CCU3/ELV-Charly 'homematicIP CCU' IoT smarthome central. Running as a pure virtual appliance (ProxmoxVE, Home Assistant, LXC, Docker/OCI, Kubernetes/K8s, etc.) on a dedicated embedded device (RaspberryPi, etc.) or generic x86/ARM hardware.
https://raspberrymatic.de
Apache License 2.0
1.56k stars 192 forks source link

Setup Error: Unexpected exception importing platform custom_components.homematicip_local.* #1884

Closed DennisWilken closed 2 years ago

DennisWilken commented 2 years ago

Describe the issue you are experiencing

I tried to integrate my CCU into home assistant. The connection seems to work in general. I get 3 devices ("CCU", HM-RCV-50 BidCoS-RF, HmIP-RCV-50 HmIP-RCV). However, my physical devices (currently it's only two HmIP-BSM, HmIP-eTRV-2) don't show up. I get two error messages posted below.

Describe the behavior you expected

No errors in the log, my HmIP-BSM should show up in home assistant.

Steps to reproduce the issue

Home Assistant is running on a Synology DS920+ in docker on version 2022.6.7. The CCU is based on Raspberrymatic on a Raspberry Pi 3B+ version 3.63.9.20220625. The following ports are opened on the CCU: 2010;42010;9292;49292;80;443;42001 The IP of my docker container (macvlan) is whitelisted with added callback IP. The Home Assistant(local) integration runs on version 1.12.1

What is the version this bug report is based on?

3.63.9.20220625

Which base platform are you running?

rpi3 (RaspberryPi3)

Which HomeMatic/homematicIP radio module are you using?

RPI-RF-MOD

Anything in the logs that might be useful for us?

I get two errors in my home assistant logs:

`Logger: homeassistant.loader
Source: custom_components/homematicip_local/entity_helpers.py:56
Integration: Homematic(IP) Local ([documentation](https://github.com/danielperna84/custom_homematic), [issues](https://github.com/danielperna84/hahomematic/issues))
First occurred: 2:22:00 PM (11 occurrences)
Last logged: 2:22:00 PM

    Unexpected exception importing platform custom_components.homematicip_local.number
    Unexpected exception importing platform custom_components.homematicip_local.select
    Unexpected exception importing platform custom_components.homematicip_local.sensor
    Unexpected exception importing platform custom_components.homematicip_local.siren
    Unexpected exception importing platform custom_components.homematicip_local.switch

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 18, in <module>
    from .generic_entity import HaHomematicGenericEntity, HaHomematicGenericSysvarEntity
  File "/config/custom_components/homematicip_local/generic_entity.py", line 22, 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'`

and 

` Logger: homeassistant.setup
Source: setup.py:298
First occurred: 2:22:00 PM (11 occurrences)
Last logged: 2:22:00 PM

    Unable to prepare setup for platform homematicip_local.number: Platform not found (Exception importing custom_components.homematicip_local.number).
    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.sensor: Platform not found (Exception importing custom_components.homematicip_local.sensor).
    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.switch: Platform not found (Exception importing custom_components.homematicip_local.switch).
`

Here's the diagnostics overview from HA:

`{
  "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"
      ]
    },
    "homematicip_local": {
      "version": "1.12.1",
      "requirements": [
        "hahomematic==2022.7.11"
      ]
    },

  "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": []
  }
}`

Additional information

I haven't used my CCU in roughly two years. Today, I updated it and wanted to integrate it into home assistant. I haven't checked with a fresh installation.

Answers in German are fine for me.

jens-maus commented 2 years ago

Sorry, but this looks like an issue in the "HomematicIP (local)" integration rather than in RaspberryMatic itself. So please open an issue in the integration project instead.