blakeblackshear / frigate

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

Add a custom meta field per camera to be appended to mqtt events topic #14275

Open phillmac opened 1 month ago

phillmac commented 1 month ago

I have cameras where the name is changed often but I have a DB indexed by camera serial and I would like to have a static reference as well as the camera name in the mqtt events feed

I'd like to be able to add an key & value e.g. cameraSerial in the config per camera that is appended verbatim to the mqtt events feed

I had a quick look at the mqtt communication module however I could not make heads or tails of how to go about it.

phillmac commented 1 month ago

https://gitpay.me/#/task/960

NickM-27 commented 1 month ago

I think more information is needed, why do the names of cameras change? Why do you need to configure it Frigate this extra data, do you not already know it on the other side of MQTT?

I don't think it makes sense for Frigate to send arbitrary data along with all camera MQTT messages

phillmac commented 1 month ago

@NickM-27 Why does the name of the cameras change?

Do you not know it already on the other side of MQTT?

This should be a relatively trivial feature to add however I'm lost as to where to start on it. If you are so inimical to adding this to the main code base would you kindly give me a few hints where to look? Then I can at least try to muddle this thru myself..

NickM-27 commented 1 month ago

It just doesn't make sense, maybe I'm misunderstanding. If you know the name of the camera to put into a friendly name field in the config why not just put that name in the existing name field in the config.

phillmac commented 1 month ago

I tried that, everything went to hell in a handbasket. None of the live feeds would load anymore. The every part of the api started throwing http 500 errors I could load the bare UI itself but nothing more.

I couldn't find how to use it in the full config reference so im guessing it no longer works?

Edit: @NickM-27 Any comments? I can privately share the config & logs if needed

NickM-27 commented 3 weeks ago

I can see why this might occur, I am not sure if this is a usecase that we are looking to support

pnogemane commented 2 weeks ago

Is the issue still available to pick up?