Skip to main content

Python package to control BlinkStick USB devices.

Project description

BlinkStick Python interface to control devices connected to the computer.

What is BlinkStick? Check it out here:

http://www.blinkstick.com

Requirements

  • Python

  • PyUSB

  • grapefruit - package for color manipulations

  • pyusb - package to access USB devices

  • psutil - only for example-cpu.py

  • websocket-client - only for example-connect.py to connect to BlinkStick.com

Installation

Install all required packages with pip:

[sudo] pip install blinkstick

If you would like to run the example scripts, you may also need to install the extra dependencies

[sudo] pip install psutil websocket-client

If websocket-client fails to install, please make sure you run the following command:

sudo apt-get install python-dev

Replace python-dev with python2.7-dev if you are installing on Raspberry Pi.

Description

Description of files:

  • blinkstick.py - main BlinkStick class definition

  • example-info.py - displays information of each BlinkStick

  • example-infoblock.py - read/write info block sample

  • example-off.py - turn all blinksticks off

  • example-random.py - set random color to all BlinkSticks

  • example-cpu.py - displays CPU usage with a BlinkStick (transitions from green as 0% to red as 100%)

  • example-connect.py - sample code to connect to BlinkStick.com and control it remotely

Running examples:

python example-info.py

Permission problems

If the script returns with an error

Access denied (insufficient permissions)

You can either run the script with sudo, for example:

sudo python example-info.py

Or you can add a udev rule to allow any user to access the device without root permissions with this single command:

echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"20a0\", ATTR{idProduct}==\"41e5\", MODE:=\"0666\"" | sudo tee /etc/udev/rules.d/85-blinkstick.rules

Reboot computer after you have added the command and all users will have permissions to access the device without the need of root permissions.

Maintainers

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

BlinkStick-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file BlinkStick-0.1.0.tar.gz.

File metadata

  • Download URL: BlinkStick-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for BlinkStick-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd93e781463782287b7cfa34dd29e40b12af12121dcbd140e8f423d266fd7ae7
MD5 7df606a7c2d2e94c7a63191908b3c358
BLAKE2b-256 a8b31cf37e3b1777d4ce733062b7e90229fe5ea8ce9b2bec787b4b7e0e49dcdc

See more details on using hashes here.

Supported by

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