Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/and3rson/vie

An unofficial Python library for controlling VIE SHAIR headphones.
https://github.com/and3rson/vie

audio bluetooth gattlib vie-shair

Last synced: 24 days ago
JSON representation

An unofficial Python library for controlling VIE SHAIR headphones.

Awesome Lists containing this project

README

        

# vie

An unofficial Python library for controlling VIE SHAIR headphones.

# requirements

- `pybluez` - for device discovery
- `gattlib` - for ATT support

# manager app included

![Screenshot](http://i.imgur.com/LZd6p5j.png)

**Note**: you'll likely need to run `manager.py` as root.
**Note**: you'll need to use Python 2 because gattlib seems to be unfriendly with Gtk3...

# example

```python
from vie import VIE

# Create VIE instance
vie = VIE()

# You can find the device automatically (may be slow and inaccurate):
vie.find_device()
# OR provide a MAC address manually (faster):
vie.force_device('FC:A8:9A:80:9D:72')
# NOTE: You'll likely get *two* "VIE SHAIR" devices detected.
# You should only use the one that is NOT detected as a headset.

# Connect to the device
vie.connect()

# Set LED color
vie.set_led_color(VIE.LEDColor.RED)
vie.set_led_color(VIE.LEDColor.GREEN)
vie.set_led_color(VIE.LEDColor.BLUE)
vie.set_led_color(VIE.LEDColor.YELLOW)
vie.set_led_color(VIE.LEDColor.WHITE)

# Set equalizer values with default bands (60 Hz, 500 Hz & 6 KHz)
vie.set_eq([6, 0, -6])
# OR set equalizer values with custom bands (e. g. 125 Hz, 250 Hz & 16 KHz)
vie.set_eq([-6, 0, 6], [VIE.EqBand1.FREQ_125_HZ, VIE.EqBand2.FREQ_250_HZ, VIE.EqBand3.FREQ_16_KHZ])

```

# about

All values used here were reverse-engineered from
an Android app source code & Bluetooth snooping log.

Reversed & written by Andrew Dunai.

The license is MIT.

# contribution

I'm open to ideas, suggestions & contributions.