dotKrad / hass-fpl

FPL Component for Home Assistant
MIT License
40 stars 20 forks source link

Invalid password but it's not #44

Open agreen opened 1 year ago

agreen commented 1 year ago

Version of the custom_component

0.0.1

Describe the bug

I keep getting an "invalid password" error, but it's the same username/password I use for both the mobile app and the website. I'm in the main territory.

Debug log

2023-08-02 16:52:19.223 DEBUG (MainThread) [custom_components.fpl] Getting territory
2023-08-02 16:52:19.511 INFO (MainThread) [custom_components.fpl] Logging in

No errors logged. Just "invalid password" displayed when attempting to set up the integration.

agreen commented 1 year ago

I did add a _Logger.debug(response) right after the aiohttp.BasicAuth in the login function of FplMainRegionApiClient.py, and I got the following:

2023-08-02 17:04:14.209 INFO (MainThread) [custom_components.fpl] <ClientResponse(https://www.fpl.com/api/resources/login) [401 Unauthorized]>

I'm able to view my bill/usage information just fine with the same username/password. Happy to help in any way I can figure out what's going on here.

zoopster commented 12 months ago

have you tried to login through a browser to fpl.com and then hijack the session with the api/resources/account url? FPL has been changing their site and my most recent login led me to a 404 page interestingly enough. When I run into problems or question the data in HA I do this and dig into the api a bit.