-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tapo.cloudLogin get Error: Unexpected Error Code: -20004 #22
Comments
+1 also observed that one and have no clue what it is about |
Same for me. |
Obviously TP-Link blocked request from specific UUID's and there's only a specific one used in the code. It supposed to be the UUID from your own account. I guess the only way to found out the number is by checking the requests sent to TP-Link from the TP App, i not yet found time for this. I just tested the request and sent a random number for the uuid. |
When you call `cloudLogin` to log in to the TP-Link API, you have to send a `terminalUUID`. At the moment, this is hard-coded, and is triggering a `-20004` error: ```json {"error_code":-20004,"msg":"API rate limit exceeded"} ``` This switches to generate a new terminal UUID on each call using the `uuid` npm package, which gets around this rate limiting issue. Fixes dickydoouk#22.
I've fixed this in #24 by automatically generating a UUID on each request, rather than using the hard-coded one - we just need to wait for @dickydoouk to have the time to review it 😊 If you want to give my changes a try in the mean time, then you can install my version of the package by running |
It works for me. Thank you :) |
Today I just got the error after call tapo.cloudLogin always got error message Error: Unexpected Error Code: -20004 and cannot login, not sure what error -20004 code mean?
Could you please check this error? hope we can fix it
The text was updated successfully, but these errors were encountered: