Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 2.66 KB

File metadata and controls

84 lines (65 loc) · 2.66 KB
name sp656e-led-control
description Use when the user asks to control LED lights, change light color, turn lights on/off, set lighting effects, adjust brightness, or interact with the SP656E/SP638E BanlanX LED controller

SP656E LED Control

Control the SP656E (SP638E) BanlanX LED strip controller over BLE from the CLI.

Tool Location

/Users/tadejpolajnar/Documents/Projects/Work/sp656e-cli/sp656e.py

Prerequisites

  • BanlanX app must be disconnected (BLE allows only 1 connection)
  • Bluetooth must be enabled on this Mac
  • bleak Python package installed (pip3 install bleak)

Quick Reference

Action Command
Turn on python3 sp656e.py on
Turn off python3 sp656e.py off
Status python3 sp656e.py status
Set color (hex) python3 sp656e.py color ff0000
Set color (rgb) python3 sp656e.py color 0,255,0
Color + brightness python3 sp656e.py color 0000ff --level 128
Brightness python3 sp656e.py brightness 200 (0-255)
Effect python3 sp656e.py effect <mode> <id>
Speed python3 sp656e.py speed 5 (1-10)
Length python3 sp656e.py length 50 (1-150)
Direction python3 sp656e.py direction --reverse
Loop python3 sp656e.py loop --enable
List effects python3 sp656e.py effects (no BLE needed)
Raw bytes python3 sp656e.py raw "53 50 00 01 00 01 01"
Scan timeout python3 sp656e.py --scan-timeout 20 <cmd>
Skip scan python3 sp656e.py -a FACED1ED-BA2B-1D92-BB96-E80827D90232 <cmd>

Device Address

Known BLE address: FACED1ED-BA2B-1D92-BB96-E80827D90232 (use with -a to skip scan and connect faster).

Effect Modes

Mode ID Name Example effects
3 Dynamic Color 1=Rainbow, 9=Red/Yellow Fire, 0x92=Gradient
4 Dynamic White 1=Breath, 2=Stars, 3=Meteor
5 Sound Color 1=Rhythm Spectrum, 18=Party, 17=Heartbeat

Run python3 sp656e.py effects for the full list with IDs.

Common Patterns

Set a mood: Turn on, set color, adjust brightness:

python3 sp656e.py on
python3 sp656e.py color ff6600 --level 180

Party mode: Sound-reactive effect:

python3 sp656e.py on
python3 sp656e.py effect 5 18
python3 sp656e.py speed 7

Ambient rainbow:

python3 sp656e.py on
python3 sp656e.py effect 3 1
python3 sp656e.py speed 3
python3 sp656e.py length 80

Troubleshooting

  • No device found: Disconnect BanlanX app first, ensure device is powered
  • Connection fails: Try adding --scan-timeout 20
  • Permission denied (exit 134): Grant Bluetooth permission to the terminal app in System Settings > Privacy & Security > Bluetooth