potmat / homebridge-google-nest-sdm

A Homebridge plugin for Google Nest devices that uses the Google Smart Device Management API. Supports Cameras, Doorbells, Displays, and Thermostats. Includes support for HomeKit Secure Video.
ISC License
155 stars 17 forks source link

Error: Cannot get schema for 'Array' target #10

Closed normanmaurer closed 2 years ago

normanmaurer commented 2 years ago

I tried to open the video for my google nest doorbell (akku) but it not worked and I saw this error:

1|homebridge  | [1/23/2022, 5:37:30 PM] [homebridge-google-nest-sdm] Request for trait sdm.devices.traits.CameraLiveStream had value {"maxVideoResolution":{"width":640,"height":480},"videoCodecs":["H264"],"audioCodecs":["AAC"],"supportedProtocols":["WEB_RTC"]} Flur Doorbell
1|homebridge  | [1/23/2022, 5:37:31 PM] [homebridge-google-nest-sdm] Request for trait sdm.devices.traits.CameraLiveStream had value {"maxVideoResolution":{"width":640,"height":480},"videoCodecs":["H264"],"audioCodecs":["AAC"],"supportedProtocols":["WEB_RTC"]} Flur Doorbell
1|homebridge  | [1/23/2022, 5:37:31 PM] [homebridge-google-nest-sdm] Video stream requested: 1280 x 720, 30 fps, 299 kbps Flur Doorbell
1|homebridge  | [1/23/2022, 5:37:31 PM] [homebridge-google-nest-sdm] Request for trait sdm.devices.traits.CameraLiveStream had value {"maxVideoResolution":{"width":640,"height":480},"videoCodecs":["H264"],"audioCodecs":["AAC"],"supportedProtocols":["WEB_RTC"]} Flur Doorbell
1|homebridge  | [1/23/2022, 5:37:32 PM] [homebridge-google-nest-sdm] Error: Cannot get schema for 'Array' target
1|homebridge  |     at AsnSchemaStorage.get (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/asn1-schema/build/cjs/schema.js:18:19)
1|homebridge  |     at Function.toASN (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/asn1-schema/build/cjs/serializer.js:21:48)
1|homebridge  |     at Function.toAsnItem (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/asn1-schema/build/cjs/serializer.js:136:33)
1|homebridge  |     at Function.toASN (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/asn1-schema/build/cjs/serializer.js:46:46)
1|homebridge  |     at Function.serialize (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/asn1-schema/build/cjs/serializer.js:14:21)
1|homebridge  |     at Function.serialize (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/asn1-schema/build/cjs/convert.js:10:43)
1|homebridge  |     at Function.create (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/@peculiar/x509/build/x509.cjs.js:1740:43)
1|homebridge  |     at runMicrotasks (<anonymous>)
1|homebridge  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
1|homebridge  |     at Function.CipherContext.createSelfSignedCertificateWithKey (/usr/local/lib/node_modules/homebridge-google-nest-sdm/node_modules/dtls/src/context/cipher.ts:111:18)

Any idea what could be the problem ?

ouvoun commented 2 years ago

I might as well chime in since I had exactly the same issue. What fixed it for me was to make the homebridge-google-nest-sdm use its own child bridge.

It's unlikely that being in a child bridge is actually needed, but my hunch is that probably some cached accessory information was causing some issues and making it a child bridge forced everything to be reset. You could always try purging cached accessory info first if you didn't want to try a child bridge.

normanmaurer commented 2 years ago

@ouvoun thanks that did the trick!