Through Bluetooth sniffing, using this method I've been able to (semi reliably) control the SP110e controller via Homebridge.
You can find this controller for very cheap here: https://www.aliexpress.com/item/4000773623427.html?spm=a2g0o.productlist.0.0.4f09329cJ7C1H4&algo_pvid=542e757b-587f-4540-8652-2195883f1349&algo_expid=542e757b-587f-4540-8652-2195883f1349-0&btsid=0bb0622a16012309671478585ed4bd&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_
This entire guide is for Bluetooth LE libraries, and uses hexidecimal.
Service ID can be found with ffe0
. Under this is two characteristics, ffe1
and ffe2
.
Important:
Upon connection, you immediately need to write data in this order to prevent the connection from closing.
I'm not honestly sure why.
ffe2
: 01 00
ffe1
: 01 b7 e3 d5
All of these commands should be written to the ffe1
characteristics.
VV
, RR
, GG
, and BB
in this case are hex strings between 0-255.
Turn on:
fa 0e c7 aa
Turn off:
b0 4f c2 ab
Change color:
RR GG BB 1e
Control brightness:
VV ed 29 2a
Change to preset::
VV 09 fa 2c
Change speed of preset::
VV 10 34 03
I've been able to get a more complete list of commands by reverse engineering the "LED Hue" app that's provided for the SP110E.
There are a total of 14 commands.
Every command consists of 4 bytes, except for the rename command that has extra bytes at the end.
The first 3 bytes contain data and the fourth is the command byte.
For the commands that require less bytes, the unused bytes can be anything.
My device's service id is
0xFFE0
and has one characteristic0xFFE1
with a descriptor0x2902
.For my SP110E there was no need to send specific commands immediately.
Informative
CHECK_DEVICE
Get device information and calculate checksum.
Command byte: 0xD5
Data: 3 bytes
Return: 13 bytes
Example:
D7 F3 A1 D5
The checksum can be used to verify you are talking to the correct device.
The data bytes are used in calculation of the checksum.
It can be calculated using following function.
GET_INFO
This command returns the same data as CHECK_DEVICE but without the checksum.
Command byte: 0x10
Data: 0 bytes
Return: 12 bytes
Example:
00 00 00 10
Configuration
SET_IC_MODEL
Update which IC the led strip uses.
Command byte: 0x1C
Data: 1 byte
Return: 0 bytes
Example:
03 00 00 1C
SET_RGB_SEQ
Set the RGB sequence.
Command byte: 0x3C
Data: 1 byte
Return: 0 bytes
Example:
04 00 00 3C
SET_LED_NUM
Set the amount of pixels to control (1-1024).
Command byte: 0x2D
Data: 2 bytes
Return: 0 bytes
Example:
01 6A 00 2D
First byte is the most significant.
RENAME
Rename the device.
Command byte: 0xBB
Data: 1 byte + extra byte for each character
Return: 0 bytes
The first byte contains the length of the new name.
At the end of the 4byte command you add bytes that are a hexadecimal representation of the name.
For example: change name to Upstairs
08 00 00 BB 55 70 73 74 61 69 72 73
Control
LED_ON
Turn leds on.
Command byte: 0xAA
Data: 0 bytes
Return: 0 bytes
Example:
00 00 00 AA
LED_OFF
Turn leds off.
Command byte: 0xAB
Data: 0 bytes
Return: 0 bytes
Example:
00 00 00 AB
SET_STATIC_COLOR
Set a static color.
Command byte: 0x1E
Data: 3 bytes
Return: 0 bytes
The data bytes are red, green and blue (0-255).
For example: purple
00 FF FF 1E
SET_BRIGHT
Set the brightness (0-255).
Command byte: 0x2A
Data: 1 bytes
Return: 0 bytes
Example:
FF 00 00 2A
SET_WHITE
Set the brightness of the white led (If your led strip has them, 0-255).
Command byte: 0x69
Data: 1 bytes
Return: 0 bytes
Example:
FF 00 00 69
SET_MODE
Change to one of the presets (1-120, 121 is static color, other values default to 1).
Command byte: 0x2C
Data: 1 bytes
Return: 0 bytes
Example:
3F 00 00 2C
SET_SPEED
Set the speed of the preset (0-255).
Command byte: 0x03
Data: 1 bytes
Return: 0 bytes
Example:
C6 00 00 03
SET_MODE_AUTO
Change to auto mode.
Command byte: 0x06
Data: 0 bytes
Return: 0 bytes
Example:
00 00 00 06