Guide for CCTV Snapshot on motion, send to Google Generative AI & get notification with description & snapshot

Sweet thanks for posting that, I had been meaning to update to include timestamps but never got around to it. Glad you got it sorted. :slight_smile:

@Aussie_Adam

Im getting the alerts and the AI generated text, but no image preview.

Does the image only show if motion changes detected, rather than when ā€œno obvious motion observedā€


Edit it seems like I get no images even if it detect and describes and event.

Thank you very much! I have this setup with 4 cams and it works perfectly.

1 Like

This is working nicely with a few Amcrest cams (Iā€™m using the HACS Dahua integration because I need intrusion detection and advanced event (ā€œhumanā€) detection which the Amcrest integration doesnā€™t offer). One thing I had to add was ā€œcontinue_on_error: trueā€ to each snapshot generation portion of the scripts because I had a situation where one of the snapshots timed out, and the whole thing failed.

1 Like

Wow!
Nice guide, and easy setup.

I dont really know if some else having the same issue but when I send the notification to my Samsung S21 Ultra the provided text is cropped.
Is there a another way to display the full text lenght ?

1 Like

what cameras would work for this?

Any camera that can be used in HA.
Iā€™m using frigate as a NVR and ReoLink camerasā€¦ They are quite good for the purpose.

1 Like

Having the same issue on a s23. Did you find a solution?

Love it otherwise, works brilliant just not way to see the whole message :sweat_smile:

Well Iā€™ve some successā€¦ If I change the font size to smaller, I can fit more characters,

1 Like

Does anyone have an idea how to make a notification on the phone so that in one message with a picture it doesnā€™t cut off the text? Currently it only shows 2 lines and a photo, you canā€™t read the rest of the message, when you send separately there are full messages.

How do you pull back up old alerts that have been seen on your iPhone? Is there a function to record and pull back up in home assistant?

Howā€™d you go about that?
Iā€™ve noticed the same issue on my S20+. My galaxy watch at least shows me the full text.

Did you ever come up with a solution to this one? Iā€™ve got 2 cars in the driveway and Iā€™m either getting told that the stationary car is the entering the drive or that the car that is moving is doing the opposite. :rofl:

You can go into Google AI and tell it the cars are not moving in future alerts. It will store the information to tell it to remember.

1 Like

Is there a way to show the most recent notification being sent to mobile as a card ( picture + text ) on the dashboard. Would be nice to showoff :slight_smile: on kiosk.

make sure you use local in the path for snapshots NOT www. Itā€™s the same directory but when using http you must call it via local. For example:

image: /local/snapshots/driveway1_snapshot2.jpg

Nice, I will look at adding continue on error to my script when I get a minute. Sounds like a better way to do! :slight_smile:

To achieve something similar, I added HA dashboard notifications and android tv notifications to my script that I use, I havenā€™t played with displaying images but it just shoots the text to HA as notification (like when an update is available) or pops up the text on my tv (if itā€™s on). I will try tidy up the script and upload it as another version or something in the next week or two if you like?

Yep. I sorted this for me and the issues of my alpacas always setting it off, itā€™s all in the prompt you ask!

For my personal script, I added to mine: ā€œā€¦ The driveways starts up the top left of the image and the carport is at the bottom of the image, if a car hasnā€™t moved when comparing images, ignore it and do not describe it in your response. Also ignore all Alpacas and Kangaroos movement and do not describe them in your response. ā€¦ā€ :slight_smile:

This seems for me to have worked pretty well and it now correctly tells me if I am coming or going and doesnā€™t tell me if my car is parked in the drive and something else sets it off.

Play with your prompt wording and see how you go!

This is an Android restriction. You can either have the full notification text or you can have it with the image - you cannot have both. My solution has been to generate two notifications - one text only, and one image only.