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

TypeError: Cannot convert undefined or null to object when reading lockKeypadProperties #86

Closed
bmcclure opened this issue Mar 12, 2023 · 7 comments
Labels
bug Something isn't working question Further information is requested

Comments

@bmcclure
Copy link

bmcclure commented Mar 12, 2023

Describe The Bug:

I have the newer Wyze Lock that has a built-in keypad. I'm not sure if that's significant, but that's the only lock in my Wyze account, and it uses Bluetooth to actually connect to the lock.

When I set this plugin up in Homebridge, and don't exclude the Lock type, the Wyze plugin container keeps restarting indefinitely with the following error:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at WyzeLock.lockGetProperty (/homebridge/node_modules/.pnpm/homebridge-wyze-smart-home@0.5.2-5.1/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

If I uninstall the plugin, then reinstall it and exclude the "lock" type, it seems to work OK.

To Reproduce:

  1. Set up a Wyze Lock (the model with a built-in keypad that uses Bluetooth)
  2. Install this plugin in Homebridge and don't exclude the "lock" type

Expected behavior:

The plugin should fully load instead of crashing and restarting from this error.

Logs:

[3/12/2023, 4:34:26 PM] [Wyze] Launched child bridge with PID 2776
[3/12/2023, 4:34:26 PM] Registering platform 'homebridge-wyze-smart-home.WyzeSmartHome'
[3/12/2023, 4:34:26 PM] [Wyze] Loaded homebridge-wyze-smart-home v0.5.25.1 child bridge successfully
[3/12/2023, 4:34:26 PM] Loaded 34 cached accessories from cachedAccessories.0E3A31761B28.
[3/12/2023, 4:34:27 PM] Homebridge v1.6.0 (HAP v0.11.0) (Wyze) is running on port 30351.

/homebridge/node_modules/.pnpm/homebridge-wyze-smart-home@0.5.2-5.1/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422
    const prop_keypad = Object.keys(lockKeypadProperties)
                               ^
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at WyzeLock.lockGetProperty (/homebridge/node_modules/.pnpm/homebridge-wyze-smart-home@0.5.2-5.1/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeAccessory.js:422:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[3/12/2023, 4:34:27 PM] [Wyze] Child bridge process ended
[3/12/2023, 4:34:27 PM] [Wyze] Process Ended. Code: 1, Signal: null

Plugin Config:

{
    "name": "Wyze",
    "username": "",
    "password": "",
    "refreshInterval": 60000,
    "entryExitDelay": 30,
    "mfaCode": "",
    "showAdvancedOptions": false,
    "excludeMacAddress": false,
    "excludedeviceType": false,
    "_bridge": {
        "username": "",
        "port": 30351
    },
    "platform": "WyzeSmartHome"
}

Screenshots:

Environment:

  • Plugin Version: v0.5.25.1
  • Homebridge Version: v1.6.0
  • Node.js Version: v16.15.1
  • NPM Version:
  • Operating System: Ubuntu
@bmcclure bmcclure added bug Something isn't working question Further information is requested labels Mar 12, 2023
@github-actions
Copy link

Message that will be displayed on users' first issue

@JohnSeals
Copy link

I am also seeing this. New install of Homebridge and the plugin.

@xenonaxel
Copy link

I am also seeing the same error.

@jfarmer08
Copy link
Owner

This is good to know. I will have to exclude this lock by default.

@kvoth1
Copy link

kvoth1 commented Apr 15, 2023

I see this error too. I have the standalone lock with no keypad and get this error which causes restart. It was working fine until a couple weeks or so ago. I want to be able to use the lock and don't want to exclude the lock. Any way to fix this?

I've tried most of the recent versions of the plugin, and they all have this issue.

@jfarmer08
Copy link
Owner

Can we confirm if version 0.5.28 fixes the issue?

@kvoth1
Copy link

kvoth1 commented Jul 5, 2023

It fixed it for me. I can now add my lock again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants