I have a couple of Nest cameras on my network. I’m able to see them and stream from them via Home Assistant w/o issue. I can add a live stream to my dashboard if I wish and that works fine. However, one of the cameras is battery only and w/event-based triggering the battery lasts several months. Given that it is battery powered I don’t want it to constantly be streaming, running the battery down.
My thought was to create an automation to capture a snapshot every 5 minutes, overwriting the previous snapshot and displaying that in the dashboard. I have the following automation created:
alias: Front Door Snapshot
description: ""
trigger:
- platform: time_pattern
minutes: /5
action:
- service: camera.snapshot
data:
filename: /media/camera/frontdoor.jpg
target:
entity_id: camera.front_door_camera
mode: single
The automation will fire every 5 minutes and create the file, but it is always a black frame. I had first thought that maybe this was an issue due to the camera being battery-powered, but I have a wired camera of the same model as well, and the behavior is the exact same.
I can see the files in the target directory, I can browse to them via “Media Sources” in the left nav, but they’re always a black frame, always 2689 bytes in size.
Does anyone have any tips or pointers that could lead me in the right direction?