homebridge-plugins / homebridge-august

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

Bug: Discover Devices 2: TypeError: Cannot convert undefined or null to object with both 1.3.5-beta.5 & v2.0.0 #94

Closed rightedges closed 6 months ago

rightedges commented 8 months ago

Describe The Bug

When the plugin starts, it gave "Discover Devices 2: TypeError: Cannot convert undefined or null to object".

To Reproduce

Install either 1.3.5-beta.5 or v2.0.0 and restart the plugin

Expected behavior

Without this error and device is able to show in homebridge.

Relevant log output

[1/30/2024, 9:31:37 PM] [August] Launched child bridge with PID 47609
[1/30/2024, 9:31:37 PM] Registering platform 'homebridge-august.August'
[1/30/2024, 9:31:37 PM] [August] Loaded homebridge-august v1.3.5-beta.5 child bridge successfully
[1/30/2024, 9:31:37 PM] Loaded 0 cached accessories from cachedAccessories.0E67EC312ADF.
[1/30/2024, 9:31:37 PM] [August] [DEBUG] Using Config Logging: debug
[1/30/2024, 9:31:37 PM] [August] Finished initializing platform: August
[1/30/2024, 9:31:37 PM] [August] Platform Config: {"logging":"debug"}
[1/30/2024, 9:31:37 PM] [August] [DEBUG] Using Default Refresh Rate (5 minutes).
[1/30/2024, 9:31:37 PM] [August] [DEBUG] Config OK
[1/30/2024, 9:31:37 PM] [August] [DEBUG] Executed didFinishLaunching callback
[1/30/2024, 9:31:37 PM] [August] [DEBUG] augustId: rightedges@gmail.com, installId: XXXXXXXXXXXXXXXXXXXX, password: XXXXXXXX, isValidated: true
[1/30/2024, 9:31:37 PM] [August] [DEBUG] countryCode: US
[1/30/2024, 9:31:37 PM] [August] [DEBUG] August Credentials: {"installId”:”XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,”augustId":"rightedges@gmail.com","password”:”XXXXXXX”,”countryCode":"US"}
[1/30/2024, 9:31:37 PM] [August] [DEBUG] August Credentials: {"config":{"apiKey”:”XXXXXXXXXXXXXXXXXX,”pnSubKey":"sub-c-XXXXXXXXXXXXXXXXXXXXXX”,”installId”:”XXXXXXXXXXXXXXXXXXXXXXXXXXXX”X,”idType":"email","augustId":"rightedges@gmail.com","password”:”XXXXXXX”,”countryCode":"US"}}
[1/30/2024, 9:31:37 PM] Homebridge v1.7.0 (HAP v0.11.1) (August) is running on port 43273.
FetchError: Status 401 (undefined): undefined
[1/30/2024, 9:31:38 PM] [August] Discover Devices 2: TypeError: Cannot convert undefined or null to object

[1/30/2024, 9:36:42 PM] [August] Restarting child bridge...
[1/30/2024, 9:36:42 PM] Got SIGTERM, shutting down child bridge process...
[1/30/2024, 9:36:47 PM] [August] Child bridge process ended
[1/30/2024, 9:36:47 PM] [August] Process Ended. Code: 143, Signal: null
[1/30/2024, 9:36:54 PM] [August] Restarting Process...
[1/30/2024, 9:36:54 PM] [August] Launched child bridge with PID 48074
[1/30/2024, 9:36:55 PM] Registering platform 'homebridge-august.August'
[1/30/2024, 9:36:55 PM] [August] Loaded homebridge-august v2.0.0 child bridge successfully
[1/30/2024, 9:36:55 PM] Loaded 0 cached accessories from cachedAccessories.0E67EC312ADF.
[1/30/2024, 9:36:55 PM] [August] [DEBUG] Using Config Logging: debug
[1/30/2024, 9:36:55 PM] [August] Finished initializing platform: August
[1/30/2024, 9:36:55 PM] [August] Platform Config: {"logging":"debug"}
[1/30/2024, 9:36:55 PM] [August] [DEBUG] Using Default Refresh Rate (5 minutes).
[1/30/2024, 9:36:55 PM] [August] [DEBUG] Config OK
[1/30/2024, 9:36:55 PM] [August] [DEBUG] Executed didFinishLaunching callback
[1/30/2024, 9:36:55 PM] [August] [DEBUG] augustId: rightedges@gmail.com, installId: XXXXXXXXXXXXXXXXXXXXXXXX, password: XXXXXXX, isValidated: true
[1/30/2024, 9:36:55 PM] [August] [DEBUG] countryCode: US
[1/30/2024, 9:36:55 PM] [August] [DEBUG] August Credentials: {"installId”:”XXXXXXXXXXXXXXXXXXXXXX,”augustId":"rightedges@gmail.com","password”:”XXXXXXXX,”countryCode":"US"}
[1/30/2024, 9:36:55 PM] [August] [DEBUG] August Credentials: {"config":{"apiKey”:”XXXXXXXXXXXXXXXXXXXXXX,”pnSubKey":"sub-c-XXXXXXXXXXXXXXXXXXXX","installId”:”XXXXXXXXXXXXXXXXXXXXXXXXX”,”idType":"email","augustId":"rightedges@gmail.com","password”:”XXXXXXXX”,”countryCode":"US"}}
[1/30/2024, 9:36:55 PM] Homebridge v1.7.0 (HAP v0.11.1) (August) is running on port 43273.
FetchError: Status 401 (undefined): undefined
[1/30/2024, 9:36:55 PM] [August] Discover Devices 2: TypeError: Cannot convert undefined or null to object

