Hi!
Do you have the paid variant of Home Assistant?
If so, you find in the settings > Home Assistant Cloud > Remoteaccess the Link to your Homeassistant Server.
I guess this is necessary to access the snapshot.
This my Yaml:
alias: Klingelnotification mit Bild
description: ""
use_blueprint:
path: TheRealFalseReality/send_snapshot_conditional.yaml
input:
condition: []
conditionSave: []
camera: camera.haupttor_snapshots
notify_device: my_iphone_entity
is_ios: true
sensor: binary_sensor.klingel_binary_sensor
data_clickaction_url: >-
[here you have to put in the path from the Remoteacess]/local/Rrring/Door/last_motion.jpg
file: " /config/www/Rrring/Door/last_motion.jpg"
archive_file: " /config/www/Rrring/Door/archive/motion_{{ now().strftime(\"%Y%m%d-%H%M%S\") }}.jpg"
notification_title: 🔔 Es klingelt oben!
it saves in /media which is not actually in the /config directory. The /media/local is only for the notification for the blueprint and not the actual directory. Got to “Media” in HA, use the sidebar, → “My media” → and see if last_screenshot.jpg is there. If you use a File Explorer add-on, /media will be in the root directory of HA.
Try using the blueprint with all the defaults and see if it works. It seems like the directory is misconfigured. It was a lot to understand when I first setup the blueprint, I really had to read the documentation in order for the media to load, but the defaults should work and you may not need to do the media_dirs at all.
Tried with all default parameters.
The screenshot has been created and saved in [root]/media/snapshots/nameofthecamera/ folder.
I can see the file from the Terminal, not from File Explorer add-on which can’t go back from /config.
I can’t see/load the picture from Media in the left HA menu because that folder is not shown at all.
I still receive a “failed to load attachment” in the Companion App.
About my config in the configuration.yaml, I followed this suggestions.
I believe that there are different behaviours based on the type of HA installation you have, mine is HASSOS.
Hey guys, thank you for the great blueprint.
Everything is working fine except that I’m getting 2 notifications at the same time.
Companion app notification history shows that I’m getting 1 under “Websockets” and one under “FCM”
You should be able to alter the path of the image to anything you choose, just make sure you have access to it, either via Home Assistant Cloud or DuckDNS, otherwise you may only get an image on local network.
If you can, save an image to you HA instance, go into services and use the notify service to send that image to your device, if it works, then it is my blueprint. If you have the same error, it is your instance. Lemme know your results Documentation. If your image is saved into /media you need to alter the URL to /media/local. Also, if ALL else fails, try using your /config/www folder, replacing /www with /local.
Example, place a jpg into /config/www, then in your bowser, navigate to <YOUR_HA_URL>/local/<FILENAME.JPG>. Those files are hosted on your device but accessible without authentication on the internet. So not recommended to use store sensitive images there, which is why I use the /media folder by default.
Then I put the same path (/media/local/snapshots/last_motion.jpg) to your blueprint, keeping all the other fields with the default parameter … but I got the “failed to load attachment” message
remove the /local in the blueprint URL, the blueprint replaces /media with /media/local so it looks like the final URL it is going to load is /media/local/local/snapshots/last_motion.jpg.
/media is not in /config but in root. I’m not sure why it cant get your image. What kind of HA install are you using?
try using /media/snapshots or /config/www (but remember to replace /config/www with /local in the notification) or any other folder that you have write access to.
shit, I will have to update the blueprint to support files in /www natively though. But it looks like you cannot write to /media at all which may be an underlying issue.
I’ve updated it to support the /config/www, try using the file path as /config/www/snapshots/{{ states[camera].object_id }}/last_motion.jpg and see if you can save the image there. This will expose the image to the internet though, but it seems like you have write issues.