Skip to Content
Protocol Reference

Protocol Reference

PropertyValue
TransportTCP
Port55443
EncodingUTF-8 plain text, no encryption
Message delimiter\r\n
DiscoverySSDP over UDP multicast
Rate limit~10 commands/sec (TCP mode)

LAN control must be explicitly enabled in the Yeelight mobile app: Device → Settings → LAN Control

Official PDF spec (incomplete): Yeelight Inter-Operation Spec (PDF) 


Device Discovery (SSDP)

Devices are discovered via SSDP (UPnP-style multicast).

M-SEARCH request — send as UDP to 239.255.255.250:1982:

M-SEARCH * HTTP/1.1\r\n HOST: 239.255.255.250:1982\r\n MAN: "ssdp:discover"\r\n ST: wifi_bulb\r\n \r\n

Response — HTTP/1.1 headers:

HeaderExampleDescription
Locationyeelight://192.168.1.5:55443IP and port for TCP connection
id0x000000000484af7dUnique device identifier (hex)
modellamp15Logical model name (not hardware SKU)
nameMy Light BarUser-assigned name
poweronCurrent power state
bright100Current brightness (1–100)
ct4000Current color temperature (Kelvin)
rgb16711680Current RGB as integer
supportget_prop set_power ...Space-separated list of supported methods

The support field is the authoritative source for what commands a device accepts.


Command Format

Request

{ "id": 1, "method": "set_bright", "params": [50, "smooth", 500] }

Response (success)

{ "id": 1, "result": ["ok"] }

Response (error)

{ "id": 3, "error": { "code": -1, "message": "unsupported method" } }

Push notifications (unsolicited)

{ "method": "props", "params": { "power": "on", "bright": "75" } }

Sent by the device whenever state changes from any source (physical button, another app, etc.).


Capability System

Capability detection is based on which methods appear in the support SSDP field. The model field identifies the logical device type — see Devices for the full compatibility matrix.

GroupMethodsCapability
Colorset_rgb, set_hsvMain channel supports RGB
Color tempset_ct_abxMain channel supports CT
Flowstart_cf, stop_cfMain channel supports animations
Backgroundbg_set_power, bg_set_rgbDevice has a background channel
Music modeset_musicTCP music mode supported
Segmentset_segment_rgbPer-side control (lamp15-specific)
UDP/Chromaudp_sess_new, udp_chroma_sess_newRazer Chroma integration

Flow Animations

start_cf(count, action, flow_expression) bg_start_cf(count, action, flow_expression)
ParameterValues
count0 = infinite, N = repeat N times
action0 = restore, 1 = stay on last frame, 2 = turn off
frameduration_ms, mode, value, brightness (mode: 1=RGB, 2=CT, 7=sleep)

Example — rainbow loop on background channel:

{ "method": "bg_start_cf", "params": [0, 0, "2000,1,16711680,100,2000,1,65280,100,2000,1,255,100"] }

Music Mode

Music mode inverts the TCP connection direction: the lamp connects to a server the app opens. This removes the rate limit entirely.

{ "method": "set_music", "params": [1, "192.168.1.100", 54321] }

Gated by set_music in the support field. lamp15 does not support music mode.

In music mode: the lamp does not respond to get_prop — state must be tracked locally.


UDP / Chroma Mode

For high-frequency reactive effects, the device has an undocumented UDP session mode used by Razer Synapse internally.

MethodDescription
udp_sess_newOpen a UDP session
udp_sess_keep_aliveKeepalive
udp_chroma_sess_newRazer Chroma variant

Protocol not publicly documented.


LAN Control Availability

Xiaomi forced Yeelight to remove LAN control from some devices post-sale:

DeviceFirmwareStatus
bslamp22.0.6_0041+Removed. Toggle disappeared from Yeelight app.

“lan control feature is from yeelight, xiaomi company takes it as a risk, so we have to disable it.” — Yeelight staff, forum.yeelight.com Feb 2021 

Always use SSDP discovery as the source of truth — if a device doesn’t respond to M-SEARCH, LAN is either disabled or removed.


For the full command method reference see Commands Reference.

Last updated on