RobertD502 / home-assistant-petkit

Home Assistant integration for PetKit devices
MIT License
213 stars 32 forks source link

Incorrect authentication. Are your credentials correct? #96

Closed aleksman-piter closed 1 week ago

aleksman-piter commented 1 week ago

I have Petkit Pura Max, after the last update of the plugin, after deleting the hub in the integration, when creating a new one, an error: "Incorrect authentication. Are your credentials correct?" auth At the same time, the login to the application is carried out with the same password. If you roll back to the state before deleting the hub, the integration works correctly, but when rebinding the deodorization device, it disappeared from the sensors and buttons. perhaps these are unrelated errors

RobertD502 commented 1 week ago

Please share anything that is logged as the authorization message you showed in the UI is a general message for the end user - the log will have more details.

Also, I'm a bit confused as the deodorizer part of your issue was kind of thrown into the mix there - would you mind expanding on what steps you are taking and what happens during each step? This will help me understand what exactly is the issue.

aleksman-piter commented 1 week ago

Please tell me which logs to provide, I have never had to collect them in the home assistant before. According to the sequence, the authorization error appeared after deleting and reinstalling the petkit extension. The odor error appeared after reconnecting the pure max to the petkit cloud, the device was reset and reconnected to the cloud, after which the status and management disappeared.

aleksman-piter commented 1 week ago

to collect logs, I can repeat the steps several times.

RobertD502 commented 1 week ago

Your logs are found in settings --> system --> Logs.

aleksman-piter commented 1 week ago

home-assistant_2024-11-13T19-21-52.645Z.log

RobertD502 commented 1 week ago

PetKit's servers are returning a 122 Error which is seen with invalid authentication.

If you want me to look into it, send me a direct message on discord with the account details (change the password to a temporary password and, once I am done investigating, you can change the password back).

aleksman-piter commented 1 week ago

It seems that the issue was solved with authorization by resetting the caches in the petkit application and changing the password to another one, with a significantly higher level of complexity. Thanks for decrypting the error from the PetKit's servers.
the mistake was not in the integration, but in my crooked hands. Please transfer to the solved status. PS. I am grateful to you for the operational support and the integration you have developed.