fishbigger / TapoP100

A module for controlling the TP-Link Tapo P100 Plugs
MIT License
567 stars 139 forks source link

turnOffWithDelay fails for anything over 9 seconds (P100) #70

Open dantchapman opened 2 years ago

dantchapman commented 2 years ago

turnOffWithDelay fails with the error: raise Exception(f"Error Code: {errorCode}, {errorMessage}") Exception: Error Code: -1003, JSON formatting error

def logonPlug():
  p100 = PyP100.P100("x.x.x.x", me@here.com, "xxxx") #Creating a P100 plug object
  p100.handshake() #Creates the cookies required for further methods
  p100.login() #Sends credentials to the plug and creates AES Key and IV for further methods
  return p100
p = logonPlug()
p.turnOffWithDelay(30)

tunOnWithDelay seems to work. Is this a feature of the plug itself p100?

dantchapman commented 2 years ago

Hi all, would anyone be able to help? I’m trying to use delayed power off to support a controlled shutdown of a remote pi.