Good morning, I’m trying to send an ai notification to my iPhone and also announce it on my Amazon Alexa devices. -
When visitor rings my Reolink video doorbell, I would like HA to use AI and describe who is standing there, what they are holding, how many persons, etc. and make it funny. I can not for the life of me figure it out. I believe I have all the integrations installed. I don’t think I’m understanding how to use the www folder and if that’s even needed. Thank you
The www folder thing can work, but…
When I want to store media, I want to be able to easily not back it up, so I do this. The backup integration has a specific button to exclude the media folder.
For me in configuration.yaml
homeassistant:
media_dirs:
local: /media
Then the /media path becomes part of /local .
And put the mp3 in a folder in HA under
/media/mp3
(The media folder already exists, you would want to add a sub folder to that, or at least I did, to keep your OCD happy.)
When I want to use an MP3, the path is
media-source://media_source/local/mp3/Ships_Bell_4.mp3
Adjust as you desire, but that is a basic version of mine. Works for all media.
Longer version in here: HA Config
What parts have you installed?
The current automation should be something like ‘when doorbell is rang, use ai to describe what is on the picture of the reolink doorbell and both send a notification to the Alexa and phone’.
How far are you in that logic?
In the future, please try to post code snippets as text, not screenshots. They’re much harder to work with as screenshots. I think you have multiple errors in your code. In your ai_task.generate_data action, you have two “instructions” keys (delete the second one, it’s unneeded); also in ai_task.generate_data, you’re missing a response_variable (should be ‘ai’ to match the message template in your mobile phone notification); and last, you have an empty notify.notify action that does nothing because it has no data (delete it). For reference, here’s a snippet from one of my automations (not shown, a time trigger and a weather.get_forecasts action to pull the weather forecast into a response variable ‘weather’):
- action: ai_task.generate_data
metadata: {}
data:
entity_id: ai_task.google_ai_task_2
task_name: Summarize Weather
instructions: >-
The time is {{ now() }}.
This is the weather forecast: {{weather}}.
Create a weather summary narrative for the next hour, 8 hours, and
tomorrow. Keep the total length of the response under 225 characters.
For temperatures, Fahrenheit can be assumed, so don't mention the unit,
just the expected range (e.g. 15-20°). This will help keep it short.
Abbreviate common weather terms as appropriate. Mention wind if it will
be unusually windy, such as greater than 15 mph sustained or very
gusty. Only mention preciptation if it is expected. Be as brief as
possible while still conveying relevant weather info for a person that
might need it.
structure:
sentence:
selector:
text: null
response_variable: ai
- action: input_text.set_value
metadata: {}
data:
value: "{{ai.data.sentence}}"
target:
entity_id: input_text.weather_summary
mode: single



