Skip to content
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

Bug: Validated, Discover Devices: Error: POST failed with: 403 #106

Open
rightedges opened this issue May 8, 2024 · 24 comments
Open

Bug: Validated, Discover Devices: Error: POST failed with: 403 #106

rightedges opened this issue May 8, 2024 · 24 comments
Assignees
Labels
bug Something isn't working pinned Don't close this issue.

Comments

@rightedges
Copy link

Describe The Bug

Upgraded to v2.1.0 and recieved a new 403 error

To Reproduce

Upgrade to v2.1.0 and restart the plugin

Expected behavior

No error messages

Relevant log output

[5/8/2024, 11:17:00 AM] [August] Initializing August platform...
[5/8/2024, 11:17:00 AM] [August] Initializing child bridge XX:XX:XX:XX:XX:XX
[5/8/2024, 11:17:01 AM] [August] Launched child bridge with PID 18445
[5/8/2024, 11:17:01 AM] [August] Loaded homebridge-august v2.1.0 child bridge successfully
[5/8/2024, 11:17:01 AM] Loaded 0 cached accessories from cachedAccessories.0E67EC312ADF.
[5/8/2024, 11:17:01 AM] [August] [DEBUG] Using Config Logging: debug
[5/8/2024, 11:17:01 AM] [August] [DEBUG] Plugin Version: 2.1.0
[5/8/2024, 11:17:01 AM] [August] [DEBUG] Finished initializing platform: August
[5/8/2024, 11:17:01 AM] [August] Platform Config: {"logging":"debug"}
[5/8/2024, 11:17:01 AM] [August] [DEBUG] Using Default Refresh Rate (5 minutes).
[5/8/2024, 11:17:01 AM] [August] [DEBUG] Executed didFinishLaunching callback
[5/8/2024, 11:17:01 AM] [August] [DEBUG] Config Credentials: {"augustId":"rightedges@gmail.com","password":"XXXXXXXX","countryCode":"CA","installId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX","isValidated":true,"notice":"Keep your tokens a secret!"}, isValidated: true
[5/8/2024, 11:17:02 AM] [August] [DEBUG] Config OK
[5/8/2024, 11:17:02 AM] Homebridge v1.8.1 (HAP v0.12.0) (August) is running on port 43273.
[5/8/2024, 11:17:02 AM] [August] Validated, Discover Devices: Error: POST failed with: 403

Config for homebridge-august

{
            "name": "August",
            "credentials": {
                "augustId": "rightedges@gmail.com",
                "password": "XXXXXXXXX",
                "countryCode": "CA",
                "installId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
                "isValidated": true,
                "notice": "Keep your tokens a secret!"
            },
            "options": {
                "logging": "debug"
            },
            "_bridge": {
                "username": "XX:XX:XX:XX:XX:XX",
                "port": 43273
            },
            "platform": "August"
        }

Screenshots

No response

Device & Model

Lock Model YR C/D 226/246/256

Node.js Version

v20.11.0

NPM Version

10.2.4

Homebridge Version

v1.8.1

Homebridge August Plugin Version

v2.1.0

Homebridge Config UI X Plugin Version

No response

Operating System

macOS Ventura

@simonrb2000
Copy link

That's odd, with V 2.10 I'm getting

[August] Validated, Discover Devices: Error: GET failed with: 401

@donavanbecker
Copy link
Collaborator

And with 2.0.0 it was working fine?

@simonrb2000
Copy link

Unfortunately not. I had this error before this update

[August] Discover Devices 2: TypeError: Cannot convert undefined or null to object

@rightedges
Copy link
Author

I got the "Cannot convert undefined or null to object" with 2.0.0 and now 2.1.0 "Validated, Discover Devices: Error: POST failed with: 403".

@donavanbecker
Copy link
Collaborator

v2.2.0 has been released.

Also I would recommend turning the refreshRate to 0 and try just relying on the subscribing to the August API which sends notifications right to the plugin.

@rightedges
Copy link
Author

