Unofficial Python library for local Bluetooth LE control of Desky® Standing Desks.
Project description
desky-ble
Unofficial Python library for local Bluetooth LE control of Desky® Standing Desks.
This standalone client library provides a robust, asynchronous interface for interacting with Desky desk controllers. It handles all low-level BLE communication, including real-time height monitoring, preset management, and automatic detection of common controller variants (specifically those utilizing Lierda and Peilin chipsets).
Designed for interoperability, this library is built to integrate seamlessly with platforms like Home Assistant, enabling local, cloud-free automation of your workspace.
Supported controllers
| Variant | BLE Service UUID |
|---|---|
| Lierda 1 | 0000ff12-0000-1000-8000-00805f9b34fb |
| Lierda 2 | 0000fe60-0000-1000-8000-00805f9b34fb |
| Peilin | 88121427-11e2-52a2-4615-ff00dec16800 |
Installation
pip install desky-ble
Requires Python 3.13+.
Quick start
import asyncio
from bleak import BleakScanner
from desky_ble import DeskyBleClient, DeskState
async def main():
device = await BleakScanner.find_device_by_name("Desky")
def on_state(state: DeskState):
print(f"Height: {state.height_cm} cm, Moving: {state.is_moving}")
client = DeskyBleClient(device, state_callback=on_state)
await client.connect()
await client.request_status()
await client.move_up()
await asyncio.sleep(2)
await client.stop()
await client.disconnect()
asyncio.run(main())
Features
Motion control
move_up()/move_down()— continuous movementstop()— stop any movementmove_to_height(raw)— move to a specific height (raw value = cm × 10)
Memory presets
recall_memory(slot)— recall a saved preset (slots 1–4)save_memory(slot)— save current height to a preset
Desk settings
set_brightness(value)— LED display brightness (0–100)set_led_color(value)— LED colour (1–7)set_lighting(value)— under-desk lighting (0=off, 1=on)set_vibration(value)— vibration feedback (0=off, 1=on)set_lock(value)— child lock (0=off, 1=on)set_anti_collision(value)— anti-collision sensitivity (1–3)set_touch_mode(value)— touch mode (0=one-press, 1=hold)set_unit(value)— display unitset_reminder(minutes)— sit/stand reminder intervalclear_limits()— clear upper/lower height limits
State tracking
The DeskState object is updated in real-time via BLE notifications:
state = client.state
state.height_cm # Current height in cm
state.height_raw # Raw height value
state.is_moving # Whether the desk is moving
state.lock_status # Child lock (0=off, 1=on)
state.brightness # Display brightness (0-100)
state.led_color # LED colour (1-7)
state.vibration # Vibration feedback (0=off, 1=on)
state.lighting # Under-desk lighting (0=off, 1=on)
state.anti_collision # Anti-collision sensitivity (1-3)
state.has_limits # Whether height limits are set
Settings persistence
After reconnect, call restore_settings() to re-apply any settings that the desk may have reset.
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file desky_ble-0.1.3.tar.gz.
File metadata
- Download URL: desky_ble-0.1.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d13ed53dc4dc39b92cee4b51136d2892c2e2d831117ba9bad72829ecc4bda5c8
|
|
| MD5 |
d5e59368696dea91c993791d1cbdd4ce
|
|
| BLAKE2b-256 |
abd7994013e04af9b534c5447c2c008701aa4e6216e515f47e9fe01b890f7d77
|
File details
Details for the file desky_ble-0.1.3-py3-none-any.whl.
File metadata
- Download URL: desky_ble-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f62d9b92387ca5091114359d67488cf2e30ccf8f6c0e825cf7c5f05e3b87332
|
|
| MD5 |
429c68f93f349bc030131a1406e86ae2
|
|
| BLAKE2b-256 |
c3ae423cd6189f356e1f7d87b4b44f36ed8f143c430d998f3d0a64c5cded0a0b
|