HTTP JSON API for viewing and controlling Tapo camera's privacy mode.
- Python 3.9 or later
- pip
pip install -r requirements
The application needs to be configured so that it knows what cameras it should interact with. Configuration template is provided. The configuration is set so that all cameras must have the same local credentials.
{
"user": "camera_local_user",
"password": "password",
"hosts": [
{
"host": "C200_ABCDEFG",
"name": "Foyer"
}
]
}
With the default configuration file
python tapo_camera_api.py
or with a custom configuration file
python tapo_camera_api.py my_configuration.json
Request method: GET URL: http://0.0.0.0:5020/privacy
{
"data": [
{
"host": "C200_ABCDEFG",
"privacy_enabled": true,
"name": "Foyer"
}
]
status": "OK"
}
Request method: POST URL: http://0.0.0.0:5020/privacy
{
"privacy": true
}
{
"privacy": false
}
{
"data": [
{
"host": "C200_ABCDEFG",
"privacy_enabled": true,
"name": "Foyer"
}
]
status": "OK"
}