home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.14k stars 31.12k forks source link

Homekit integration doesn't load #36189

Closed damiano75 closed 4 years ago

damiano75 commented 4 years ago

The problem

No Homekit service loaded, entities are not loaded in iOS Homekit app. Already tried to remove integration from the UI and to reload it again

Environment

Problem-relevant configuration.yaml

homekit:
 auto_start: false
 filter:
    include_entities:
      - light.salotto
      - light.sala_da_pranzo
      - light.lampada_como
      - switch.oscar
      - switch.lampada_emilia
      - switch.scaldaletto
      - switch.lampada_damiano
      - device_tracker.iphone_di_antonio_4
      - device_tracker.iphonediantonio_station
      - device_tracker.iphone_di_damiano
      - device_tracker.damianostation
      - device_tracker.apple_watch_di_damiano
      - device_tracker.iphone_di_emilia
      - device_tracker.e0_89_7e_ea_0e_be
      - device_tracker.ipad_di_damiano
      - script.1541512599533
      - script.1541513036365
      - script.1541518496392
      - script.1541518768162
      - automation.spegnimento_luci
      - automation.tramonto_sala_da_pranzo
      - automation.tramonto_salotto
      - automation.tramonto_salotto_tv_on
      - automation.spegnimento_notturno_luci
      - automation.a_letto
      - binary_sensor.stato_tv
      - light.luci_camera_da_letto
      - climate.dyson
      - fan.dyson
      - camera.ezviz_360
      - camera.ezviz_admin
      - camera.ezviz_cucina

Traceback/Error logs


2020-05-27 11:23:39 ERROR (MainThread) [homeassistant.setup] Setup failed for homekit: unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 137, in _async_setup_component
    component = integration.get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 264, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 42, in <module>
    from .accessories import get_accessory
  File "/usr/src/homeassistant/homeassistant/components/homekit/accessories.py", line 8, in <module>
    from pyhap.accessory_driver import AccessoryDriver
  File "/usr/local/lib/python3.7/site-packages/pyhap/accessory_driver.py", line 46, in <module>
    from pyhap.hap_server import HAPServer
  File "/usr/local/lib/python3.7/site-packages/pyhap/hap_server.py", line 24, in <module>
    import curve25519
  File "/usr/local/lib/python3.7/site-packages/curve25519/__init__.py", line 2, in <module>
    from .keys import Private, Public
  File "/usr/local/lib/python3.7/site-packages/curve25519/keys.py", line 48
    def __str__(self):
                     ^
SyntaxError: unexpected EOF while parsing

Additional information

probot-home-assistant[bot] commented 4 years ago

homekit documentation homekit source (message by IssueLinks)

bdraco commented 4 years ago

Try reinstalling the curve25519 package.

pip3 install --upgrade --force curve25519

damiano75 commented 4 years ago

With normal ssh access to HassOS:

~ $ pip3 install --upgrade --force curve25519 -bash: pip3: command not found

It seems pip is non installed

bdraco commented 4 years ago

It might just be pip on your system

pip install --upgrade --force curve25519

damiano75 commented 4 years ago

command not found

image

bdraco commented 4 years ago

https://www.home-assistant.io/docs/installation/troubleshooting/#no-module-named-pip

damiano75 commented 4 years ago

It's HassOS, I don't think I can use pip or python...

image

bdraco commented 4 years ago

It might be easier to backup, and then reinstall then try to do the troubleshooting.

damiano75 commented 4 years ago

Ok, I need more time, I will try and give you feedbacks

damiano75 commented 4 years ago

I restored a previous snapshot (0.110.2) and then upgraded again to 0.110.3, now the issue is solved