Python language bindings for Embrava BlyncLight devices.
Project description
blynclight is a Python 3 package that provides bindings for the Embrava BlyncLight family of products. These bindings have been tested on MacOS and Linux using Embrava models V30, and BLYNCUSB40S-181 USB connected lights.
Install
Install hidapi for your platform:
(rpm Linux distros)# yum install XXXX
(apt Linux distros)# apt-get install XXXX
(macOS using brew) $ brew install hidapi
pip
$ python3 -m pip install blynclight
$ python3 -m pip install git+https://github.com/JnyJny/blynclight.git
Install the Cloned Repository
$ git clone https://github.com/JnyJny/blynclight.git
$ cd blynclight
$ python3 -m pip install .
Development
$ pip install poetry
$ git clone https://github.com/JnyJny/blynclight.git
$ cd blynclight
$ poetry shell
$ ..
Uninstall
$ python3 -m pip uninstall blynclight
Usage
Once installed, the BlyncLight is yours to command!
from blynclight import BlyncLight
light = BlyncLight.get_light()
red, blue, green = (255, 0, 0), (0, 255, 0), (0, 0, 255)
light.color = green # the light is off and green
light.on = True # the light is on and green
light.flash = True # the light is on, flashing and green
light.color = red # the light is on, flashing and red
light.flash = False # the light is on and red
light.bright = False # the light is on, dim and red
light.color = blue # the light is on, dim and blue
light.bright = True # the light is on and blue
light.on = False # the light is off and blue
Several command line interfaces are provided when blynclight is installed:
- blync
Provides command-line access to all light attributes.
- fli
Flashes the light.. impressively.
- rainbow
Smoothly transitions the color of the light in a rainbow pattern.
- throbber
Menacingly ramps the color intensity and then recedes. Over and over again.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for blynclight-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3dbcbf298c0b5b71910aa7b2d8aa01485e5f1ab362f646bc7d751a9f9632517 |
|
MD5 | 2916e5adb84373a083713c8fc87904c2 |
|
BLAKE2b-256 | 4213255b7040bf0cb6ee991c264ebd01054fbce153d13ab57277a2272f251d74 |