Package: pykulersky
Library to control Brightech Kuler Sky Bluetooth LED smart lampsFree software: Apache Software License 2.0FeaturesDiscover nearby bluetooth devicesGet light colorSet light colorCommand line usagepykulersky ships with a command line tool that exposes the features of the library.$pykulerskydiscoverINFO:pykulersky.discovery:Starting scan for local devices
INFO:pykulersky.discovery:Discovered AA:BB:CC:00:11:22: Living Room
INFO:pykulersky.discovery:Discovered AA:BB:CC:33:44:55: Bedroom
INFO:pykulersky.discovery:Scan complete
AA:BB:CC:00:11:22: Living Room
AA:BB:CC:33:44:55: Bedroom$pykulerskyget-colorAA:BB:CC:00:11:22INFO:pykulersky.light:Connecting to AA:BB:CC:00:11:22
INFO:pykulersky.light:Got color of AA:BB:CC:00:11:22: (0, 0, 0, 255)'>
000000ff$pykulerskyset-colorAA:BB:CC:00:11:22ff000000INFO:pykulersky.light:Connecting to AA:BB:CC:00:11:22
INFO:pykulersky.light:Changing color of AA:BB:CC:00:11:22 to #ff000000$pykulerskyset-colorAA:BB:CC:00:11:22000000ffINFO:pykulersky.light:Connecting to AA:BB:CC:00:11:22
INFO:pykulersky.light:Changing color of AA:BB:CC:00:11:22 to #000000ffUsageDiscover nearby bluetooth devicesimportasyncioimportpykulerskyasyncdefmain():lights=awaitpykulersky.discover(timeout=5)forlightinlights:print("Address:{}Name:{}".format(light.address,light.name))asyncio.get_event_loop().run_until_complete(main())Turn a light on and offimportasyncioimportpykulerskyasyncdefmain():address="AA:BB:CC:00:11:22"light=pykulersky.Light(address)try:awaitlight.connect()awaitlight.set_color(0,0,0,255)awaitasyncio.sleep(5)awaitlight.set_color(0,0,0,0)finally:awaitlight.disconnect()asyncio.get_event_loop().run_until_complete(main())Change the light colorimportasyncioimportpykulerskyasyncdefmain():address="AA:BB:CC:00:11:22"light=pykulersky.Light(address)try:awaitlight.connect()whileTrue:awaitlight.set_color(255,0,0,0)# Redawaitasyncio.sleep(1)awaitlight.set_color(0,255,0,0)# Greenawaitasyncio.sleep(1)awaitlight.set_color(0,0,0,255)# Whiteawaitasyncio.sleep(1)finally:awaitlight.disconnect()asyncio.get_event_loop().run_until_complete(main())Get the light colorimportasyncioimportpykulerskyasyncdefmain():address="AA:BB:CC:00:11:22"light=pykulersky.Light(address)try:awaitlight.connect()color=awaitlight.get_color()print(color)finally:awaitlight.disconnect()asyncio.get_event_loop().run_until_complete(main())Changelog0.5.5 (2023-04-07)Support CI for bleak 0.200.5.4 (2022-05-03)Unpin test dependencies0.5.3 (2021-11-23)Support CI for bleak 0.130.5.2 (2021-03-04)Use built-in asyncmock for Python 3.8+0.5.1 (2020-12-23)Include default timeout on all API calls0.5.0 (2020-12-19)Refactor from pygatt to bleak for async interface0.4.0 (2020-11-11)Rename discover method to make behavior clear0.3.1 (2020-11-10)Fix connected status after broken connection0.3.0 (2020-11-10)Add workaround for firmware bug0.2.0 (2020-10-14)Remove thread-based auto_reconnect0.1.1 (2020-10-13)Always raise PykulerskyException0.1.0 (2020-10-09)Initial release0.0.1 (2020-10-09)Fork from pyzerprocCreditsThanks toUri Shakedfor an incredible guide toReverse Engineering a Bluetooth Lightbulb.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.