xAAL support for Tuya protocol / Smart Life App
Project description
This package provides a gateway to control Tuya devices from xAAL network.
Tuya protocol is the common protocol used in cheap chinese outlets, smart plugs, and RGB lamps. It use the cloud base “Smart Life” mobile application (Android/IOS).
This protocol isn’t really reliable. If you can, avoid the use of Smart Life APP when this gateway is running. This should be ok, but attributes can be out of sync. The gateway polls devices state every 45 seconds but due to socket error, this can be a little longuer.
The complete guide to extract keys is there: https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md
Notes : The main issue is that tuya devices close every connection after 10 seconds.
Supported devices
The gateway supports: PowerRelays (from 1 to x relais), SmartPlugs (same as relais but with a single power-meter), lamps and RGB lamps
Configuration samples
Dimmer Lamp / LSC Smart filament
[[device_id]]
ip = 192.168.1.x
key = xxxxxxxxxxxxxxxx
type = lamp_dimmer
white_temp = 1800, 2700 # for LSC
addr = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RGB Lamp / LSC RGB1
[[device_id]]
ip = 192.168.1.x
key = xxxxxxxxxxxxxxxx
type = lamp_rgb
white_temp = 1800, 2700 # for LSC
white_temp = 3000, 6500 # for Utorch LE7
addr = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Alphawise dumb single outlet
[[device_id]]
ip = 192.168.1.x
key = xxxxxxxxxxxxxxxx
type = powerrelay
SmartPlug (single outlet) / BW-SHP6
[[device_id]]
ip = 192.168.1.x
key = xxxxxxxxxxxxxxxx
type = smartplug
SmartPlug (dual outlet) / BW-SHP7
[[device_id]]
ip = 192.168.1.x
key = xxxxxxxxxxxxxxxx
type = smartplug
dps = 1, 2 # <= 2 outlets
pmeter_dps = 18, 19, 20 # <= dps for current / power / voltage
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xaal_tuya-0.3.1.tar.gz.
File metadata
- Download URL: xaal_tuya-0.3.1.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f38713f76cec695e71948e80cfcf80e03798d009b115a5389b3094c64e5f7e2f
|
|
| MD5 |
81a4a32893ff2a418425fdca5f6de09a
|
|
| BLAKE2b-256 |
84069d23ef69cf0555b7cbe6e78db7b0e21fa38b5e5a8a17a9c23bf375d9211c
|
File details
Details for the file xaal_tuya-0.3.1-py3-none-any.whl.
File metadata
- Download URL: xaal_tuya-0.3.1-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b25700f1ef873527edae4f3c5b7aeaff68c854582eadf2ff73b8e06e64962b50
|
|
| MD5 |
36db2314ce3ee366744526d9a27f231e
|
|
| BLAKE2b-256 |
94931577da2d40d7204f654a294e67b42564193a62d38fcfac19831cb12e87c5
|