-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cannot authenticate with blueair server #55
Comments
More detail.
Getting invalid tokens or request timeout messages. |
the error you have in the stack isn't about passwords, it is about timeouts. maybe you have a firewall blocking your traffic? |
A couple of things to mention here.
Do you have any other ideas of things I can try to figure it out? |
I'm getting the same error. It was working great until we had a power outage this morning and now am seeing this. Logger: homeassistant.config_entries Traceback (most recent call last): |
I've finally started to see this too, but it is intermittent so might take a few days to track down |
Don’t know if it would be helpful but the only way I get it to resolve after a reboot is to disable and then re enable the integration.
…On Wed, Dec 20, 2023 at 21:44, Brendan Dahl ***@***.***(mailto:On Wed, Dec 20, 2023 at 21:44, Brendan Dahl <<a href=)> wrote:
I've finally started to see this too, but it is intermittent so might take a few days to track down
—
Reply to this email directly, [view it on GitHub](#55 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/A4KF42VWDS6BH46CY23MER3YKOPCJAVCNFSM6AAAAABAT53BZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVGM4TQNZUGM).
You are receiving this because you commented.Message ID: ***@***.***>
|
My integration installation has never succeeded. I just tried the disable/re-enable method and it still doesn't seem to authenticate properly. |
I think the blue air servers are just overwhelmed and often time out, every time you reload or disable/re-enable the integration just tries again, sometimes retrieving an auth token completes those methods are just allowing it to retry. I doubt we can fix this, I'll try to look into more graceful retry methods in ha but hopefully blue fixes their servers soon |
1.8.0 should wrap the error in a way that allows home assistant to gracefully retry to expo backoff etc when the login server times out based on what I observed in while developing this fix my guess is the pool of api servers has one broken server without a health check so it isn't being removed from the pool even though it is broken. I assume blueair will fix this but no idea when, but 1.8.0 should manage the symptoms until then. |
You’re awesome
…On Wed, Dec 20, 2023 at 22:30, Brendan Dahl ***@***.***(mailto:On Wed, Dec 20, 2023 at 22:30, Brendan Dahl <<a href=)> wrote:
1.8.0 should wrap the error in a way that allows home assistant to gracefully retry to expo backoff etc when the login server times out
based on what I observed in while developing this fix my guess is the pool of api servers has one broken server without a health check so it isn't being removed from the pool even though it is broken. I assume blueair will fix this but no idea when, but 1.8.0 should manage the symptoms until then.
—
Reply to this email directly, [view it on GitHub](#55 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/A4KF42WRRWSGSSWDD5UXQXLYKOUOLAVCNFSM6AAAAABAT53BZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVGQZDKOBQGY).
You are receiving this because you commented.Message ID: ***@***.***>
|
can confirm the retry is working in 1.8.0 took ha 5 tries on my setup but no intervention was required at least |
I've updated to the 1.8.0 and restarted HA but I'm still getting the "Failed setup, will retry" message. It's pretty strange, I've deleted and reloaded the integration a couple of times and it takes my username and password at the initial prompt (saying success!) but then fails to complete the setup and doesn't create any entities. I've tried entering a bad username or password and it doesn't let the initial prompt go away so I know it's taking my credentials appropriately but then fails to succeed subsequently. |
"Failed setup, will retry" is the new message 1.8.0 allows, don't reload/delete etc just let it keep trying until their server works once you have a token it seems the rest of the endpoints aren't having this issue; though if you delete and then try to re-add you will have to manually keep trying if you get a bad login server while attempting to login/setup the integration for the first time |
what if it never succeeds? |
@spikeygg then you have very bad luck or you haven't let it try enough; or you have a different error but that seems less likely |
maybe you can have it report how many times it has tried? I think it's trying and failing repeatedly because something isn't right. I'm leaving it to go and retry and it isn't succeeding. |
you can watch it retry either counting what's in the logs or just have the integration page on your ha instance up; :8123/config/integrations/integration/ha_blueair on the integration page you can watch the status changing from intializing to failed and back again |
with the debug logging enabled, nothing is reported to the home assistant logs. |
1.8.1 adds extra logging when it has to retry, ha has built in logging described https://developers.home-assistant.io/docs/integration_setup_failures/ referencing ConfigEntryNotReady but for convenience there is no harm in extra logging :) |
So reviewing the debug logs, it looks like my login is succeeding eventually (six retries) and the debug log says it is creating the entities but, apparently, that isn't making its way back to the integration/HA because the entities don't show up in the devices and I don't see the entities in my list. I'd post my debug log but it looks like there is a lot of sensitive information in it... is there some way to send it to you securely? |
Ah ha! With your debug version I was able to see that the 'brightness' json entry didn't exist for one of my purifiers (likely because I turned it completely off, to zero on their app). This was causing problems with the integration. I went into their app and set the brightness on all devices to something non-zero... after doing that the integration worked! I still think there's a bug in the integration because it can't handle a non-existent 'brightness' value but at least I'm operational now. 👍 |
@spikeygg 1.8.4 should gracefully handle missing brightness values |
Thanks for the support! |
I'm trying to get the integration to authenticate but it keeps erroring out. I've updated my password with blueair via a "password reset" and a normal "change password" both times I synced it up in the integration but it is continues to report "invalid password".
First it reports this:
After trying a few times it then returns this:
This is with debug logging enabled.
The text was updated successfully, but these errors were encountered: