donavanbecker / homebridge-august

The Homebridge August plugin allows you to access your August/Yale Locks from HomeKit with Homebridge.
ISC License
34 stars 8 forks source link

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

Open rightedges opened 1 month ago

rightedges commented 1 month ago

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 commented 1 month ago

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

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

donavanbecker commented 1 month ago

And with 2.0.0 it was working fine?

simonrb2000 commented 1 month ago

Unfortunately not. I had this error before this update

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

rightedges commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

@rightedges what country?

rightedges commented 1 month ago

@donavanbecker Canada

donavanbecker commented 1 month ago

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

simonrb2000 commented 1 month ago

I'm still getting:-

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

rightedges commented 1 month ago

@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 commented 1 month ago

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

gitothy commented 3 weeks ago
  • 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 commented 3 weeks ago

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

soleritu commented 1 week ago

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.