That’s interesting. I would have expected an error saying as much. Something like “25 instances of this automation are already queued. The queue is full.”
Anyway, here is the trace from this morning’s failed run. You can see it gets triggered, and passes the condition, but then stops at the very first action. This doesn’t look like I would expect “queue saturation” to present itself. (Trace JSON file follows)
Here’s the trace file. Actually in here, I can see that the current run is only 2 out of a possible 25. And this is only because I separated out the attribute condition from the trigger so it’s getting triggered once for the file getting opened, but failing the condiition, and another for it closing, which passes. The files are pretty small (a couple of megabytes) so I’d imaging the opening and closing happen in pretty rapid succession.
{
"trace": {
"last_step": "condition/0/conditions/0",
"run_id": "edd1ac6e5313f34c306bd715332453aa",
"state": "running",
"script_execution": null,
"timestamp": {
"start": "2025-10-23T11:20:01.658313+00:00",
"finish": null
},
"domain": "automation",
"item_id": "1745255108803",
"trigger": "state of event.security_camera_folder_watcher",
"trace": {
"trigger/0": [
{
"path": "trigger/0",
"timestamp": "2025-10-23T11:20:01.658353+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.motion_notification_with_ai_description",
"state": "on",
"attributes": {
"id": "1745255108803",
"last_triggered": "2025-10-23T11:20:01.276581+00:00",
"mode": "queued",
"current": 2,
"max": 25,
"friendly_name": "Motion Notification with AI Description"
},
"last_changed": "2025-10-22T14:30:39.433787+00:00",
"last_reported": "2025-10-23T11:20:01.276616+00:00",
"last_updated": "2025-10-23T11:20:01.276616+00:00",
"context": {
"id": "01K88CR4ZWXRADX51GBGSD9Y2M",
"parent_id": "01K88CR4ZVV07V7V1BF3DEZG7K",
"user_id": null
}
},
"trigger": {
"id": "new_motion",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "event.security_camera_folder_watcher",
"from_state": {
"entity_id": "event.security_camera_folder_watcher",
"state": "2025-10-23T11:20:01.655+00:00",
"attributes": {
"event_types": [
"closed",
"created",
"deleted",
"modified",
"moved"
],
"event_type": "modified",
"path": "/media/cameras/videos/2025/10/23/20251023_081103_Driveway.mp4",
"file": "20251023_081103_Driveway.mp4",
"folder": "/media/cameras/videos/2025/10/23",
"friendly_name": "Security Camera Folder Watcher"
},
"last_changed": "2025-10-23T11:20:01.655080+00:00",
"last_reported": "2025-10-23T11:20:01.655080+00:00",
"last_updated": "2025-10-23T11:20:01.655080+00:00",
"context": {
"id": "01K88CR5BQSYB9V15V72T9GR3N",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "event.security_camera_folder_watcher",
"state": "2025-10-23T11:20:01.657+00:00",
"attributes": {
"event_types": [
"closed",
"created",
"deleted",
"modified",
"moved"
],
"event_type": "closed",
"path": "/media/cameras/videos/2025/10/23/20251023_081103_Driveway.mp4",
"file": "20251023_081103_Driveway.mp4",
"folder": "/media/cameras/videos/2025/10/23",
"friendly_name": "Security Camera Folder Watcher"
},
"last_changed": "2025-10-23T11:20:01.657960+00:00",
"last_reported": "2025-10-23T11:20:01.657960+00:00",
"last_updated": "2025-10-23T11:20:01.657960+00:00",
"context": {
"id": "01K88CR5BSSRZN3G7PFNA312GG",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of event.security_camera_folder_watcher"
}
}
}
],
"condition/0": [
{
"path": "condition/0",
"timestamp": "2025-10-23T11:20:01.658376+00:00",
"result": {
"result": true
}
}
],
"condition/0/conditions/0": [
{
"path": "condition/0/conditions/0",
"timestamp": "2025-10-23T11:20:01.658395+00:00",
"result": {
"result": true,
"entities": []
}
}
]
},
"config": {
"id": "1745255108803",
"alias": "Motion Notification with AI Description",
"description": "Sends a notification with the latest video and AI description when motion is detected from a camera.",
"triggers": [
{
"id": "new_motion",
"trigger": "state",
"entity_id": [
"event.security_camera_folder_watcher"
]
}
],
"conditions": [
{
"condition": "or",
"conditions": [
{
"condition": "template",
"value_template": "{{ trigger.to_state.attributes.event_type == 'closed' }}"
},
{
"condition": "not",
"conditions": [
{
"condition": "template",
"value_template": "{{ trigger is defined }}"
}
]
}
]
}
],
"actions": [
{
"variables": {
"response": "",
"video": "",
"video_file_path": "{% if trigger is defined and\n trigger.to_state is defined -%}\n {{ trigger.to_state.attributes.path }}\n{% else -%}\n {{ state_attr('event.security_camera_folder_watcher', 'path') }}\n{% endif -%}",
"video_file_name": "{{ video_file_path.split('/') | last }}",
"serial": "{{ video_file_name[16:-4] | upper }}",
"camera_entity_id": "{% set cams = states.camera\n | selectattr('attributes.brand', '==', 'Blink')\n | list -%}\n{% set cam_names = cams\n | map(attribute='attributes.friendly_name')\n | map('upper')\n | map('replace', 'CAMERA', '')\n | map('replace', '-', '')\n | map('replace', '_', '')\n | map('replace', ' ', '')\n | list -%}\n{% set i = cam_names.index(serial) | default(-1) -%}\n{{ cams[i].entity_id }}",
"camera_name": "{% set tmp = state_attr(camera_entity_id, 'friendly_name')\n | default('Unknown camera', true) -%}\n{{ iif((tmp | lower).endswith(' camera'),\n tmp[:-7], tmp) }}",
"datetime": "{{\n video_file_name[:4] + '-' + \n video_file_name[4:6] + '-' + \n video_file_name[6:8] + ' ' +\n video_file_name[9:11] + ':' +\n video_file_name[11:13] + ':' +\n video_file_name[13:15]\n}}",
"footage_time": "{{ strptime(datetime, '%Y-%m-%d %H:%M:%S').strftime('%b %-d, %-H:%M') }}",
"title": "{{ camera_name + ': ' + footage_time }}",
"notifiable_people": "{{\n expand('group.camera_notifications')\n | map(attribute='attributes.id')\n | map('lower')\n | list\n}}"
}
},
{
"variables": {
"notifiable_people": [
"steve"
]
},
"enabled": true
},
{
"alias": "Use LLMVision",
"sequence": [
{
"action": "llmvision.video_analyzer",
"metadata": {},
"data": {
"provider": "01JS5SG6026VCRQQ78G1085N46",
"include_filename": true,
"max_frames": 5,
"max_tokens": 1000,
"temperature": 0.05,
"generate_title": true,
"expose_images": true,
"remember": false,
"video_file": "{{ video_file_path }}",
"message": "You are the chief of security overseeing a group of guards watching over a single-family home. The guards have several vantage points from which they can observe events in the front yard, driveway, doorstep, and back yard. Your job is to inform the family of events that might impact the security of their home, events that might require the attention of one of the residents, or events that might be otherwise interesting. \n\nIgnore inconsequential things like the sun moving or reflecting off the clouds. Do not make assumptions about the gender of any people, but accurately describe their appearance. Structure the description of events as a single flowing narrative. Do not include introductory text. Do not tell me what frame you are analyzing, just talk about what is happening.\n\nAvoid speculation.\n\nYour response should be a JSON object containing the following fields:\n importance: the judged importance \n of the event. If something happens that\n requires someone's attention, use 'high'. \n If something otherwise interesting happens,\n use 'low'. Otherwise use 'not_important'.\n reason: the methodology used to determine\n the importance of an event. Why did you deem\n it important or not?\n description: the description of the scene.\n Try to keep this to two sentences, unless\n that is inadequate to describe the \n situation.\n detail: a more detailed description of what\n has happened. Be as wordy as necessary to\n fully capture the moment."
},
"response_variable": "llmvision"
},
{
"alias": "Restructure response",
"variables": {
"ai_response": {
"error": "{{ llmvision.error }}",
"data": "{{ llmvision.response_text[7:-3] }}",
"title": "{{ llmvision.title }}",
"thumbnail": "{{ llmvision.key_frame }}"
}
}
}
]
},
{
"alias": "LLM action error or success?",
"choose": [
{
"conditions": [
{
"condition": "template",
"value_template": "{{ ai_response is not defined }}",
"alias": "AI_response is not defined"
}
],
"sequence": [
{
"alias": "Define 'ai_response' variable if none returned",
"variables": {
"video": "{{ video_file_path }}",
"ai_response": {
"conversation_id": "",
"data": {
"description": "AI analysis did not provide a response",
"detail": "",
"reason": "n/a",
"importance": "high"
}
}
}
}
],
"alias": "There was no AI Response"
},
{
"conditions": [
{
"alias": "AI analysis encountered errors",
"condition": "template",
"value_template": "{{ ai_response is not defined or \n (ai_response.error | length > 0) or \n (ai_response.data | length == 0) }}"
}
],
"sequence": [
{
"alias": "Define 'ai_response' variable if error returned",
"variables": {
"video": "{{ video_file_path }}",
"ai_response": {
"conversation_id": "",
"data": {
"description": "AI analysis encountered errors",
"detail": "",
"reason": "n/a",
"importance": "high"
}
}
}
}
]
},
{
"conditions": [
{
"condition": "template",
"value_template": "{{ ai_response is defined and (ai_response.error | length == 0) }}"
}
],
"sequence": [
{
"alias": "Stop here if the AI thinks the event isn't important enough",
"if": [
{
"alias": "If the AI has deemed the event 'not_important'",
"condition": "template",
"value_template": "{{ ai_response.data.importance == 'not_important' }}"
}
],
"then": [
{
"stop": "Not important"
}
]
}
],
"alias": "AI analysis has completed successfully"
}
]
},
{
"action": "llmvision.remember",
"metadata": {},
"data": {
"title": "{{ ai_response.title }}",
"image_path": "{{ ai_response.thumbnail.replace('/media/', '/local/') }}",
"camera_entity": "{{ camera_entity_id }}",
"start_time": "{{ datetime }}",
"summary": "{{ ai_response.data.detail }}"
}
},
{
"alias": "Notify people",
"repeat": {
"for_each": "{{ notifiable_people }}",
"sequence": [
{
"alias": "Send the regular motion notification",
"action": "notify.{{ repeat.item }}",
"data": {
"title": "{{ title }}",
"message": "{{ ai_response.data.description }}",
"data": {
"importance": "{{ ai_response.data.importance }}",
"image": "{{ ai_response.thumbnail }}",
"video": "{{ video }}",
"priority": "high",
"ttl": 0,
"group": "motion-detected",
"channel": "Motion Detection",
"actions": [
{
"action": "URI",
"title": "View timeline",
"uri": "/lovelace-people/timeline"
}
]
}
}
}
]
}
}
],
"mode": "queued",
"max": 25
},
"blueprint_inputs": null,
"context": {
"id": "01K88CR5BT3Y75FECD5BTZ38ER",
"parent_id": "01K88CR5BSSRZN3G7PFNA312GG",
"user_id": null
}
},
"logbookEntries": [
{
"name": "Motion Notification with AI Description",
"message": "triggered by state of event.security_camera_folder_watcher",
"source": "state of event.security_camera_folder_watcher",
"entity_id": "automation.motion_notification_with_ai_description",
"context_id": "01K88CR5BT3Y75FECD5BTZ38ER",
"domain": "automation",
"when": 1761218401.6585495
}
]
}
Honestly, I see nothing wrong with the trace, except for the fact that the flow just doesn’t run the actions. Can anyone versed in interpreting these trace files read more into this?