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

Adding C110 camera's causes Plugin to error #167

Open
d4vinder opened this issue Oct 18, 2024 · 0 comments
Open

Adding C110 camera's causes Plugin to error #167

d4vinder opened this issue Oct 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@d4vinder
Copy link

Describe The Bug:
When adding TAPO C110 cameras, the plugin reacts with error:

[18/10/2024, 06:51:58] [homebridge-tapo-camera] Error during setup of camera "C110_Room" TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined at Hash.update (node:internal/crypto/hash:115:11) at new TAPOCamera (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:80:8) at new CameraAccessory (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:85:19) at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:27:33 at Array.forEach (<anonymous>) at CameraPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:25:26) at new CameraPlatform (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:21:10) at ChildBridgeFork.startBridge (/var/lib/homebridge/node_modules/homebridge/src/childBridgeFork.ts:155:42) { code: 'ERR_INVALID_ARG_TYPE' } TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined at Hash.update (node:internal/crypto/hash:115:11) at new TAPOCamera (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:80:8) at new CameraAccessory (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:85:19) at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:27:33 at Array.forEach (<anonymous>) at CameraPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:25:26) at new CameraPlatform (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:21:10) at ChildBridgeFork.startBridge (/var/lib/homebridge/node_modules/homebridge/src/childBridgeFork.ts:155:42) [18/10/2024, 06:51:58]

To Reproduce:
Simply configure a single camera with the parameters and errors will show. I've tried dropping back versions, but nothing works. It should be noted these issues started after update node.js.

Expected behavior:
Config is accepted and camera is added to HomeBridge and Apple HomeKit in turn. This does not happen

Logs:

[18/10/2024, 06:51:57] [homebridge-tapo-camera] Launched child bridge with PID 11612
[18/10/2024, 06:51:57] Registering platform 'homebridge-lifx-plugin.LifxPlugin'
[18/10/2024, 06:51:57] [homebridge-tapo-camera] Loaded homebridge-tapo-camera v2.5.1 child bridge successfully
[18/10/2024, 06:51:57] Loaded 0 cached accessories from cachedAccessories.0E16894B717D.
[18/10/2024, 06:51:58] [homebridge-tapo-camera] Error during setup of camera "C110_Room" TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Hash.update (node:internal/crypto/hash:115:11)
    at new TAPOCamera (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:80:8)
    at new CameraAccessory (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:85:19)
    at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:27:33
    at Array.forEach (<anonymous>)
    at CameraPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:25:26)
    at new CameraPlatform (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:21:10)
    at ChildBridgeFork.startBridge (/var/lib/homebridge/node_modules/homebridge/src/childBridgeFork.ts:155:42) {
  code: 'ERR_INVALID_ARG_TYPE'
} TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
    at Hash.update (node:internal/crypto/hash:115:11)
    at new TAPOCamera (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:80:8)
    at new CameraAccessory (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:85:19)
    at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:27:33
    at Array.forEach (<anonymous>)
    at CameraPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:25:26)
    at new CameraPlatform (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:21:10)
    at ChildBridgeFork.startBridge (/var/lib/homebridge/node_modules/homebridge/src/childBridgeFork.ts:155:42)
[18/10/2024, 06:51:58] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[18/10/2024, 06:51:58] Homebridge v1.8.4 (HAP v0.12.2) (homebridge-tapo-camera) is running on port 42144.

Plugin Config:

{
    "cameras": [
        {
            "name": "C110_Room",
            "ipAddress": "192.168.1.53",
            "streamUser": "redacted",
            "streamPassword": "redacted",
            "debug": false
        }
    ],
    "_bridge": {
        "username": "0E:16:89:4B:71:7D",
        "port": 42144
    },
    "platform": "tapo-camera"
}

Screenshots:

Environment:

  • Plugin Version: 2.51

  • Homebridge Version: 4.61.0

  • Node.js Version: v20.18.0

  • NPM Version: [email protected]

  • Operating System: homebridge native on Raspi4b

@d4vinder d4vinder added the bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant