Skip to main content

Package to interact with a Kuando Busylight

Project description

Busylite

Python command line tool to interact with the Kuando Busylight. This is a work in progress and real rough... so use at your own risk!

Drawing a lot of inspirtion from these sources:

Install

Install via PyPi:

pip install busylite

CLI

After installing, A quick way to get up a running is with the inlcuded CLI:

busycli --help

Server App

There is also an included Flask App, to accept HTTP POST requests. Start the server:

busycli serve localhost 5000 -u spam -p eggs

And then make a POST:

curl -u spam:eggs -X POST -i http://localhost:5000/send/done

Setup

Needed to get the produt and vendor ID. Easist way to grab this was to lsusb before and after plugging in the busylight:

  • Vendor: 27bb
  • Product: 3bcd
  • ModelName: BusyLight UC Omega

Non-Root Access

Need to add a udev rule:

echo "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"27bb\", ATTRS{idProduct}==\"3bcd\", GROUP=\"$(whoami)\", OWNER=\"$(whoami)\", MODE=\"0664\"" | sudo tee -a /etc/udev/rules.d/30-busylight.rules

Test out the rules:

sudo udevadm test /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.2

Where the syspath parameter was pulled from the output of:

udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/010)

where the dev path was pulled from lsusb.

Dependencies

Need to install some things and setup an environment:

sudo apt install libusb-1.0-0-dev libudev-dev

Writing to HID

Mimicking the methodology here buffer is constructed like:

  1. Init as [0,16,0,0,0,0,0,0,128]
  2. Add fifty zeros [0]*50
  3. Append this to end: [255, 255, 255, 255, 6, 147]

Buffer positions:

  • red : 3
  • green : 4
  • blue : 5
  • sound : 8

Color Values

  • Red: 0-255
  • Green: 0-255
  • Blue: 0-255

Sound Values:

  • OpenOffice : 136
  • Quiet : 144
  • Funky : 152
  • FairyTale : 160
  • KuandoTrain : 168
  • TelephoneNordic : 176
  • TelephoneOriginal : 184
  • TelephonePickMeUp : 192
  • Buzz : 216

Volume is controlled by adding 1 to each tone: 0=MUTE, 7=MAX

The last two entries in the buffer are a checksum on the buffer:

checksum = sum(self.buffer[0:63])
self.buffer[63] = (checksum >> 8) & 0xffff
self.buffer[64] = checksum % 256

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

busylite-0.1.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

busylite-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file busylite-0.1.1.tar.gz.

File metadata

  • Download URL: busylite-0.1.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for busylite-0.1.1.tar.gz
Algorithm Hash digest
SHA256 33b9b7479ea46a62b8d99869ca276bd3d030f99404081baac34dfb712a0b9308
MD5 fb41c94ad3a2c8e7acb458bc7d5e4f66
BLAKE2b-256 b99209a70491174afb8efaf6ee550f33394ba354800a1ca618893fd86b97277f

See more details on using hashes here.

File details

Details for the file busylite-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: busylite-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for busylite-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 042864bb5f32afa19b2ffccfd6946a92294ba3b4e7b0c7f0686e6c103a6b86cf
MD5 7f59a01b01691f5f951b587db11b6354
BLAKE2b-256 f1d9d8494495f396f697df6f0db94e2f00b1562563ea53cf1a841a8bd7270b60

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