blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.08k stars 1.74k forks source link

[Support]: Not documented breaking change in camera name #3845

Closed luzik closed 2 years ago

luzik commented 2 years ago

Describe the problem you are having

My camera name is wejscie-dzwonek. Frigate HA integration created entities wejscie_dzwonek.* . I have automation based on Frigate documentation where I use entity_id: camera.{{trigger.payload_json["after"]["camera"]}}. Stable frigate version was working fine, now, after upgrade to RC2 My iPhone gives error _HLS Stream Unavailable. Entity /api/camera_proxystream/camera.wejscie-dzwonek not found

I do not know if this is related to frigate, or to frigate HA integration

Version

0.11.0-C461C9E

Frigate config file

-

Relevant log output

-

FFprobe output from your camera

-

Frigate stats

No response

Operating system

Other Linux

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Dahua

Any other information that may be helpful

No response

NickM-27 commented 2 years ago

/api/camera_proxy_stream/camera.wejscie-dzwonek isn't something that I recognize to be apart of the frigate integration.

In any case, this sounds more like an integration issue. If you are using the frigate 0.11 RC then you should probably use the RC of the integration as well

luzik commented 2 years ago

The problem is that camera.{{trigger.payload_json["after"]["camera"]}} resolve to camera.wejscie-dzwonek, before update I believe it was camera.wejdzie_dzwonek. I am using RC version of integration. An /api/camera_proxy_stream is internal part of HA notify service

luzik commented 2 years ago

My notification is based on https://deploy-preview-2829--frigate-docs.netlify.app/guides/ha_notifications (iOS live previews example)

NickM-27 commented 2 years ago

Makes sense, that is still likely to be an issue for the integration. You could probably just use a replace - for _ in that template to get it to work. If not then please create an issue on the integration side.

luzik commented 2 years ago

Ok, but this is something that breaks after update. Is it save to rename camera in frigate config ? Do I lose access to recordings and events ?

NickM-27 commented 2 years ago

Renaming the camera will lead to deleted events & recordings but that would of course also fix it

luzik commented 2 years ago

So, renaming the camera did not deleted events. Events from old camera name are visible on events list ( I just can't filter it) Recordings are available after url modification to old name. Disk space did not change.

Do that orphaned files will be deleted later on while I am using such configuration ?

record: enabled: True retain: days: 10 mode: all

NickM-27 commented 2 years ago

So, renaming the camera did not deleted events. Events from old camera name are visible on events list ( I just can't filter it) Recordings are available after url modification to old name. Disk space did not change.

They won't be deleted immediately, they are deleted based on the global config: https://github.com/blakeblackshear/frigate/blob/a6a0e4d1dea491489d7b1498a36035658054cbde/frigate/events.py#L158