Skip to main content

Python API for controling Gosund smart devices

Project description

gosundpy

PyPI version PyPI - Downloads

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


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.4.0.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file gosundpy-0.4.0.tar.gz.

File metadata

  • Download URL: gosundpy-0.4.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for gosundpy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f4f5f7462ef92bca37cdcc29cd95962e002d26d02d77b3cb27a8da9e6bd90be0
MD5 707ecc81a708feb718e4a156573c5897
BLAKE2b-256 f3b97cbb168ddd7de3caf03ede497fa5a1afa496b6d1dce03df2481f9d24b391

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page