Features Verticals Cameras Conferences Pricing Contact Log In Get Started

TP-Link Tapo Integration Guide

Connect your TP-Link Tapo cameras to AgenticEye using RTSP, ONVIF, or the Tapo/Kasa Cloud API for flexible integration options.

RTSP ONVIF Tapo Cloud API

Supported Models

Tapo C200 Tapo C210 Tapo C310 Tapo C320WS Tapo C520WS

All Tapo cameras with RTSP and ONVIF support are compatible. The models above are fully tested with AgenticEye.

Prerequisites

Camera Account vs. Tapo Account: Tapo cameras require a separate "Camera Account" for RTSP/ONVIF access. This is not the same as your TP-Link or Tapo app login. Create this account in the Tapo app under Camera Settings > Advanced Settings > Camera Account.

Step-by-Step Integration

1

Create a Camera Account

Open the Tapo app, select your camera, and go to Settings > Advanced Settings > Camera Account. Create a username and password. This account is used for RTSP and ONVIF authentication.

Use a dedicated service account (e.g., username: agenticeye) for integration. Avoid using your personal credentials.

2

Connect via RTSP

Tapo cameras expose RTSP streams on port 554. Use the camera account credentials you just created to authenticate.

RTSP URL Format # Main stream (full resolution, higher bandwidth) rtsp://[username]:[password]@[camera-ip]:554/stream1 # Sub stream (lower resolution, reduced bandwidth) rtsp://[username]:[password]@[camera-ip]:554/stream2 # Example — Tapo C320WS main stream rtsp://agenticeye:[email protected]:554/stream1 # Example — Tapo C320WS sub stream (preview/thumbnail) rtsp://agenticeye:[email protected]:554/stream2

stream1 provides the full resolution feed (2K/4MP on C320WS) ideal for AI analysis. stream2 provides a lower resolution feed suitable for preview thumbnails or bandwidth-constrained setups.

3

Configure ONVIF (Optional)

Tapo cameras support ONVIF on a non-standard port (2020 instead of the typical 80 or 8080). ONVIF enables auto-discovery, PTZ control on supported models, and event-based integration.

ONVIF Configuration # ONVIF Device URL (note: non-standard port 2020) http://[camera-ip]:2020/onvif/device_service # Test ONVIF discovery with AgenticEye agenticeye discover --protocol onvif --port 2020 # ONVIF profile for main stream http://[camera-ip]:2020/onvif/media_service Profile: Profile_1 (main stream) Profile: Profile_2 (sub stream)
4

Test the Connection

Verify the RTSP stream is accessible from your AgenticEye server before finalizing the configuration.

Shell # Test RTSP stream with FFmpeg ffplay rtsp://agenticeye:[email protected]:554/stream1 # Verify stream details ffprobe -v quiet -print_format json -show_streams \ rtsp://agenticeye:[email protected]:554/stream1 # Test ONVIF connectivity curl -s http://192.168.1.50:2020/onvif/device_service \ -d '<?xml version="1.0"?> <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"> <s:Body> <GetDeviceInformation xmlns="http://www.onvif.org/ver10/device/wsdl"/> </s:Body> </s:Envelope>'
5

Configure in AgenticEye

Add the Tapo camera to your AgenticEye configuration file or via the dashboard.

agenticeye.yaml cameras: - name: "Backyard - Tapo C320WS" brand: tplink model: C320WS protocol: rtsp url: "rtsp://agenticeye:${TAPO_PASSWORD}@192.168.1.50:554/stream1" stream_quality: main fps: 15 resolution: 2560x1440 onvif: enabled: true port: 2020 # Non-standard Tapo ONVIF port username: "agenticeye" password: "${TAPO_PASSWORD}" agents: - type: security sensitivity: high night_mode: auto

Advanced: Tapo/Kasa Cloud API Integration

For deployments requiring remote access or cloud-based management, AgenticEye can integrate with the Tapo/Kasa cloud platform. This is useful when cameras are behind NAT or on remote networks.

Cloud API Authentication # Authenticate with TP-Link cloud curl -X POST https://wap.tplinkcloud.com \ -H "Content-Type: application/json" \ -d '{ "method": "login", "params": { "appType": "Tapo_Android", "cloudUserName": "your-tplink-email", "cloudPassword": "your-tplink-password", "terminalUUID": "agenticeye-integration" } }' # Response includes a token for subsequent API calls # Use the token to list devices and retrieve stream info
agenticeye.yaml — Cloud Mode # Tapo Cloud API configuration tapo_cloud: email: "your-tplink-email" password: "${TAPO_CLOUD_PASSWORD}" auto_discover: true refresh_interval: 300 # Re-sync every 5 minutes default_stream: main

Protocol Reference

URL Formats # RTSP Main Stream (full resolution) rtsp://[user]:[pass]@[ip]:554/stream1 # RTSP Sub Stream (low resolution) rtsp://[user]:[pass]@[ip]:554/stream2 # ONVIF Device Service (non-standard port!) http://[ip]:2020/onvif/device_service # ONVIF Media Service http://[ip]:2020/onvif/media_service # Tapo Cloud API Base https://wap.tplinkcloud.com

Troubleshooting

Camera Account vs. Tapo Account confusion

The most common integration issue. RTSP and ONVIF use the Camera Account credentials, not your TP-Link/Tapo app login. Create the Camera Account in the Tapo app under Camera Settings > Advanced Settings > Camera Account. If you forgot the Camera Account password, you can reset it from the same menu.

ONVIF connection fails on default port

Tapo cameras use ONVIF port 2020, not the standard ports 80 or 8080. Ensure your ONVIF client or AgenticEye configuration specifies port 2020 explicitly. Most ONVIF auto-discovery tools will not find Tapo cameras without specifying this port.

RTSP stream not found (404 or connection refused)

Ensure you are using the correct stream path: /stream1 or /stream2. Some older firmware versions use /h264_pcm.sdp instead. Update your camera firmware to the latest version through the Tapo app.

Authentication failures

Special characters in the Camera Account password may cause URL-encoding issues in RTSP URLs. Avoid characters like @, :, /, and # in your password, or URL-encode them properly.

Intermittent disconnections

Tapo cameras on Wi-Fi may experience brief disconnections. Assign a static IP or DHCP reservation to prevent IP changes. Position the camera within strong Wi-Fi range. Consider using the C310 or C320WS models which support Ethernet via PoE adapters for more stable connections.

Need help with your Tapo integration?

Our integration team can help you configure and optimize your TP-Link Tapo camera deployment with AgenticEye.

Contact Our Integration Team