Python API for controling Gosund smart devices
Project description
gosundpy
Control your Gosund smart devices via python code.
Install
pip install gosundpy
Prerequisites
In order to control your devices, you must register your devices using the Tuya Smart app (ios/android) and create a new Cloud Project in the Tuya IoT Platform.
Usage
import time
from gosundpy import Gosund
gosund = Gosund('username', 'password', 'access_id', 'access_key')
commands = ['turn_off', 'turn_on', 'turn_off', 'switch', 'switch', 'turn_off']
switch = gosund.get_device('12345')
for cmd in commands:
getattr(switch, cmd)()
time.sleep(1)
lightbulb = gosund.get_device('67890')
for cmd in commands:
getattr(lightbulb, cmd)()
time.sleep(1)
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
gosundpy-0.9.0.tar.gz
(5.4 kB
view details)
File details
Details for the file gosundpy-0.9.0.tar.gz
.
File metadata
- Download URL: gosundpy-0.9.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da19fb56ebb8ec0e170aeae3b5f2a3664c878fc37baecc7c14f628661755c38 |
|
MD5 | ec9f0c8ed3f274aa4dc14c3b68f29efb |
|
BLAKE2b-256 | 7a525833d3fcbe8fb40994b7063a09753c5b95987231312cad98e2f8fc2258a7 |