I have a Wipro smart bulb behind my monitor. It connects to Wi-Fi, and I control it through Smart Life. Before that, I used the Wipro app.

But I kept coming back to one question.

Why should changing a light in my own room depend on an internet connection?

The phone and the bulb are on the same network. There should be a shorter path than going through somebody else’s servers. I already run Home Assistant in my homelab, so I wanted the bulb there, controlled locally, with an API my scripts and agents could use too.

This is how we traced that path. No opening the bulb, no firmware flashing, and no custom bridge running beside Home Assistant.

First, make sure it is actually the bulb#

The starting point was an entry in my router’s client list: an IP address and a MAC address. That was a lead, not proof.

We checked that the device responded and that the Linux neighbour table mapped the address to the expected MAC. The MAC vendor prefix belonged to Tuya Smart Inc. A bounded connection check also found TCP port 6668 open.

That suggested Tuya hardware underneath the Wipro branding. It did not tell us the exact chip or physical model.

TinyTuya discovery gave us more useful evidence. The device advertised protocol version 3.3, encryption enabled, a device ID, and a product identifier. A short packet capture contained seven broadcast announcements referring to that same device.

We inspected the capture with REA backed by TShark, then decoded the discovery announcements using TinyTuya’s existing decoder.

Finding a local protocol is not the same as having permission to control it.

The announcements identify the device. They do not hand out its local encryption key.

The cloud was needed for setup, not each command#

This is the distinction that made the setup work.

We used Tuya Local , a third-party Home Assistant integration. This is not the built-in Tuya cloud integration, and it is not the separate LocalTuya project despite the similar names.

Its Smart Life-assisted setup let me approve account access by scanning a QR code. From there, the integration could retrieve the device information and local key. The account’s bulb ID matched the one we had already observed on the LAN.

So there were two different paths:

Account approval and local control are separate pathsDuring setup, the owner approves Smart Life account access so Home Assistant can obtain the local key. During normal use, Home Assistant communicates directly with the bulb over encrypted TCP port 6668.Setup: owner-approved account accessSmart Life approvalowner scans QRAccount device dataID + local keyHome AssistantNormal control: inside the LANHome AssistantTuya LocalWipro bulbTuya protocol 3.3encrypted TCPport 6668No Smart Life cloud API call required for each light command

The local key went into Home Assistant’s protected configuration and my password vault. It does not belong in a blog post, a Git repository, or an agent’s general memory.

This was protocol investigation using existing open-source work, not breaking encryption or discovering a new exploit. TinyTuya and Tuya Local already do the difficult protocol work.

A connected bulb is not necessarily a correctly mapped bulb#

Before changing Home Assistant, we took a native backup. We installed Tuya Local release 2026.9.2, checked the configuration, and restarted Core.

The next part was choosing the device profile.

Tuya devices expose numbered properties called datapoints. On this bulb, datapoint 20 was power, 21 was mode, 22 was brightness, 23 was white temperature, and 24 held colour data.

The integration translates those into normal Home Assistant light controls. A similar-looking profile can still interpret a value differently, including reversing the temperature mapping.

Rather than take the first suggested match, we selected rgbcw_lightbulb because its declared product identifier and datapoint types matched the actual device.

The result was one ordinary entity: light.behind_monitor_bulb.

Then we tested the path, not just the dashboard#

A light appearing in Home Assistant was not enough.

We sent power, brightness, colour, and white-temperature commands, then read the reported state back. A request for 4500 K, for example, came back as approximately 4501 K, consistent with conversion into the device’s temperature scale.

We also reloaded the integration and confirmed it reconnected. Finally, we restored the original visible brightness and white setting.

During the control tests, a capture on the Home Assistant VM’s network bridge recorded 39 frames directly between Home Assistant and the bulb on TCP port 6668.

That was the useful evidence. The commands had a real LAN path, not just a working button on a web page.

The bulb does not need its own REST API#

I also wanted scripts and AI agents to use it. That does not require another service.

The bulb speaks encrypted Tuya protocol. Home Assistant already provides the authenticated REST API and WebSocket interface around it.

One local controller for the dashboard, automations and agentsA browser, automation or authorized agent uses Home Assistant. Tuya Local translates Home Assistant light actions into encrypted commands sent to the bulb on the LAN.Browser / automation / authorized agentHome Assistantlight.behind_monitor_bulb → Tuya LocalWipro bulb on Wi-FiHA UI / authenticated APITuya LAN TCP 6668

For an external client, a command is just an authenticated request to Home Assistant:

POST /api/services/light/turn_on
Authorization: Bearer <HOME_ASSISTANT_TOKEN>
Content-Type: application/json

{"entity_id":"light.behind_monitor_bulb","brightness_pct":20}

The agent does not need the bulb’s encryption key. Home Assistant owns that connection. The API stays private, and access still needs authentication.

That also leaves room for things like a light indication when an agent finishes a task. The control interface exists now; that particular automation is still an idea.

Local control is not the same as a complete offline test#

Normal light control now runs over the LAN without a Smart Life cloud request for each action. The vendor app is no longer needed for those Home Assistant commands.

But we have not yet tested a prolonged internet outage or a full cold restart with the bulb’s WAN access blocked. Stock firmware can still contact its vendor, and a capture filtered to local traffic does not prove otherwise.

Those are separate checks. I do not want to call something fully offline just because one local command worked.

Power, Wi-Fi, and Home Assistant are still dependencies. So is a working local way to reach Home Assistant if public DNS or an external sign-in service is unavailable. Resetting or re-pairing the bulb may also change its key.

What we have proved is narrower, and still useful: the hardware already has a working local control interface, and Home Assistant can use it for the controls we tested.

The interesting part is that we did not need to turn the bulb into a different device.

We needed to find the interface it already had.


References