blakeblackshear / frigate-hass-integration

Frigate integration for Home Assistant
MIT License
657 stars 110 forks source link

Image entities with zone (camera_zone_object and zone_object) #679

Open Mincka opened 1 month ago

Mincka commented 1 month ago

Is your feature request related to a problem? Please describe. It would be great to have image entities per object type for each zone (of each camera or globally).

Currently, they are created per object type for each camera. The issue is that you may not want to update the image when the object is not in the zone you want. Also, you may want the latest object event in a specific zone that is covered by multiple cameras.

image.camera_zone_object Use case: I have one camera in the garden, but I would like to show on my dashboard the latest image of someone in the garden zone, not in the crop_field zone.

image.zone_object Since we have sensors for zones (occupancy and count), I think it could be great to also have image. Use case: I would like to show on my dashboard the image of the latest person in my garden with two cameras pointing to it.

Describe the solution you'd like Create additional entities with this format (camera_zone_object):

Create additional entities with this format (camera_zone_object):

Describe alternatives you've considered Snapshot manually the camera entity on MQTT event.

Additional context None

NickM-27 commented 1 month ago

The issue is that you may not want to update the image when the object is not in the zone you want.

This can already be controlled by MQTT -> required_zones in the frigate config

Mincka commented 1 month ago

I am not sure how it would help for this specific issue. I am already doing MQTT filtering myself based on the zone and other attributes of the payload to trigger the alarm.

Do you mean that using required_zones in the MQTT section would change how the integration is updating the image entity of a camera?

Like I wrote, as an alternative solution, I can snapshot the camera for a specific zone and save it somewhere as camera_zone_person_latest.jpg. Or more precisely, use the image_best_snapshot of the latest event that matched my criteria, and again, save it somewhere as the latest one.

NickM-27 commented 1 month ago

along with snapshot -> required_zones and record -> events -> required_zones frigate also has mqtt -> required_zones which controls what zones an object must enter to update the mqtt image entity.

Mincka commented 1 month ago

Ok thank you. That's not what I need because the image and zone I need depend on the scenario. E.g.: MQTT image used by Double Take for processing, but not in a specific zone while I'd like an image of the latest person in a specific zone on my HA dashboard.

PablaV commented 1 month ago

I second this request..

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Mincka commented 1 week ago

Still interested