add field messages for recording and notifications (#24272)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s

recording and notifications require enabled_in_config to be true at startup to build the correct ffmpeg commands and start the notifications worker
This commit is contained in:
Josh Hawkins
2026-09-13 11:53:44 -06:00
committed by GitHub
parent 51171319a4
commit b02aea03cd
5 changed files with 40 additions and 2 deletions
+5 -1
View File
@@ -1952,7 +1952,11 @@
"modelSizeLarge": "The 'large' model is optimized for multi-line license plates. The 'small' model provides better performance over 'large' and should be used unless your region uses multi-line plate formats."
},
"record": {
"noRecordRole": "No streams have the record role defined. Recording will not function."
"noRecordRole": "No streams have the record role defined. Recording will not function.",
"profileBaseDisabled": "Recording is disabled in this camera's base config, so enabling it in a profile has no effect. Enable recording in the base config and use a profile to disable it instead."
},
"notifications": {
"profileBaseDisabled": "No cameras have notifications enabled in their base config, so enabling them in a profile has no effect. Enable notifications in the base config of at least one camera."
},
"birdseye": {
"objectsModeDetectDisabled": "Birdseye is set to 'objects' mode, but object detection is disabled for this camera. The camera will not appear in Birdseye."
@@ -8,6 +8,23 @@ const notifications: SectionConfigOverrides = {
fieldGroups: {},
hiddenFields: ["enabled_in_config"],
advancedFields: [],
fieldMessages: [
{
key: "profile-base-notifications-disabled",
field: "enabled",
messageKey: "configMessages.notifications.profileBaseDisabled",
severity: "warning",
position: "after",
condition: (ctx) =>
!!ctx.profileName &&
ctx.formData?.enabled === true &&
!Object.values(ctx.fullConfig.cameras).some(
(camera) =>
camera.enabled_in_config &&
camera.notifications.enabled_in_config,
),
},
],
},
global: {
uiSchema: {
@@ -16,6 +16,21 @@ const record: SectionConfigOverrides = {
},
},
],
fieldMessages: [
{
key: "profile-base-record-disabled",
field: "enabled",
messageKey: "configMessages.record.profileBaseDisabled",
severity: "warning",
position: "after",
docLink:
"/configuration/profiles#why-cant-a-profile-enable-recording-when-its-disabled-in-the-base-config",
condition: (ctx) =>
!!ctx.profileName &&
ctx.formData?.enabled === true &&
ctx.fullCameraConfig?.record.enabled_in_config === false,
},
],
fieldDocs: {
"alerts.pre_capture":
"/configuration/record#pre-capture-and-post-capture",
@@ -8,6 +8,7 @@ export type MessageConditionContext = {
fullCameraConfig?: CameraConfig;
level: "global" | "camera";
cameraName?: string;
profileName?: string;
formData: ConfigSectionData;
};
@@ -619,9 +619,10 @@ export function ConfigSection({
: undefined,
level: effectiveLevel,
cameraName,
profileName,
formData: currentFormData as ConfigSectionData,
};
}, [config, currentFormData, effectiveLevel, cameraName]);
}, [config, currentFormData, effectiveLevel, cameraName, profileName]);
const { activeMessages, activeFieldMessages } = useConfigMessages(
sectionConfig.messages,