Skip to main content

Python language bindings for Embrava BlyncLight devices.

Project description

Latest version released on PyPi Apache license version 2.0 Python Versions

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 an Embrava V30 USB connected light.

Install

  1. Install hidapi for your platform:

(rpm Linux distros)# yum install XXXX
(apt Linux distros)# apt-get install XXXX
(macOS using brew) $ brew install hidapi
  1. pip

$ pip3 install blynclight
  1. Clone the repo

$ git clone https://github.com/JnyJny/blynclight.git
$ cd blynclight; pip3 install -e .

Uninstall

$ pip3 uninstall blynclight

Usage

Once installed, the BlyncLight is yours to command!

from blynclight import BlyncLight

light = BlyncLight.first_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

More examples can be found in the contrib directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blynclight-0.4.6.tar.gz (17.0 kB view hashes)

Uploaded Source

Built Distribution

blynclight-0.4.6-py3-none-any.whl (19.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page