New to Home Assistant and love it so far. Trying to learn as much as I can. For some reason my notifications in Home Assistant/Frigate to iOS only seem to partially work when away from the home server.
Partially, in that I’ll get the alert and there will be a mini-snapshot in the notification but if I tap the notification to make it bigger, it fails. I get an error that says “Snapshot not available”.
My setup is as follows:
UnRAID hosted Home Assistant in VM
Frigate hosted in Docker in UnRAID
Frigate passes camera feeds via MQTT to Home Assistant
HACS > Frigate
Frigate Notification Blueprint with defaults
I’m using Cloudfare for DNS pointed to my WAN address. An A record for the subdomain
Let’s Encrypt is running the SSL certificate so I can do DNS-01
Nothing is forwarded outside of the firewall
Can you think of a reason why notifications and a tiny snapshot work but a larger view doesn’t work?
I sort of went through my first Frigate setup and had to address this, at least for Android. I took the approach of using the Frigate integration to save a snapshot to a directory under media storage and then you can just reference the path under media to get the image notifications. Might not be the only solution, but it was the one that seemed to work for me. Hope this helps!
alias: Notify tablets that someone is at the door
- variables:
snapshot_filename: DoorCam_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
- service: camera.snapshot
target:
entity_id: camera.front_door_2
data:
filename: /media/snapshots/{{ snapshot_filename }}
- service: notify.all_phones
data:
title: Front Door Camera
message: Person at the front door
data:
image: /media/local/snapshots/{{ snapshot_filename }}
url: front-door-person/0
clickAction: front-door-person/0
actions:
- action: URI
title: View Live Feed
uri: front-door-camera/0
Thanks for that. What configuration file is it and where might I find it?
My automations.yaml and configuration.yaml doesn’t have anything that looks like that. I am using the SgtBatten blueprint for Frigate Notificaitons. Is there a better one you recommend?
In the UI, if you made a new automation, then switched to yaml mode and pasted this in and saved, you would see how it would appear in the automations.yaml.
Are you using any kind of port forwarding or reverse proxy to see snapshots or video clips when not connected to your home network? I haven’t been able to get your code working unfortunately. My fault, not yours The blueprint I have is working with the exception of being able to actually open the snapshot when away from home network. Oddly enough, it sends a thumbnail in the alert no way to see the snapshot.
Trying to avoid purchasing another subscription But if it works I may consider it. I’m not sure where ‘media’ and/or ‘media store added to HA’ are working from?
Here is my YAML. I’m using Cloudflare DNS and Let’s Encrypt with HA presently.
If you have your HA instance exposed to the internet on 8123 where you can get to it without something like nabu casa or some VPN type thing, its not a good idea.
If you DO have something like nabu casa or a VPN sort of thing, then you likely dont have access to the snapshot using that base URL from the app.
Media storage is part of HA, and if you are in the HA app and its working from however you are connecting to, you dont have to use the base URL anymore as you can just directly go to the path as the HA app knows how to find it.
Not using NabuCasa or VPN. HA isn’t exposed to Internet. It’s just using DNS-01 so I can use a domain name instead of 192.168.1.20.
It’s so weird the way it works. For snapshots, when I am away from home, I get a notification with at thumb nail but the snapshot isn’t available. However, if I have video clip turned on (still remote), I can watch a live view of the clip. How is that even possible?
The reason is because the notification ‘sends’ the picture as an attachment, and is stored on the device until it’s cleared… or at least thats what I have inferred from my observations and the documentation.
When you open the app, you must have access to the value of BASE_URL. If you could access your home assistant using the value in base_url when you are remote, then the clip/snapshot should show up. I will bet it does not work that way.
Makes sense! So this is where either using a reverse proxy to allow access, or being connected via NabuCasa, VPN/wireguard/tailscale at that instance would work but not having any of those things means I cannot access the ‘local’ path.