# tuya-ipc-p2p-sdk: Python camera client for Tuya’s P2P protocol

> tuya-ipc-p2p-sdk implements a Python client for Tuya IPC cameras’ native P2P video protocol. It logs in through the mobile gateway, exchanges MQTT signaling, connects through a TCP relay with KCP conversations, authenticates a media channel, and decrypts and reassembles MJPEG frames. The implementation draws on a byte-level protocol reference in the author’s companion Go client.

- Type: Case study
- Targets: Protocol
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-11-06
- Added to the catalog: 2026-11-08
- Original resource: <https://github.com/roquerodrigo/tuya-ipc-p2p-sdk>
- Primary source: <https://github.com/roquerodrigo/tuya-ipc-p2p-sdk/blob/58c5e6530bc9e34f1aad75b595feb6e381ab304a/README.md>
- Catalog page: <https://awesomerea.org/resources/tuya-ipc-p2p-sdk-case/>
- Record JSON: <https://awesomerea.org/resources/tuya-ipc-p2p-sdk-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/tuya-ipc-p2p-sdk-case/index.md)

## Requirements & limits

- **Prerequisites:** Python 3.12 or newer and credentials for the account owning the camera are required.
- **Limits:** Live validation covers MJPEG hardware and the us region; H264 cameras and other regions remain untested.
- **Limits:** The public API is alpha and may change across 0.x releases.
- **License:** MIT license.

## Primary sources

1. <https://github.com/roquerodrigo/tuya-ipc-p2p-sdk/blob/58c5e6530bc9e34f1aad75b595feb6e381ab304a/README.md>

## More in Protocols

- [SYNA8002: reconstructing a ThinkPad fingerprint reader's SPI protocol](https://awesomerea.org/resources/x1-tablet-gen3-fingerprint-case/index.md) · Case study
- [fx_lcd_software: reconstructing ID-COOLING FX display transfers](https://awesomerea.org/resources/fx-lcd-software-case/index.md) · Case study
- [ti83-link: reconstructing TI-83 Plus link-port transfers](https://awesomerea.org/resources/ti83-link-case/index.md) · Case study
- [catbus99: reconstructing Epomaker TH99 Pro screen control over USB-HID](https://awesomerea.org/resources/catbus99-case/index.md) · Case study
- [OpenWatch: reconstructing the LJ736/LY736D smartwatch BLE client](https://awesomerea.org/resources/openwatch-ly736d-case/index.md) · Case study
- [Quntis Monitor Light for ESPHome: reconstructing RF control](https://awesomerea.org/resources/quntis-monitor-light-esphome-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
