derek-miller / homebridge-genie-aladdin-connect

Homebridge plugin to integrate Genie Aladdin Connect enabled garage door openers.
https://www.npmjs.com/package/homebridge-genie-aladdin-connect
Apache License 2.0
32 stars 4 forks source link

401 error despite app login working #31

Closed frehner closed 1 year ago

frehner commented 1 year ago

Describe Your Problem:

It seems like there's something weird going on with authentication; I can log in and out of the app just fine, but using the same username and password in this plugin gives me a 401.

Logs:

[Garage Door] [API] An error occurred getting operator oauth token; Request failed with status code 401
[Garage Door] [API] An error occurred getting devices from account; Request failed with status code 401
[Garage Door] Failed to load doors from account; retrying in 5 minutes

Plugin Config:

{
            "name": "Garage Door",
            "username": "{email}",
            "password": "{password}",
            "batteryLowLevel": 15,
            "userInfoCacheTtl": 3600,
            "doorStatusStationaryCacheTtl": 15,
            "doorStatusTransitioningCacheTtl": 5,
            "doorStatusPollInterval": 15000,
            "logApiResponses": true,
            "showShared": false,
            "platform": "GenieAladdinConnect"
        }

Screenshots:

Environment:

I also tried turning on debug mode (for homebridge and this app) but no additional information was given besides the same error logs as above. I could try again though if you think that would help. 👍

derek-miller commented 1 year ago

I just checked my install and everything is working correctly. I have seen this before when they were changing auth mechanisms and it was slowly rolling out to users. In the meantime you could you try changing your password. Let me know if anything changes.

frehner commented 1 year ago

Thanks.

Just did a password reset and that doesn't seem to have helped. ☹️

derek-miller commented 1 year ago

The only other thing I can think to try, since this is not happening on my account, is for you to set a temporary password and share it and your email with me privately and I can debug. I totally understand if you arent comfortable with that. Just let me know. If so I can respond with a private iCloud email address where we can continue the discussion.

frehner commented 1 year ago

Maybe I have a messed up account; I can't seem to reset my own password - when I try to do it through the Aladdin app, it just fails. (I had this problem previously, and had to reset it by calling in to support. After that call I was able to reset the password on my own once, but now cannot reset the password again).

derek-miller commented 1 year ago

Did you log out and back in from the Aladdin app? If not, it may be that the app is using a refresh token and not going through the email/password auth to obtain the first refresh token. This would at least explain why the app is working and not this plugin.

Im still happy to debug with your account if/when you'd like.

frehner commented 1 year ago

Did you log out and back in from the Aladdin app?

Yeah.

Im still happy to debug with your account if/when you'd like.

Sure! Let me know how to contact you; or feel free to contact me through the social media links in my bio.

frehner commented 1 year ago

Ah, third time is the charm; I completely deleted the app, reinstalled it, reset the password, and now it seems to be working.

Thanks for your help, sorry that it wasn't anything with your plugin. ❤️

derek-miller commented 1 year ago

No worries! Glad you figured it out.