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

empty result for logs #349

Open rluvaton opened 1 year ago

rluvaton commented 1 year ago

I get empty logs result while in the device debugging in the Tuya website I see logs

import tinytuya
import colorsys
import time
import json

c = tinytuya.Cloud(
        apiRegion="eu", 
        apiKey="key", 
        apiSecret="secret", 
        apiDeviceID=device_id)

print('Device logs:')
logs = c.getdevicelog(device_id, size=3, max_fetches=4)
print( json.dumps(logs, indent=2) )
uzlonewolf commented 1 year ago

My guess is either:

a) there are no events in the default 1-day time range (to increase, set start=-7 for 7 days, or set both start and end to a Unix timestamp)

or b) the Instruction mode is set to "Standard Instruction" and there are no non-filtered events (to change, follow https://github.com/jasonacox/tinytuya/discussions/284#discussioncomment-4953888 and change it to "DP Instruction")

rluvaton commented 1 year ago

a. had logs (as I said I see them in the dashboard b. tried and did not worked