Koogeek LightStrip (LS1) using HomeKit Controller

Hi all,

I’ve had this Koogeek LightStrip LS1 (Wi-Fi Enabled Smart LED Light Strip - Koogeek.com ; https://www.aliexpress.com/store/product/Koogeek-2m-LED-Strip-Smart-WiFi-LED-Flexible-Strip-Light-for-Alexa-Apple-HomeKit-Google-Assistant/2930044_32842828577.html?spm=2114.12010612.8148356.6.423632c6RsfBs2 ) for a while without doing anything with it. Mainly because I wasn’t sure how to implement it in my Home Assistant setup.

After some great help and inspiration from Graham Balharrie in the Facebook-group “DrZzs Home Automation and Tech Hacks” I was able to solve my problem. Since it is a pretty good deal for the lightstrip, and comparing to my Hue-lightstrip it is as good I thought I’d share how I did it.

Target:
-Be able to control Koogeek LightStrip LS1 from Home assistant.
Setup:
-rPi3 model B running HassIO 0.74.1
How I did it:

discovery:
  enable:
    - homekit
  • Step 2: Factory rest the lightstrip by holding down the on/off-button for ~10 s (first it turns red and when it turns on again the factory reset is done).
  • Step 3: Add the lightstrip to the Koogeek App. Follow the guide on the screen. Here I ran into some issues before I realized what was wrong. So some tips. If you have dual band router, turn off the 5GHz while doing this connection (you can turn it on after the setup is done). Make sure the channel is 1-9 (I think it only works at 1-9, at first I had channel 12 and it did not want to connect).
  • Step 4: Now the lightstrip should show up in your iOS Home App (and in the Koogeek app). Check that it is working.
  • Step 5: If you are lucky there should be a message box in your Home assistant front end (the main page) where you now can configure the “LS1” (at least that’s what it was called for me).
  • Step 6: Press configure and put in the prompted HomeKit code that you find on the lightstrip (should be something like “XXX-XX-XXX”) - I pressed the button and got the message that it was already paired with another controller. So you have to remove the lightstrip from the Home App and then press submit again. After that you should now have a new light called “LS1”.

Hope this can help someone out!

1 Like

Just following up a few months on… is this still working for you? I’m about to try this with a few others. The idea is get it paired with HA, and then use the bridge to control via Home Kit. Rather than having it stuck in HomeKit and not controllable via HA. Keen to hear if this setup still works for you and anything you learnt along the way?

hi there.
having a nightmare with this one.

I have two LS1 devices and did have one of them configured in HA.

Tried to add the other and as part of efforts, I removed the original.

Now neither will accept the home app code and always claim
“This accessory is already paired to another device. Please reset the accessory and try again.”

I have reset many times, removed from koogeek and homeapp. reset home app, tried & tried but always the same.

Anyone else know what is wrong or offer any guidance?

deleted a lot of duplicate entities from the database. removed from homekit, reset light strip. restarted HA, readded to homekit and tried readding to HA. Got the following errors in the logs…

2018-11-15 10:16:06 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall configurator.configure (c:600a3c98e3ef496a9f01c70f28a3e122): configure_id=139938694427816-1, fields=code=214-87-316>
Traceback (most recent call last):
** File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1177, in _event_to_service_call**
** await service_handler.func(service_call)**
** File “/usr/local/lib/python3.6/site-packages/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/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/init.py”, line 191, in device_config_callback
*
** pairing_id)**
** File “/usr/local/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

I have same issue with LB1-20318C LightBulb.

I va this error running hassio.io 0.83.1 :

Error executing service <ServiceCall configurator.configure (c:3f56736447fb48d2b9cd8615f566f639): configure_id=1902096688-2, fields=code=xxx-xx-xxx>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1177, in _event_to_service_call
await service_handler.func(service_call)
File “/usr/local/lib/python3.6/site-packages/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/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/init.py”, line 192, in device_config_callback
pairing_id)
File “/usr/local/lib/python3.6/site-packages/homekit/protocol.py”, line 69, in perform_pair_setup
connection.request(‘POST’, ‘/pair-setup’, request_tlv, headers)
File “/usr/local/lib/python3.6/http/client.py”, line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/local/lib/python3.6/http/client.py”, line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.6/http/client.py”, line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/init.py”, line 64, in homekit_http_send
self.send(msg)
File “/usr/local/lib/python3.6/http/client.py”, line 964, in send
self.connect()
File “/usr/local/lib/python3.6/http/client.py”, line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File “/usr/local/lib/python3.6/socket.py”, line 724, in create_connection
raise err
File “/usr/local/lib/python3.6/socket.py”, line 713, in create_connection
sock.connect(sa)
socket.timeout: timed out

How Can I fix it?

still an issue on 0.85.0 :frowning:

OK so managed to get one in first time.
Found I had the ipad set as a homehub.

  • Unset as homehub on iPad
  • Check LS was not added to homekit on my phone
  • Configure Discover - Enable - Homekit
  • Restart HA
  • Enter code
    HAPPY DAYS

I need to check the second LS adds too but 50% success is better than the past couple of months!!!

it works!

Only thing now is a tendency for the LS to get out of sync with HA and start erroring…

2019-01-13 20:14:25 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.ls1 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 “/usr/local/lib/python3.6/site-packages/homekit/controller.py”, line 273, in list_accessories_and_characteristics
response = self.session.get(‘/accessories’)
File “/usr/local/lib/python3.6/site-packages/homekit/controller.py”, line 573, in get
return self.sec_http.get(url)
File “/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 65, in get
return self._handle_request(data)
File “/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 89, in _handle_request
return self._read_response()
File “/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 154, in _read_response
response.parse(decrypted)
File “/usr/local/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
2019-01-13 20:14:25 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.ls1_2 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 “/usr/local/lib/python3.6/site-packages/homekit/controller.py”, line 273, in list_accessories_and_characteristics
response = self.session.get(‘/accessories’)
File “/usr/local/lib/python3.6/site-packages/homekit/controller.py”, line 573, in get
return self.sec_http.get(url)
File “/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 65, in get
return self._handle_request(data)
File “/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py”, line 89, in _handle_request
return self._read_response()
File “/usr/local/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

any one else find these Koogeek LS1’s flaky as hell???

About to give him, turn em on and forget about automation with them. :frowning:

almost constant from boot up now :frowning:

I was finally able to configure mine and have it show up in HA. I was partially able to control it (brightness, color except red for some reason), but since the next day I only get “failed to call service”.

Log Details (ERROR)
Sat Jan 26 2019 16:35:04 GMT+0100 (Mitteleuropäische Normalzeit)

Update for light.ls1 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 "/usr/local/lib/python3.6/site-packages/homekit/controller.py", line 273, in list_accessories_and_characteristics
response = self.session.get('/accessories')
  File "/usr/local/lib/python3.6/site-packages/homekit/controller.py", line 573, in get
return self.sec_http.get(url)
  File "/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py", line 65, in get
return self._handle_request(data)
  File "/usr/local/lib/python3.6/site-packages/homekit/http_impl/secure_http.py", line 88, in _handle_request
self.sock.send(len_bytes + ciper_and_mac[0] + ciper_and_mac[1])
BrokenPipeError: [Errno 32] Broken pipe

koogeek and homekit investigations

underlying issue with docker image in hassio

Hello. Did you succeed to add smart light bulb LB1 in HA?