jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
879 stars 159 forks source link

TinyTUYA: Device read failed #359

Open shakisha opened 1 year ago

shakisha commented 1 year ago

Hello,

i have got a lot of errors about reading a device, what else can I do to ignore or dig in?

The error is:

"TinyTUYA: Device read failed:"

The device is a pool heater.

jasonacox commented 1 year ago

Hi @shakisha - Try to power cycle the device if it was working in the past. Also, you can turn on debug mode to help troubleshoot:

For command line functions:

python3 -m tinytuya scan -debug

For scripts:

import tinytuya

tinytuya.set_debug(True)

d = tinytuya.OutletDevice(
      dev_id=DEVICEID,
      address=DEVICEIP,
      local_key=DEVICEKEY,
      version=3.3)
print(d)

print(" > Fetch Status < ")
data = d.status()
print(data)