KooGeek P1EU - Homekit Code Error


#1

HI… i´m trying to join Koogeek P1EU with Home Assistant, but always have the same error when send the Homekit password: “Incorrect HomeKit code for P1EU. Please check it and try again.”
the HomeKit code is ok.

any idea???
Thanks…


#2

Getting the same error here. First I got an error message that said This accessory is already paired to another device. Please reset the accessory and try again. I tried removing the P1EU from the Home app on iOS, and now I get your error instead.

I’ve set the log level to debug for HomeKit, and it only seems to give me a “socket timeout” error.


#3

Did you manage to get anywhere on this? I’m having the same issue with a Hunter Ceiling Fan (SIMPLEconnect). Discovered fine, complained about already being paired. Removed from pairing and now states: “Incorrect HomeKit code for SIMPLEconnect. Please check it and try again.”

Every so often it produces an error to the log:
ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall configurator.configure (c:4e18e69df8c246b5a7038c0328add736): configure_id=140274408875736-4, fields=code=(homekit code)>
Traceback (most recent call last):
File “/usr/src/app/homeassistant/core.py”, line 1177, in _event_to_service_call
await service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/configurator.py”, line 221, in async_handle_service_call
call.data.get(ATTR_FIELDS, {}))
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/homekit_controller/init.py”, line 195, in device_config_callback
pairing_id)
File “/config/deps/lib/python3.6/site-packages/homekit/protocol.py”, line 94, in perform_pair_setup
resp = connection.getresponse()
File “/usr/local/lib/python3.6/http/client.py”, line 1331, in getresponse
response.begin()
File “/usr/local/lib/python3.6/http/client.py”, line 297, in begin
version, status, reason = self._read_status()
File “/usr/local/lib/python3.6/http/client.py”, line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), “iso-8859-1”)
File “/usr/local/lib/python3.6/socket.py”, line 586, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

Edit: The exception only occurs if I try to use a delimiter (-) between the numbers of the HomeKit code. No log entry if I just try the code (with or without spaces)


#4

I’m getting the same error with my KooGeek too, running latest home assistant (0.84.6) and saying that the code provided is not recognised.

Edit: my issue is with the KooGeek LS1 Light Strip.


#5

For reference there seems to be a solution here but it didn’t work for me.


#6

I tryed to extend the timeout and it worked.
But i get a new error

Sun Jan 06 2019 23:13:03 GMT+0100 (Centraleuropæisk normaltid)

homekit_controller: Error on device update!
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/init.py”, line 251, in update
data = self._accessory.get_json(’/accessories’)
AttributeError: ‘HKDevice’ object has no attribute ‘get_json’


#7

Experiencing the same issue, making the koogeeks pretty uselsess in a hassio setup. Anyone has any workaround?


#8

After updating HASS its working… but after a couple of hours it stops responding with this error:


2019-01-11 17:03:08 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.p1eu_4 fails
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 221, in async_update_ha_state
await self.async_device_update()
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/init.py”, line 197, in update
data = pairing.list_accessories_and_characteristics()
File “/config/deps/lib/python3.6/site-packages/homekit/controller.py”, line 273, in list_accessories_and_characteristics
response = self.session.get(’/accessories’)
File “/config/deps/lib/python3.6/site-packages/homekit/controller.py”, line 573, in get
return self.sec_http.get(url)
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 65, in get
return self._handle_request(data)
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 89, in _handle_request
return self._read_response()
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 131, in _read_response
data = self.sock.recv(exp_len)
socket.timeout: timed out


Then after HASS reboot it works again for some time ?


#9

How did you even add it to hass?

Adding it to home app and removing it and then trying to add it to hass is not working for me…
“Incorrect HomeKit code for P1EU. Please check it and try again.”


#10

I did not have a problem adding it to hass after the update. It accepting my code. Do you remember to use - in the code ?


#11

Thanks, after update it worked, finally… Thanks… You still having issues with it?


#12

What version?
still not working

Thanks…


#13

I also got some issues with the koogeek items (3x switch.p1eu & 1x switch.kh02cn). After some time the items may lose the connection or whatever. They are unreachable over the frontend, the switch immediately turn from on to off or reversed after operated. They appear as ON in the Home app, but won’t react to any action. If I restart HASS (0.85 via Synology Docker) it’s working for a period of time, but then still runs in the same error.

Blockquote
Update for switch.p1eu_2 fails
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity.py”, line 221, in async_update_ha_state
await self.async_device_update()
File “/usr/src/app/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/homekit_controller/ init .py”, line 197, in update
data = pairing.list_accessories_and_characteristics()
File “/config/deps/lib/python3.6/site-packages/homekit/controller.py”, line 273, in list_accessories_and_characteristics
response = self.session.get(’/accessories’)
File “/config/deps/lib/python3.6/site-packages/homekit/controller.py”, line 573, in get
return self.sec_http.get(url)
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 65, in get
return self._handle_request(data)
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 89, in _handle_request
return self._read_response()
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 154, in _read_response
response.parse(decrypted)
File “/config/deps/lib/python3.6/site-packages/homekit/http_impl/response.py”, line 38, in parse
self._raw_response += part
TypeError: can’t concat bool to bytearray

EDIT:
updated to 0.85.1 = same error