Just did a quick test with the steps below:

  1. Set the refreshRate to 0.
  2. Restart the plugin.
  3. Update the plugin to v2.2.0.
  4. Restart the plugin.
  5. Got "Error: POST failed with: 403"

Below is the corresponding logs:

[5/25/2024, 8:02:04 PM] [August] Restarting Process...
[5/25/2024, 8:02:04 PM] [August] Launched child bridge with PID 96636
[5/25/2024, 8:02:04 PM] Registering platform 'homebridge-august.August'
[5/25/2024, 8:02:04 PM] [August] Loaded homebridge-august v2.2.0 child bridge successfully
[5/25/2024, 8:02:04 PM] Loaded 0 cached accessories from cachedAccessories.0E67EC312ADF.
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Using Platform Config Logging: debug
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Plugin Version: 2.2.0
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Finished initializing platform: August
[5/25/2024, 8:02:04 PM] [August] Platform Config: {"logging":"debug"}
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Config OK
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Using Default Refresh Rate (5 minutes).
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Executed didFinishLaunching callback
[5/25/2024, 8:02:04 PM] [August] [DEBUG] Config Credentials: {"augustId":"rightedges@gmail.com","password":"XXXXXXXX","countryCode":"CA","installId":"XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX","isValidated":true,"notice":"Keep your tokens a secret!"}, isValidated: true
[5/25/2024, 8:02:05 PM] [August] Validated, Discover Devices: Error: POST failed with: 403

@donavanbecker
Copy link
Collaborator

@rightedges what country?

@rightedges
Copy link
Author

@donavanbecker Canada

@donavanbecker
Copy link
Collaborator

@rightedges so before 2.1.0, things worked? Can you try changing to US for country code?

@donavanbecker donavanbecker reopened this May 26, 2024
@simonrb2000
Copy link

I'm still getting:-

[August] Validated, Discover Devices: Error: GET failed with: 401

@donavanbecker donavanbecker added the pinned Don't close this issue. label May 27, 2024
@rightedges
Copy link
Author

@rightedges so before 2.1.0, things worked? Can you try changing to US for country code?

Changed to US, and got 401 error like @simonrb2000

[5/26/2024, 5:19:02 AM] [August] Validated, Discover Devices: Error: GET failed with: 401

It didn't work before 2.1.0.

@chrisbrinkworth
Copy link

This reads like the question I submitted recently so I'll add to the comments here in case it helps:

  • 2.2.0 didn't resolve the 403 errors.
  • Refresh rate as zero gives an error (but maybe is still accepted?).
  • Following the plugin steps still doesn't trigger a 2-step code by email.
  • My login for August triggers a 2-step code normally with these credentials (via iOS app login)
  • My email address uses a "+" prefix in case that's relevant here. And I set CA for Canada but it looks like the country code isn't the issue.

@gitothy
Copy link

gitothy commented Jun 11, 2024

  • Following the plugin steps still doesn't trigger a 2-step code by email.

My account was created in GB. Selecting this in the v2.2.0 plugin doesn't generated a 2FA email to be sent. If I change the country to US then a code is received in my email but it doesn't work in the plug in to log in.

Suggestion on the home assistant forums that some of the URLs have changed in the endpoints?

@peteles
Copy link

peteles commented Jun 12, 2024

Got the same error also 403, country code Canada, v2.2.0 of the plug-in.

@soleritu
Copy link

soleritu commented Jun 24, 2024

Same error with version 2.2.6

Just putting the code in and clicking save:
[August] Validate: Error: POST failed with: 403
Country Code: TR
However removing the country code from the config json manually after putting the code in seems to fix this. However the following discover devices issues persists.

After checking the validated box manually and then saving:
[August] Validated, Discover Devices: Error: POST failed with:

Edit: refreshRate 0 did not help.

@Gorlakk
Copy link

Gorlakk commented Jul 9, 2024

