colinbendell / homebridge-blink-for-home

Blink For Home Camera Homebridge plugin
MIT License
88 stars 27 forks source link

Thumbnails won't fetch #3

Closed rcoletti116 closed 3 years ago

rcoletti116 commented 3 years ago

With Privacy Mode Off thumbnails never fetch. I only see the PrivacyMode PNG. Also after a while the Privacy mode switch returns itself to "On" state.

Logs don't show much:

[10/25/2020, 11:11:19] [Blink] GET /api/v3/accounts/32211/homescreen [10/25/2020, 11:11:48] [Blink] Privacy Mode for Blink M is: false [10/25/2020, 11:11:48] [Blink] Privacy Mode for Blink G8T1-JX00-0205-00S3 is: false

[10/25/2020, 11:12:04] [Blink] GET /api/v3/accounts/32211/homescreen [10/25/2020, 11:12:05] [Blink] Privacy Mode for Blink M is: true [10/25/2020, 11:12:05] [Blink] Privacy Mode for Blink G8T1-JX00-0205-00S3 is: true

crowston commented 3 years ago

I'm having the same problem: the thumbnail always says Privacy mode, regardless of what the privacy switch on the camera is set to (again, maybe I'm not sure what the switch is supposed to do). Viewing the camera shows a test pattern and that persists for a few seconds after closing the live stream, but then swtches back to the privacy mode image.

I don't know if this related or a different issue but I see the following messages in the log:

(node:316953) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'thumbnail' of undefined
    at Blink.getSavedMedia (/usr/local/lib/node_modules/homebridge-blink-for-home/src/blink.js:394:117)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at BlinkCamera.getThumbnail (/usr/local/lib/node_modules/homebridge-blink-for-home/src/blink.js:223:32)
    at BlinkCameraDelegate.handleSnapshotRequest (/usr/local/lib/node_modules/homebridge-blink-for-home/src/blink-camera-deligate.js:99:27)
(node:316953) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 198)
colinbendell commented 3 years ago

Yes. Overhauled the thumbnails logic. in 3.5.5. give it a go now.

colinbendell commented 3 years ago

This should be resolved. closing for now.

crowston commented 3 years ago

I see the thumbnails, same as on the Blink app!

I see a lot of "GET /network/xxx/command/xxxx" lines in the log: 8 or 9 in a row, and then again a few seconds later. Is that expected traffic?

Nice progress!

colinbendell commented 3 years ago

The blink API uses async queues and so the command API call is checking for the completion. The lag is often related to the time it takes to contact the device

On Mon, Oct 26, 2020 at 08:24 crowston notifications@github.com wrote:

I see the thumbnails, same as on the Blink app!

I see a lot of "GET /network/xxx/command/xxxx" lines in the log: 8 or 9 in a row, and then again a few seconds later. Is that expected traffic?

Nice progress!

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/colinbendell/homebridge-blink-for-home/issues/3#issuecomment-716512827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMERK77BO7DOCKYB7IRYTSMVTALANCNFSM4S6MOXXA .

crowston commented 3 years ago

Thanks for the explanation!