Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shtrom/tuyapi-docker
Simple tuya-cli container
https://github.com/shtrom/tuyapi-docker
docker tuya tuya-api
Last synced: 2 months ago
JSON representation
Simple tuya-cli container
- Host: GitHub
- URL: https://github.com/shtrom/tuyapi-docker
- Owner: shtrom
- Created: 2022-06-29T12:50:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-28T02:22:31.000Z (over 1 year ago)
- Last Synced: 2024-07-30T20:56:49.996Z (5 months ago)
- Topics: docker, tuya, tuya-api
- Language: Dockerfile
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple tuya-cli container
## Usage
Pre-built docker images are available from [Docker Hub](https://hub.docker.com/repository/docker/omehani/tuya-cli)
docker run --rm omehani/tuya-cli help
## Local build
Build the container.
docker build . -t tuya-cli
Then run commands as you would with [tuya-cli].
docker run --rm \
tuya-cli set \
--id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 \
--dps 20 --set true## Examples
### Getting the list of devices associated to an account
docker run --rm -it omehani/tuya-cli wizard
? The API key from tuya.com: XXX
? The API secret from tuya.com YYY
? Provide a 'virtual ID' of a device currently registered in the app: ZZZ
dead3gs75
[
{
name: 'Light',
id: 'ZZZ',
key: 'AAA'
},
...
]### Reviving Mirabella GENIO globes
As discussed in rospogrigio/localtuya#445 and rospogrigio/localtuya#491, some
versions of the Mirabella GENIO A60 9W LED GLS BK (I002605, mid-2021), at least,
get into a Zombie state when started without Internet access. Reviving them can
be done as follows.Set some environment variables.
IP=192.2.0.1
ID=xxx
KEY=yyyReset the defaults.
docker run --rm omehani/tuya-cli set --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 --dps 20 --set true
docker run --rm omehani/tuya-cli set --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 --dps 21 --set 'white'
docker run --rm omehani/tuya-cli set --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 --dps 22 --set 500
docker run --rm omehani/tuya-cli set --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 --dps 23 --set 1000
docker run --rm omehani/tuya-cli set --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 --dps 25 --set '030e0d00000000000000001f403e8'
docker run --rm omehani/tuya-cli set --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3 --dps 26 --set 0Check that everything is in order.
docker run --rm omehani/tuya-cli get --id ${ID} --key ${KEY} --ip ${IP} --protocol-version 3.3
[tuya-cli]: https://github.com/TuyaAPI/cli