No Images In Calendar Events / Timeline

by ADMIN 40 views

Issue Description

While generating key_frames, these are not being saved in the timeline / calendar entries, so no image is available for the generated events. The images are being generated correctly it seems, but the reference is not stored in timeline.

Reproduction Steps

  1. Use video analyzer to analyze a frigate event. Set remember to true.
  2. Check generated timeline entry.
  3. Profit! (or not)

Debug Logs

2025-03-13 16:12:38.789 INFO (MainThread) [custom_components.llmvision.media_handlers] Fetching https://ha.local/api/frigate/notifications/1741867510.32471-incfwe/clip.mp4 (attempt 1/10)
2025-03-13 16:12:39.335 INFO (SyncWorker_49) [custom_components.llmvision.media_handlers] [save_clip] clip: /config/custom_components/llmvision/tmp_clips/1741867510.32471-incfwe.mp4, image: None
2025-03-13 16:12:39.340 INFO (MainThread) [custom_components.llmvision.media_handlers] Saved frigate clip to /config/custom_components/llmvision/tmp_clips/1741867510.32471-incfwe.mp4 (temporarily)
2025-03-13 16:12:39.341 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Processing videos: ['/config/custom_components/llmvision/tmp_clips/1741867510.32471-incfwe.mp4']
2025-03-13 16:12:39.341 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Created /config/custom_components/llmvision/tmp_frames
2025-03-13 16:12:42.431 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame76.jpg
2025-03-13 16:12:42.451 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame356.jpg
2025-03-13 16:12:42.557 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame70.jpg
2025-03-13 16:12:42.661 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame325.jpg
2025-03-13 16:12:42.766 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame2.jpg
2025-03-13 16:12:42.875 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame227.jpg
2025-03-13 16:12:42.982 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame153.jpg
2025-03-13 16:12:43.110 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame161.jpg
2025-03-13 16:12:43.226 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame140.jpg
2025-03-13 16:12:43.349 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame174.jpg
2025-03-13 16:12:43.462 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame8.jpg
2025-03-13 16:12:43.570 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame74.jpg
2025-03-13 16:12:43.679 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame141.jpg
2025-03-13 16:12:43.787 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame377.jpg
2025-03-13 16:12:43.897 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame25.jpg
2025-03-13 16:12:44.006 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame360.jpg
2025-03-13 16:12:44.112 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame113.jpg
2025-03-13 16:12:44.217 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame411.jpg
2025-03-13 16:12:44.325 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame251.jpg
2025-03-13 16:12:44.434 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame207.jpg
2025-03-13 16:12:44.546 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame448.jpg
2025-03-13 16:12:44.652 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame414.jpg
2025-03-13 16:12:44.760 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame408.jpg
2025-03-13 16:12:44.864 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame438.jpg
2025-03-13 16:12:44.971 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame121.jpg
2025-03-13 16:12:45.078 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame179.jpg
2025-03-13 16:12:45.183 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame89.jpg
2025-03-13 16:12:45.290 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame249.jpg
2025-03-13 16:12:45.395 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame400.jpg
2025-03-13 16:12:45.504 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame52.jpg
2025-03-13 16:12:45.606 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame329.jpg
2025-03-13 16:12:45.710 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame198.jpg
2025-03-13 16:12:45.812 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame230.jpg
2025-03-13 16:12:45.918 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame381.jpg
2025-03-13 16:12:46.024 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame349.jpg
2025-03-13 16:12:46.133 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame100.jpg
2025-03-13 16:12:46.241 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame172.jpg
2025-03-13 16:12:46.346 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame415.jpg
2025-03-13 16:12:46.457 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame154.jpg
2025-03-13 16:12:46.562 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame114.jpg
2025-03-13 16:12:46.673 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame292.jpg
2025-03-13 16:12:46.778 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame157.jpg
2025-03-13 16:12:46.885 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame399.jpg
2025-03-13 16:12:46.992 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame298.jpg
2025-03-13 16:12:47.103 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame144.jpg
2025-03-13 16:12:47.209 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame338.jpg
2025-03-13 16:12:47.313 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame34.jpg
2025-03-13 16:12:47.418 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame354.jpg
2025-03-13 16:12:47.525 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame156.jpg
2025-03-13 16:12:47.630 DEBUG (MainThread) [custom_components.llmvision.media_handlers] Adding frame frame188.jpg
2025-03-13 16<br/>
**Q&A: No Images in Calendar Events / Timeline**
=====================================================

**Q: What is the issue with no images in calendar events/timeline?**
---------------------------------------------------------

A: The issue is that the images are not being saved in the timeline/calendar entries, so no image is available for the generated events.

**Q: What are the reproduction steps to reproduce the issue?**
---------------------------------------------------------

A: To reproduce the issue, follow these steps:

1. Use video analyzer to analyze a frigate event. Set remember to true.
2. Check generated timeline entry.
3. Profit! (or not)

**Q: What are the debug logs showing?**
--------------------------------------

A: The debug logs show that the images are being generated correctly, but the reference is not being stored in the timeline. The logs also show that the `save_clip` function is being called, but the `image` parameter is `None`.

**Q: What is the expected behavior?**
--------------------------------------

A: The expected behavior is that the images should be saved in the timeline/calendar entries, so that the generated events have an image associated with them.

**Q: What are the possible causes of the issue?**
------------------------------------------------

A: The possible causes of the issue are:

* The `save_clip` function is not being called correctly.
* The `image` parameter is not being set correctly.
* The timeline/calendar entries are not being updated correctly.

**Q: How can I troubleshoot the issue?**
-----------------------------------------

A: To troubleshoot the issue, you can:

* Check the debug logs to see if there are any errors or warnings.
* Verify that the `save_clip` function is being called correctly.
* Check that the `image` parameter is being set correctly.
* Verify that the timeline/calendar entries are being updated correctly.

**Q: What are the next steps to resolve the issue?**
------------------------------------------------

A: The next steps to resolve the issue are:

* Investigate the cause of the issue further.
* Fix the issue by updating the code to correctly save the images in the timeline/calendar entries.
* Test the fix to ensure that it resolves the issue.

**Q: Can I get help with troubleshooting the issue?**
------------------------------------------------

A: Yes, you can get help with troubleshooting the issue by:

* Posting in the community forum for help.
* Reaching out to the developers for assistance.
* Providing more information about the issue, such as the debug logs and the steps you have taken to troubleshoot it.