# jasonacox/tinytuya

Python API and command line tool for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).

Repository: https://github.com/jasonacox/tinytuya
Canonical: https://ross.abutalabs.com/products/tinytuya
Language: Python
License: MIT
License Family: permissive
Topics: tuya, pytuya, smarthome, device, python, api, pythonmodule
Last push: 2026-07-19T00:22:06+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 93, release rhythm 92, longevity 100
- inputs: {"age_days": 2190, "days_push": 46, "days_rel": 58, "gap_med": 23.5, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1720, forks 265 (observed 2026-08-28T04:05:26.628717+00:00)

## What it is
TinyTuya is a Python module and command line tool for controlling and reading the state of Tuya-compatible WiFi smart devices such as plugs, switches, and lights. It supports both direct local area network (LAN) connections and the Tuya Cloud API, covering Tuya protocols 3.1 through 3.5.

## Use cases
- control tuya smart plugs from python
- poll status of smart home devices over local network
- turn lights on and off without the tuya cloud
- manage tuya devices via the tuya cloud api
- discover tuya devices on my lan
- replace pytuya library for smart device control
- script automation for wifi smart switches

## When to choose
- you need to control Tuya WiFi smart devices programmatically from Python
- you want local LAN control of devices without relying on the cloud
- you need a drop-in replacement for the deprecated pytuya module
- you want both a Python API and a command line tool in one package

## When to avoid
- your smart devices are not Tuya-based or do not use the Tuya protocol
- you need a graphical app rather than a Python library or CLI
- you require official vendor support or guaranteed compatibility with all Tuya device categories

## Facets
- artifact type: library
- maturity: active
- function: sdk, http-client, cli, developer-tools
- domain: iot, developer-tools
- platform: python, cross-platform, cli
- tags: tuya, smarthome, iot-devices, local-network-control, cloud-api, device-control, automation

## Member repositories
- jasonacox/tinytuya (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:26.628717+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:34:04.986102+00:00, confidence not recorded.
  - readme: https://github.com/jasonacox/tinytuya (fetched 2026-08-28T04:05:26.628717+00:00, sha 69ad4ebc80ce)
  - registry_pypi: https://pypi.org/pypi/tinytuya/json (fetched 2026-08-29T11:09:50.475198+00:00, sha 479ad74bc40c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
