Python module to control Vesync WiFi power outlets
## Installation
```
pip3 install vesync-outlet
```
## Usage
```
from vesync_outlet import Vesync
hashpw = hashlib.md5(password.encode('utf-8')).hexdigest()
vesync = Vesync(username, hashpw)
devices, response = vesync.get_outlets()
for d in devices:
data, response = vesync.turn_on(d['id'])
data, response = vesync.turn_off(d['id'])
```
## Methods
The methods below return a tuple. The first element is the payload data.
If this entry is None, check results in the response object for errors.
### get_devices()
Get all wifi-switch outlet devices from Vesync api.
Arguments: none
Returns: ( payload, requests.response )
### turn_off(id)
Switch an outlet to OFF.
Arguments: the device ID
Returns: ( payload, requests.response )
### turn_on(id)
Switch an outlet to ON.
Arguments: the device ID
Returns: ( payload, requests.response )
Metadata
Release files for vesync-outlet 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vesync-outlet-0.1.1.tar.gz | 3.3 kB | Without provenance | Details for vesync-outlet-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vesync_outlet-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for vesync_outlet-0.1.1-py3-none-any.whl |
Total release size: 7.8 kB
Release files / vesync-outlet-0.1.1.tar.gz
| Download URL | vesync-outlet-0.1.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f8a3dc5be2c2d8ff35d4ff121f06b72ba2902fc3614cbceb5b87602fe6774fa
|
|
BLAKE2b-256 checksum How to use checksums |
c11c665a2adb59a6dfaac13c07c34d6fbf01d5c1b59e58550e22e716f9b992ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Release files / vesync_outlet-0.1.1-py3-none-any.whl
| Download URL | vesync_outlet-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a92d01dea5148d2e07bf1867ce625aea0638ba477302ac95c5bbd73323aa91c
|
|
BLAKE2b-256 checksum How to use checksums |
a1f3101b19a568a0890c024ccb8ab4c2bb5e7ca393a63d252339bd19c4280230
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Security for vesync-outlet 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.