I'm attempting to set this up for the first time with a Yale Keyless Connected with Access Module and Connected WiFi Bridge, here in the UK. I set Country Code to GB. After putting in the Validation Code I get:
[7/9/2024, 4:17:23 PM] [August] Initializing August platform...
[7/9/2024, 4:17:23 PM] [August] Validate: Error: POST failed with: 403

@taylorjamesbarr
Copy link

taylorjamesbarr commented Jul 15, 2024

I'm experiencing the same thing in Australia on version v2.2.6. Is there any fix in sight?

[15/07/2024, 19:46:38] [August] Initializing August platform...
[15/07/2024, 19:46:38] [August] Validate: Error: POST failed with: 403

If I change country to US, I get this:

[15/07/2024, 19:50:36] [August] Validate, Discover Devices: Error: GET failed with: 401

@donavanbecker
Copy link
Collaborator

I'm sorry guys, it's hard to support the Yale Home API when I live in the US. I'd anyone wants to look how they handle it in HA and open a PR on the August-Yale repo. I would be more than willing to accept it.

@mattheworiordan
Copy link

FWIW. I changed my country to US (even though I have a GB phone number registered), and it worked.

@chrisbrinkworth
Copy link

Yes, it works for me now. I used "CA". After entering the verification code, restarting the child bridge in my case, the plugin log shows that it validated and the correct number of locks are seen.

@fat-freematilde
Copy link

fat-freematilde commented Nov 16, 2024

Im in DK and is also throws a 403 error.

For me the fix is to change setting in:
homebridge/node_modules/homebridge-august/node_modules/august-yale/dist/settings.js
From:
export const DEFAULT_BRAND = Brand.AUGUST;
To:
export const DEFAULT_BRAND = Brand.YALE_HOME;

I think this should be a config option in homebridge-august.

This will not fix the device discovery. Now im getting this in the log:
[11/16/2024, 11:20:13 AM] [August] Total August Locks Found: 1

But no ID to be seen in the log and no device in the device list.

By enabling debug logging I found the ID.

So now my Yale Linus lock actually work. There still persist one issue.
When the service starts in homebridge, it's not able to pull the lock status. You need to try to unlock the lock and it will update correctly.
Until then sensor and lock status is not correct and the following is shown in the log:
[August] Lock: xxx pushChanges: Cannot read properties of undefined (reading 'details')

@k01z
Copy link

k01z commented Jan 3, 2025

found a way to make it work

  1. uninstall the plugin
  2. reinstall the plugin
  3. put in email address under account info
  4. put in password under account info
  5. restart homebridge >> email will be sent with validation code
  6. instead of using gui to input the code i went to json config and insert just the validation code syntax with the code from the email (“validationCode”: “######”,) just above the “notice” syntax
  7. restart homebridge

it fetches my device….phew ~~

@kseverinsen
Copy link

I tried logging e.body in dist/platform.js for the 403 POST error, and it seems it is a html block page from Cloudflare with the message "You are unable to access aaecosystems.com"

@d-dnmi
Copy link

d-dnmi commented Jan 5, 2025

Im in DK and is also throws a 403 error.

For me the fix is to change setting in: homebridge/node_modules/homebridge-august/node_modules/august-yale/dist/settings.js From: export const DEFAULT_BRAND = Brand.AUGUST; To: export const DEFAULT_BRAND = Brand.YALE_HOME;

I think this should be a config option in homebridge-august.

This will not fix the device discovery. Now im getting this in the log: [11/16/2024, 11:20:13 AM] [August] Total August Locks Found: 1

But no ID to be seen in the log and no device in the device list.

By enabling debug logging I found the ID.

So now my Yale Linus lock actually work. There still persist one issue. When the service starts in homebridge, it's not able to pull the lock status. You need to try to unlock the lock and it will update correctly. Until then sensor and lock status is not correct and the following is shown in the log: [August] Lock: xxx pushChanges: Cannot read properties of undefined (reading 'details')

Did this but didn't help fix the issue unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned Don't close this issue.
Projects
None yet
Development

No branches or pull requests