Config for homebridge-august

{
            "name": "August",
            "credentials": {
                "augustId": "rightedges@gmail.com",
                "password": "XXXXXXXX",
                "contryCode": "US",
                "installId": "XXXXXXXXXXXXXXXXXXXXXXXX",
                "isValidated": true,
                "notice": "Keep your tokens a secret!"
            },
            "options": {
                "logging": "debug"
            },
            "_bridge": {
                "username": "XXXXXXXXXXXX",
                "port": 43273
            },
            "platform": "August"
        }

Screenshots

No response

Device & Model

Lock Model YR C/D 226/246/256

Node.js Version

20.11.0

NPM Version

10.2.4

Homebridge Version

v1.7.0

Homebridge August Plugin Version

v2.0.0

Homebridge Config UI X Plugin Version

v4.54.1

Operating System

macOS Ventura

simonrb2000 commented 8 months ago

Same for me, no improvement with both the beta and V2 (removed sensitive info)

[31/01/2024, 09:03:44] [August] [DEBUG] Using Config Logging: debug
[31/01/2024, 09:03:44] [August] Finished initializing platform: August
[31/01/2024, 09:03:44] [August] Platform Config: {"logging":"debug"}
[31/01/2024, 09:03:44] [August] [DEBUG] Using Default Refresh Rate (5 minutes).
[31/01/2024, 09:03:44] [August] [DEBUG] Config OK
[31/01/2024, 09:03:44] [August] [DEBUG] Executed didFinishLaunching callback
[31/01/2024, 09:03:44] [August] [DEBUG] augustId: email, installId: 6 password: password, isValidated: true
[31/01/2024, 09:03:44] [August] [DEBUG] countryCode: US
[31/01/2024, 09:03:44] [August] [DEBUG] August Credentials: {"installId":"6","augustId":"email,"password":"password","countryCode":"US"}
[31/01/2024, 09:03:44] [August] [DEBUG] August Credentials: {"config":{"apiKey":"key","pnSubKey":"sub-c-f","installId":"2","idType":"email","augustId":"email","password":"password","countryCode":"US"}}
[31/01/2024, 09:03:44] Homebridge v1.7.0 (HAP v0.11.1) (August) is running on port 32274.
FetchError: Status 401 (undefined): undefined
[31/01/2024, 09:03:44] [August] Discover Devices 2: TypeError: Cannot convert undefined or null to object
donavanbecker commented 8 months ago

Please turn debug mode on and post logs.

simonrb2000 commented 8 months ago

Please turn debug mode on and post logs.

That was with Debug on and that's the only logs that show?

IWCaldwell commented 7 months ago

I get the exact same issue and the plugin is useless for me 👎

[29/02/2024, 19:18:02] [August] Discover Devices 2: TypeError: Cannot convert undefined or null to object

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue has been closed as no further activity has occurred.

donavanbecker commented 5 months ago

Please try v2.1.0, if you still have an issue please open a new issue.

IWCaldwell commented 5 months ago

I get a new error now:

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

rightedges commented 5 months ago

New issue is opened https://github.com/donavanbecker/homebridge-august/issues/106