fishbigger / TapoP100

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

Unable to logon to some P100 devices in the last couple of days #124

Open ADBeasley opened 11 months ago

ADBeasley commented 11 months ago

I have a few P100 switches (U.K.) that are all V2 hardware on firmware 1.1.5 Build 230324 Rel.143956 and on the same SSID with fixed IP addresses issued by the router. I am using version 0.1.2 of PyP100

Some devices I can use fine from Python 3.9 (Debian bullseye) but on a couple I just get an error at the log-on stage:

Error Code: -1501, Invalid Request or Credentials

The only change to the tapo devices since they where all working is that I have loaded the app onto my MacBook Air (M1). At least one of the failing devices has worked since this install (unsure if the others have been used since then).

The previous change to the devices was the addition of a P105 and all devices worked post this change. The P105 had its firmware updated but all other devices have been stable since they where installed - all automatic firmware updates are turned off.

Access to the devices reporting the error from the iOS app (on three devices) works fine and all report the correct status if I change it one device (or from the Python programs for the ones that are responding).

Going through previous issues I have tried reverting the software to 0.0.25 with no effect. I have also tried changing the server to https://n-wap-gw.tplinkcloud.com/ again with no effect.

I have not changed my password on the Tapo application - it is a long password of 20 characters [a-z, A-Z, 0-9 and - only] but saved in Keychain so I know its correct. Given that the password for the Python code is stored in a .env file it is the same for working devices and none working devices.

Due to physical restrictions I'm unable to reset a device for a day or so but will update the issue once I've done so.

ADBeasley commented 11 months ago

Quick update - just tried the same software on a slightly older Debian box (Raspberry Pi compared to x86) and the result is the same so it does not seem to be a recent OS update.

ADBeasley commented 11 months ago

Managed to get to one failing unit and a full reset has allowed access again :-)

  1. Remove device from app (light flashes red / green)
  2. Hold the power button down for 10-15 seconds
  3. Light goes green
  4. Relay clicks once
  5. Light starts flashing red / green
  6. Add back to the app

Software works again - very odd...

Getting to the next one will mean stripping two servers out of the rack :-(

ADBeasley commented 11 months ago

Updated instructions:

  1. Remove plug from switch (got caught and had to power down a box)
  2. Remove switch from app
  3. Relay clicks to the ON setting
  4. Add switch back into the device

Switch now allows software control again.