<!-- Canonical page: https://reversedwithai.com/p/tuya-ble-rgb-bulb-mac-control-claude -->
Canonical page: https://reversedwithai.com/p/tuya-ble-rgb-bulb-mac-control-claude

# Decoded a Tuya Bluetooth RGB bulb's beacon protocol with Claude and drove it from a Mac

> An app-only bulb, controlled from a Mac after decoding its checksum.

Lucho asked Claude how the app-only RGB bulbs worked. Together they found a Tuya beacon protocol, worked out its sequence number and checksum from iPhone captures, and controlled the bulb from a Mac script.

## Key facts

- Target: Tuya Bluetooth beacon RGB bulb
- Category: Firmware and hardware
- Platform: Bluetooth LE, macOS
- Models: Claude
- Tools: Claude, Python
- Outcome: Works
- Checks: Source available: not reported; Repro steps: not reported; Real hardware: yes; Verified by others: not reported
- Author: [Lucho](https://x.com/luchoalfonso_)
- Added: 2026-10-18
- Updated: 2026-10-18
- Sources reviewed: 2026-10-18 (editor)

## What was done

Lucho had cheap RGB bulbs that could only be controlled from the vendor app. Lucho opened Claude and asked to understand how they worked, and the two ended up reverse engineering the bulb's Bluetooth protocol until Lucho's Mac could control it directly, with no app and no phone.

### How it was done

They found that the bulb used a Tuya beacon protocol. They captured the packets the iPhone sent, worked out how the sequence number behaved and found how the checksum was calculated. Claude then wrote a small Python script that builds and sends the beacon packets from the Mac. A screenshot from the session shows Claude confirming the Mac controls the bulb, then sending the nine remaining unidentified commands in order, a few seconds apart, so Lucho could see what each one does.

### Results

The bulb responds to packets sent from the Mac script, as shown in the post's video. Lucho says the work was done out of curiosity and taught a lot along the way. The post shares no code, and the bulb's model is not named.

## Questions about Tuya Bluetooth beacon RGB bulb

### What is the Tuya Bluetooth beacon RGB bulb project?

Lucho asked Claude how the app-only RGB bulbs worked. Together they found a Tuya beacon protocol, worked out its sequence number and checksum from iPhone captures, and controlled the bulb from a Mac script. It is listed under Firmware and hardware for Bluetooth LE, macOS.

### Which AI model was used on Tuya Bluetooth beacon RGB bulb?

The entry names Claude. The tools named alongside are Claude and Python.

### Did the AI reverse engineering of Tuya Bluetooth beacon RGB bulb work?

Its author reports that it works. Checks recorded: real hardware yes.

## Sources

- [Write-up](https://x.com/luchoalfonso_/status/2108200739495362718)

Figures are reported by the author and not measured by this site, except the commit history. Entry drafted with AI from the linked sources and checked against them.

Cite as: Lucho (2026). Decoded a Tuya Bluetooth RGB bulb's beacon protocol with Claude and drove it from a Mac. Reversed with AI. https://reversedwithai.com/p/tuya-ble-rgb-bulb-mac-control-claude
