Homekit controller support fails - 0.68

Hi, I updated to 0.68 and enabled the Homekit Controller support in configuration.yaml.

At startup, I get the following error, any hint?

Unable to install package homekit==0.6: Failed building wheel for gmpy2
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.6.1 which is incompatible.
pyatv 0.3.9 has requirement aiohttp<3,>=2.3.0, but you'll have aiohttp 3.1.3 which is incompatible.
Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-p42bkknq/gmpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-jxdlrxma/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.5/gmpy2" failed with error code 1 in /tmp/pip-install-p42bkknq/gmpy2/

See my post here: Support for control of HomeKit bulbs and switches (testing required!).

ah thanks, I ran the following in my Debian installation:
apt install libgmp-dev libmpfr-dev libmpc-dev

I got to configurator fine after, will test further.

Question; can we filter somehow what we want to bring in HA from HK or not? (to avoid having the unwanted items in HA configurator staying there)?

I think you can exclude items from Discovery using the “ignore” config directive: https://www.home-assistant.io/components/discovery/.

yes but since we’re talking about a “sub item” within homekit item in discovery, how can I exclude specific items discovered by the homekit controller?

Let’s say I just want those. After configuring it, I don’t want to be stuck with the others in my HA configurator forever… Does it make sense?

HK

my discovery section:

discovery:
  ignore:
    - apple_tv
    - songpal
  enable:
    - homekit

Now I understand! I’m not sure there’s a way to do that at the moment, but it should definitely be added as a feature.

1 Like

Hi,

In my case i’m using home assistant docker in synology, and when i start HA, i have and error about configuring homekit-controller.

imagen

If i see the logs, i have this:

2018-04-28 15:16:57 ERROR (SyncWorker_14) [homeassistant.util.package] Unable to install package homekit==0.6: Failed building wheel for gmpy2
waterfurnace 0.4.0 has requirement websocket-client>=0.46, but you'll have websocket-client 0.37.0 which is incompatible.
upsmychoice 1.0.6 has requirement beautifulsoup4==4.5.1, but you'll have beautifulsoup4 4.6.0 which is incompatible.
upsmychoice 1.0.6 has requirement python-dateutil==2.6.0, but you'll have python-dateutil 2.7.2 which is incompatible.
upsmychoice 1.0.6 has requirement requests==2.12.4, but you'll have requests 2.18.4 which is incompatible.
toonlib 1.0.2 has requirement cachetools==2.0.0, but you'll have cachetools 2.0.1 which is incompatible.
toonlib 1.0.2 has requirement requests==2.13.0, but you'll have requests 2.18.4 which is incompatible.
temperusb 1.5.3 has requirement pyusb>=1.0.0rc1, but you'll have pyusb 1.0.0b1 which is incompatible.
spotcrime 1.0.3 has requirement requests==2.12.4, but you'll have requests 2.18.4 which is incompatible.
skybellpy 0.1.2 has requirement colorlog==3.0.1, but you'll have colorlog 3.1.2 which is incompatible.
pyxiaomigateway 0.9.0 has requirement cryptography==2.1.1, but you'll have cryptography 2.2.2 which is incompatible.
python-velbus 2.0.11 has requirement pyserial==3.3, but you'll have pyserial 3.1.1 which is incompatible.
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.6.1 which is incompatible.
pysma 0.2.0 has requirement aiohttp<3,>2, but you'll have aiohttp 3.1.3 which is incompatible.
pymonoprice 0.3 has requirement pyserial>=3.4, but you'll have pyserial 3.1.1 which is incompatible.
pymata 2.14 has requirement pyserial==2.7, but you'll have pyserial 3.1.1 which is incompatible.
pyicloud 0.9.1 has requirement keyring<9.0,>=8.0, but you'll have keyring 12.0.0 which is incompatible.
pyicloud 0.9.1 has requirement keyrings.alt<2.0,>=1.0, but you'll have keyrings-alt 3.0 which is incompatible.
pyblackbird 0.5 has requirement pyserial>=3.4, but you'll have pyserial 3.1.1 which is incompatible.
pyatv 0.3.9 has requirement aiohttp<3,>=2.3.0, but you'll have aiohttp 3.1.3 which is incompatible.
nad-receiver 0.0.9 has requirement pyserial==3.2.1, but you'll have pyserial 3.1.1 which is incompatible.
myusps 1.3.2 has requirement python-dateutil==2.6.0, but you'll have python-dateutil 2.7.2 which is incompatible.
myusps 1.3.2 has requirement requests==2.12.4, but you'll have requests 2.18.4 which is incompatible.
myusps 1.3.2 has requirement selenium==2.53.6, but you'll have selenium 3.11.0 which is incompatible.
mycroftapi 2.0 has requirement websocket-client==0.44.0, but you'll have websocket-client 0.37.0 which is incompatible.
motorparts 1.0.2 has requirement beautifulsoup4==4.5.1, but you'll have beautifulsoup4 4.6.0 which is incompatible.
motorparts 1.0.2 has requirement requests==2.12.4, but you'll have requests 2.18.4 which is incompatible.
libsoundtouch 0.7.2 has requirement websocket-client>=0.40.0, but you'll have websocket-client 0.37.0 which is incompatible.
insteonplm 0.8.6 has requirement pyserial==3.2.0, but you'll have pyserial 3.1.1 which is incompatible.
hipnotify 1.0.8 has requirement requests==2.9.1, but you'll have requests 2.18.4 which is incompatible.
fixerio 0.1.1 has requirement requests==2.10.0, but you'll have requests 2.18.4 which is incompatible.
fedexdeliverymanager 1.0.6 has requirement beautifulsoup4==4.5.1, but you'll have beautifulsoup4 4.6.0 which is incompatible.
fedexdeliverymanager 1.0.6 has requirement python-dateutil==2.6.0, but you'll have python-dateutil 2.7.2 which is incompatible.
discord-py 0.16.12 has requirement aiohttp<1.1.0,>=1.0.0, but you'll have aiohttp 3.1.3 which is incompatible.
crimereports 1.0.0 has requirement requests==2.12.4, but you'll have requests 2.18.4 which is incompatible.
broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.6.1 which is incompatible.
alarmdecoder 1.13.2 has requirement pyserial==2.7, but you'll have pyserial 3.1.1 which is incompatible.
abodepy 0.13.1 has requirement colorlog==3.0.1, but you'll have colorlog 3.1.2 which is incompatible.
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-89na9ftz/gmpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-29uslc11/install-record.txt --single-version-externally-managed --prefix  --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-89na9ftz/gmpy2/
2018-04-28 15:16:57 ERROR (MainThread) [homeassistant.requirements] Not initializing homekit_controller because could not install requirement homekit==0.6
2018-04-28 15:16:57 ERROR (MainThread) [homeassistant.setup] Setup failed for homekit_controller: Could not install all requirements. 

