PyTapo is an unofficial Python library designed for communication with Tapo Cameras. It facilitates interoperability by wrapping HTTP requests used to control and retrieve data from Tapo devices. The library is actively maintained, currently at version 3.4.13, and receives regular updates focused on bug fixes, performance enhancements, and support for new camera features such as dual-cam linkage.
pip install pytapoVerified import paths — ran on the pinned version, not inferred.
Initialize the `Tapo` class with your camera's IP address, username, and password, then retrieve basic device information. Ensure you use the 'Camera Account' credentials set up in the Tapo mobile application.
Always use the 'Camera Account' credentials established within the Tapo App (Settings > Advanced settings > Camera account). For some specific camera models or firmware, 'admin' with the TP-Link cloud password might be a fallback but is not the recommended method.
Install `ffmpeg` on your operating system. For example, on Ubuntu: `sudo apt-get install ffmpeg`, or on macOS: `brew install ffmpeg`.
Regularly update `pytapo` to the latest version. If using a Home Assistant integration, ensure the integration version is compatible with your `pytapo` version and camera firmware. Check the GitHub issues for known firmware-related problems.
Upgrade `pytapo` to version 3.4.5 or newer, which includes fixes for `urllib3` compatibility. Ensure your `urllib3` library is also up to date.
Ensure the camera is fully set up and initialized via the official Tapo app. Explicitly enable and configure the local 'Camera Account' within the Tapo App. Avoid using 'admin' as a local RTSP username if not explicitly supported or advised by the camera's local account settings.
Verify the host IP, username, and password. Create or use the 'Camera Account' credentials from the Tapo App (Settings > Advanced settings > Camera account). These are distinct from your TP-Link cloud account.
Complete the camera's setup process through the official Tapo mobile application. Ensure the 'Camera Account' is enabled and configured correctly. Verify network connectivity and that the camera IP is reachable.
Upgrade `pytapo` to the exact required version (Y.Y.Y) or the latest version if the integration allows. Use `pip install --upgrade pytapo` or `pip install pytapo==Y.Y.Y`.
Update `pytapo` to version 3.4.9 or later, as this specific issue was addressed in that release.