
Yeelight is a brand of Wi-Fi smart LED lighting — single-color bulbs, tunable white and full-color bulbs, LED strips, and ceiling lights — published by Qingdao Yeelink (part of the Xiaomi ecosystem). Every LAN-enabled Yeelight product speaks the same JSON-RPC Inter-Operation Protocol on TCP port 55443, so a single TapHome template covers the whole family.
The template exposes a dimmer device: brightness (0–100 %) and on/off control with smooth transitions. The current color mode and color temperature are reported as read-only service attributes. TapHome communicates with the bulb directly on the local network — no Yeelight cloud account is required once LAN Control is enabled on the bulb.
Hardware connection
Yeelight bulbs are powered from the standard mains (typically E27, E14, GU10 or 24 V strip power supply depending on product). No wiring is needed between TapHome and the bulb — all communication goes over Wi-Fi. The bulb must be on the same LAN / VLAN as the TapHome CCU, because the JSON-RPC protocol has no authentication and no encryption, and the traffic is never routed through the Yeelight cloud.
The Yeelight LAN protocol is unencrypted. Do not expose TCP port 55443 to the public internet, and place the bulbs on a trusted network segment — anyone with access to the LAN can issue commands to the bulb.
Configuration
Enabling LAN Control
LAN Control (also called Developer Mode in some regions) is disabled on the bulb by default. Without it, TCP connections on port 55443 are refused.
- Open the Yeelight mobile app and pair the bulb to the local Wi-Fi network with the SmartConfig / QuickConnect procedure if it has not been paired yet.
- Select the target bulb in the app.
- Tap the settings icon (top-right) and open LAN Control (in some firmware versions labelled Developer Mode).
- Toggle LAN Control to ON.
- Note the bulb’s IP address — it is shown in the Yeelight app device info or can be read from the router’s DHCP lease table.
Once LAN Control is enabled, the bulb listens on TCP port 55443 and periodically advertises itself over UDP multicast 239.255.255.250:1982.
Network configuration
- IP address — the TapHome template does not auto-discover bulbs. Assign a static IP or a DHCP reservation in the router so the bulb’s address does not change after a lease renewal.
- Same LAN segment — the TapHome CCU and the bulb must be in the same broadcast domain. If Wi-Fi and wired clients are on separate VLANs, add a firewall rule that allows TCP 55443 between them.
Import parameters
During template import in TapHome the user enters three values:
| Parameter | Description | Default |
|---|---|---|
ipAddress | IP address of the Yeelight bulb on the LAN | 192.168.0.1 (placeholder — replace with real IP) |
Port | TCP control port on the bulb | 55443 |
Internal poll interval | How often the template sends get_prop (in milliseconds) | 10000 (10 s) |
The default port 55443 is the standard Yeelight LAN Control port and should not be changed unless the bulb has been configured for a non-standard port.
Between polls, the template also reacts to
propsnotifications that the bulb pushes whenever its state changes. In practice this means brightness / on-off changes made from the Yeelight app, a wall switch adapter, or another Home Assistant instance appear in TapHome almost immediately, without waiting for the next poll.
Device capabilities
Dimmer (brightness and on/off)
The template exposes a single dimmer device. On every poll it sends:
| |
and parses the response result[0] (brightness 1–100, divided by 100 to the TapHome 0.0–1.0 range) and result[1] ("on" / "off").
Writes are translated to two JSON-RPC commands:
- If the target level is greater than zero, the template sends
set_power ["on","smooth",300]followed byset_bright [round(level*100),"smooth",500]. The 300 ms power transition and 500 ms brightness transition give a soft fade instead of a hard step. - If the target level is zero, the template sends
set_power ["off","smooth",300].
The dimmer also consumes props notifications pushed by the bulb (power / brightness) so external state changes are reflected in TapHome without waiting for the next poll cycle.
Color mode and color temperature (read-only)
Two module-level service attributes are read via a separate get_prop request (id=981):
- Color mode —
RGB,Temperature, orHSV, decoded from the numericcolor_modeproperty (1 / 2 / 3) using aSWITCHexpression in the listener script. - Color temperature — Kelvin value reported as
"{ct}K"(for example"4000K"). Only meaningful when the bulb is in Temperature mode. Typical model-dependent range: 1700–6500 K for color bulbs and strips, 2700–6500 K for ceiling lights (ceiling3 caps at 6000 K).
Both attributes are diagnostic only — the template does not switch color mode or write a new color temperature.
Additional capabilities
The Yeelight LAN protocol also exposes RGB and HSV color control (set_rgb, set_hsv), color temperature control (set_ct_abx), color-flow programs (start_cf / stop_cf), predefined scenes (set_scene), on-device sleep timers (cron_add), background-light control on dual-light fixtures (bg_* methods) and music mode (set_music, a reverse-TCP channel that bypasses the rate limit). None of these are implemented by the current TapHome dimmer template — users who need full color or effects must extend the template or use the native Yeelight app in parallel.
Color, color temperature and scenes can be added in a future template update on top of the same TCP channel. The PacketParser read / write scripts can be extended to send
set_ct_abx,set_rgb, orset_scenewithout changing the import parameters.
Troubleshooting
Bulb does not respond to commands
Verify LAN Control is enabled on the bulb (Yeelight app → bulb settings → LAN Control). Without it, the bulb refuses all TCP connections on port 55443.
Confirm the bulb IP in the Yeelight app or in the router’s DHCP lease table, and make sure it matches the
ipAddressimport parameter. Yeelight bulbs do not keep a fixed IP by default — the lease may have expired and the IP changed.Assign a static IP or DHCP reservation to the bulb to prevent the address from drifting.
Check that the TapHome CCU and the bulb are on the same LAN / VLAN and that TCP
55443is not blocked by a firewall between them.Test connectivity manually:
telnet {bulb-ip} 55443and send a raw request followed by\r\n:1{"id":1,"method":"get_prop","params":["bright","power"]}A valid bulb replies with
{"id":1,"result":["<bright>","<power>"]}.
Read error: client quota exceeded
Each TCP connection to a Yeelight bulb is limited to 60 commands per minute, and the bulb accepts at most 4 concurrent connections in total (144 commands/minute across the whole LAN). If another system polls the bulb at the same time — Home Assistant, a Yeelight cloud session, a custom script — the combined traffic can trigger rate-limit errors that are reported in TapHome as Read error: client quota exceeded.
- Disable or slow down other integrations that share the bulb.
- Keep the TapHome poll interval at the default
10000ms or higher. Oneget_propplus twoset_*writes per change stays well under the 60 cmd/min quota. - Close unused
telnetdebug sessions — they count against the 4-connection limit.
Color temperature service attribute shows “error”
The Color mode and Color temperature service attributes read color_mode and ct from the bulb. If the bulb is a mono (white-only) model that does not support tunable white, or if it is currently in RGB or HSV mode, the ct value is not meaningful and the listener script reports "error" for Color temperature. This is expected behaviour and does not indicate a fault.
Changes made in the Yeelight app are not reflected
The template reacts to props notifications pushed by the bulb, so external changes normally appear within a second. If they do not:
- The notification may have arrived while the TCP socket was being re-established — the next poll (default 10 s) will resynchronize.
- Some older firmware versions only push notifications when a command is actively sent. Upgrade the bulb firmware from the Yeelight app.
- The bulb may have hit the 4-connection limit — reduce the number of concurrent clients on the LAN.