what can i do?

I think I have the same issue as you when I tried adding a device from HK (leviton switch, HK only switch) after entering te HK code… Tried with the - and without. (BTW doc should be more specific like if we put the - or not etc…)

Curious, anyone actually got it to work? Didn’t see post about it…
I’ll do more testing to see if I can get just one working at least…

Yes, I plan to add a feature to automatically ignore any devices that have native support.

1 Like

You should add “Home Assistant” to that list. :wink: That was a fun surprise that popped into the list.

Hello, I’m running HASS.IO. Is the HomeKit controller working with this version. I get the invalid configuration errors referenced above @garvarma. I’m not sure what I need to do fix it as I can’t install dependencies in HASS.IO.

Is there a way to do this in HASS.IO?

Well, still doesn’t work for me after 0.68.1.
Testing adding a Leviton switch which is HK only (which is perfect for this feature)

Tried entering the HK code with the dashes:

Error executing service <ServiceCall configurator.configure: configure_id=140052778785480-3, fields=code=15514304>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/configurator.py", line 224, in async_handle_service_call
    call.data.get(ATTR_FIELDS, {}))
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/homekit_controller/__init__.py", line 138, in device_config_callback
    pairing_id)
  File "/srv/homeassistant/lib/python3.5/site-packages/homekit/protocol.py", line 67, in perform_pair_setup
    connection.request('POST', '/pair-setup', request_tlv, headers)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1142, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.5/http/client.py", line 975, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent

or without the dashes:

Error executing service <ServiceCall configurator.configure: configure_id=140052778785480-3, fields=code=155-14-304>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/configurator.py", line 224, in async_handle_service_call
    call.data.get(ATTR_FIELDS, {}))
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/homekit_controller/__init__.py", line 138, in device_config_callback
    pairing_id)
  File "/srv/homeassistant/lib/python3.5/site-packages/homekit/protocol.py", line 67, in perform_pair_setup
    connection.request('POST', '/pair-setup', request_tlv, headers)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/homekit_controller/__init__.py", line 47, in homekit_http_send
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.5/socket.py", line 712, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 703, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

I had an issue with homekit-controller using Hass.io, so I thought to test it out I’d use Hassbian as a test. I grabbed a new Pi and installed Hassbian. I SSH’d in and installed the deps:
sudo apt install libgmp-dev libmpfr-dev libmpc-dev

I added in the configuration.yaml entry, and things seemed to work after a reboot. I can see my Lightwave Link Plus.
I try to pair using the default included code, and it just spins and goes back to the main screen.

In the logs I can see:
Thu May 10 2018 10:33:31 GMT+0100 (BST)

Error executing service <ServiceCall configurator.configure: fields=code=xxxxxxxxx, configure_id=xxxxxxxxx>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/configurator.py", line 224, in async_handle_service_call
    call.data.get(ATTR_FIELDS, {}))
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/homekit_controller/__init__.py", line 138, in device_config_callback
    pairing_id)
  File "/srv/homeassistant/lib/python3.5/site-packages/homekit/protocol.py", line 67, in perform_pair_setup
    connection.request('POST', '/pair-setup', request_tlv, headers)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1142, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.5/http/client.py", line 975, in putrequest
    raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent

Is this a thing (not working in Hass.IO)? I just created docker images on my ubuntu VM to do this because it seemed cleaner, but I could to back to a base install if it matters?