A Python library for Tapo sockets.
Project description
Taposockets
A python library for accessing Tapo smart sockets
Install required libraries
pip install taposocket
Other tools required
Usage
import os
from dotenv import load_dotenv
from taposockets import P100, P115
if __name__ == "__main__":
load_dotenv()
p100 = P100(os.environ.get("address"), os.environ.get("user"), os.environ.get("password"))
p115 = P115(os.environ.get("address"), os.environ.get("user"), os.environ.get("password"))
p100.turn_on()
p100.turn_off()
p100.toggle_state()
p100.turn_on_with_delay(10)
p100.turn_off_with_delay(10)
print(p100.get_device_info())
print(p100.get_device_name())
print(p115.get_energy_usage())
Metics Grapf (Prometheus + Grafana)
cd metrics && docker-compose up
http://192.168.2.169:3010 # Grafana
http://192.168.2.169:9090 # Prometheus
http://192.168.2.169:8989 # Custom Prometheus Metrics
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
taposockets-1.1.2.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file taposockets-1.1.2.tar.gz
.
File metadata
- Download URL: taposockets-1.1.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fa6a405c6fb6df01fe3f527e9cf79eebabc95987852ce0c3041c301cd278568 |
|
MD5 | 8e74e82ef14e7e2c8c217a10fb63474a |
|
BLAKE2b-256 | 48e6b79442bba7e2071d20eac4a947e90c3be0578dfcd5f6c53055ea3138492a |
File details
Details for the file taposockets-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: taposockets-1.1.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63feded5bd6deff5497fa846e49f7f1cbf612e3a943ef338d478caa086cc6e17 |
|
MD5 | 5bf01092dc40eb359d5ab14a3fec20db |
|
BLAKE2b-256 | ecf34ff634f8e46686585cf0adbcc981c45f53a820aee14df60491f329b8d05e |