Adding Tuya Cameras to Home Assistant via WebRTC
Home Assistant is a local home automation system that runs on Linux OS, it can support IoT devices from different brands or manufacturers. This article shows you how to add Tuya security cameras to the Home assistant via WebRTC. Normally users can add the cameras through the ONVIF component provded by the Home Assistant. However, this integration has video latency problem. WebRTC can support real time video streaming without latency.
As usual, running the Tuya Smart / Smart Life app on your smartphone, then tapping “setting” to find the ONVIF menu. Enabling the ONVIF connection and set a new password for it.
Install WebRTC Camera component
Method 1. HACS > Integrations > Plus > WebRTC > Install
Method 2. Manually copy webrtc folder from latest release to /config/custom_components folder.
Note: you need to restart your Home assistant after the installation.
Add WebRTC Camera component
Clicking "Settings" > "Devices@Services" > "Add INTEGRATION", Search "WebRTC Camera"
Add WebRTC Camera to Dashboard
Pressing "F5" on keyboard to refresh the page (otherwise you can't find the card.
Clicking "Edit Dashboard" > "ADD CARD" > scroll down and find "Custom: WebRTC Camera".
Manually type camera information then click "SAVE" to compelte.
Tuya Camera RTSP URL Path
RTSP stream url rtsp://admin:[email protected]:8554/main rtsp://admin:[email protected]:8554/sub
RTSP URL path explanation:
- admin: default username, can’t be changed
- password: onvif connection password, not the password for the app
- 192.168.1.127: local IP address of your Tuya camera
- 8554: rtsp port number
- main/sub: main stands for main stream (1920x1080), sub stands for sub stream (640x480).