fronzbot / blinkpy

A Python library for the Blink Camera system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sporadically incomplete snapshots

Jeanlucpica opened this issue · comments

Describe the bug
Sporadically within Home Assistant the Blink camera preview images are incomplete. Only half of the jpeg files seems to be generated. The preview image in the lovelace cards is incomplete, as well as the file written to the media folder by my automation. I do have some errors in the logs from blink (see below), however those do not match the time if the problem actually occurs. I couldn't find any additional information or similar reports, so I hope you can help me here. Please let me know if any additional information is required to troubleshoot the issue. Thanks!

To Reproduce
It is a sporadic error, so I can't provide detailed steps how to reproduce. However, it happens sporadically when the following automation in Home Assistant is triggered:

- id: '1602096528961'
  alias: Benachrichtigung bei Türklingel
  description: ''
  variables:
    create_path: /media/Blink/Eingang_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
    send_path: '{{ create_path | replace(''/media'',''/media/local'') }}'
  trigger:
  - type: not_opened
    platform: device
    device_id: 06887d44070511eba0223f8f74a89d06
    entity_id: binary_sensor.openclose_doorbell
    domain: binary_sensor
  condition: []
  action:
  - service: notify.iphones
    data:
      title: Haustür
      message: Es hat geklingelt!
  - service: blink.trigger_camera
    data:
      entity_id: camera.blink_eingang
  - delay:
      hours: 0
      minutes: 0
      seconds: 8
      milliseconds: 0
  - service: blink.blink_update
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: camera.snapshot
    data:
      filename: '{{ create_path }}'
    target:
      entity_id: camera.blink_eingang
  - service: notify.iphones
    data:
      title: Haustür
      message: Schau wer da ist!
      data:
        image: '{{ send_path }}'
  - service: blink.blink_update
    data: {}
  mode: single

Expected behavior
The services blink.tigger_camera and blink.blink_update should always result in a complete image download to Home Assistant.

Home Assistant version:
Home Assistant 2022.9.7
Supervisor 2022.09.1
Operating System 9.0
Frontend 20220907.2 - latest

Log Output/Additional Information

2022-09-28 14:00:49.456 ERROR (SyncWorker_0) [blinkpy.sync_module] Could not extract camera info: {'message': 'Camera not found', 'code': 500}
2022-09-28 14:00:49.458 WARNING (SyncWorker_0) [blinkpy.camera] Could not find thumbnail for camera unknown
2022-09-28 14:00:49.488 ERROR (SyncWorker_4) [blinkpy.sync_module] Could not extract camera info: {'message': 'Camera not found', 'code': 500}
2022-09-28 14:00:49.491 WARNING (SyncWorker_4) [blinkpy.camera] Could not find thumbnail for camera unknown
2022-09-28 14:00:49.852 ERROR (SyncWorker_6) [blinkpy.auth] Expected json response from https://rest-e001.immedia-semi.com/network/156379/camera/unknown/config, but received: 406: Not Acceptable
2022-09-28 14:00:49.856 ERROR (SyncWorker_6) [blinkpy.sync_module] Could not extract camera info: None
2022-09-28 14:00:49.860 WARNING (SyncWorker_6) [blinkpy.camera] Could not find thumbnail for camera unknown

Eingang_20220928-141411

Yeah I've seen this before and am not really sure of the best way to solve it. I think it's simply an interrupted connection and there's probably a way to detect that and fix it, but that's not something that's really on my radar to fix. In the meantime, I suggest just performing a refresh when you see that happen. Alternatively, if you have some coding experience and want to give it a go that would be welcome too!

Experiencing this too :(