Closed Syrooo closed 1 year ago
A exemple of my local test:
from tinytuya import *
# Connect to Tuya Cloud
c = Cloud(
apiRegion="eu",
apiKey="KEY",
apiSecret="SECRET")
# Select a Device ID to Test
id = "DEVID" #tv
# Send Command - Turn on switch
commands = {
'commands': [
{
"code": "Volume-"
}
]
}
print("Sending command...")
result = c.sendcommand(id,commands,uri='devices/')
print("Results\n:", result)
Thanks for this @Syrooo ! Nice addition.
Thanks for this @Syrooo ! Nice addition.
You are welcome
This change included in v1.12.1 (see https://pypi.org/project/tinytuya/1.12.1/ and https://github.com/jasonacox/tinytuya/releases/tag/v1.12.1).
Hello, I have an infrared tuya device. I tryied to control my TV with tinytuya, it did not work (smart life app is working ofc). So I look into https://iot.tuya.com/cloud/ > my app > devices > debug device > device debugging and look the API commands send by the javascript .
All of that for this little change with URI=iot-03/devices/DEVID/commands if does not work, with URI=devices/DEVID/commands it works.
I hope it will help some other persons.