--[[ LuCI - Lua Configuration Interface ]]-- local taskd = require "luci.model.tasks" local frigate_model = require "luci.model.frigate" local m, s, o m = taskd.docker_map("frigate", "frigate", "/usr/libexec/apps/frigate/frigate.sh", translate("Frigate NVR"), translate("Frigate is an open-source NVR built around real-time AI object detection. All processing is performed locally on your own hardware.") .. "
".. translate("Official website:") .. ' https://frigate.video/') s = m:section(SimpleSection, translate("Container Status")) s:append(Template("frigate/status")) -- General Frigate Docker setup s = m:section(NamedSection, "docker", "frigate_config", "Docker Configuration") s.addremove = false s.anonymous = true o = s:option(Value, "port", "Port") o.default = "5100" o = s:option(Value, "image", "Image") o.default = "ghcr.io/blakeblackshear/frigate:stable" o = s:option(Value, "usbcoral", "USB Coral") o.default = "/dev/bus/usb" o = s:option(Value, "hwaccel", "Hardware Acceleration") o.default = "/dev/crypto" o = s:option(Value, "storage", "Storage Path") o.default = "./frigate/storage" -- MQTT Configuration s = m:section(NamedSection, "mqtt", "frigate_config", "MQTT Configuration") s.addremove = false s.anonymous = true o = s:option(Flag, "mqtt", "Enable MQTT") o.default = "0" o = s:option(Value, "host", "MQTT Host") o.default = "mqtt.server.com" -- Detectors Configuration s = m:section(NamedSection, "tpu", "frigate_config", "TPU Configuration") s.addremove = false s.anonymous = true o = s:option(Flag, "coral", "Enable Coral") o.default = "1" o = s:option(Value, "type", "Type") o.default = "edgetpu" o = s:option(Value, "device", "Device") o.default = "usb" -- Camera Configuration s = m:section(TypedSection, "camera_config", "Camera Configuration") s.addremove = true s.anonymous = true s.novaluetext = "There are no cameras configured yet." o = s:option(Value, "name", "Camera Name") o = s:option(Value, "path", "RTSP Path") o = s:option(Value, "roles", "Roles") o = s:option(Flag, "record", "Enable Recording") o.default = "0" o.rmempty = false o = s:option(Flag, "snapshots", "Enable Snapshots") o.default = "0" o.rmempty = false -- Add the new flag for Overwrite Frigate Config o = s:option(Flag, "overwrite_cfg", "Overwrite Frigate Config") o.default = "1" o.rmempty = false return m