Open jamesb2147 opened 1 year ago
LMK if you need the full automation config or anything. Here's the SMTP config, in case it helps:
notify:
- name: "email"
platform: smtp
server: "smtp.mailgun.org"
port: 587
timeout: 15
sender: "postmaster@mg.foobar.com"
encryption: starttls
username: "postmaster@mg.foobar.com"
password: "foo-bar"
recipient:
- "foo-bar@googlegroups.com"
sender_name: "Home Assistant"
Can you give an example of how you would send an image link if not using the blueprint
Per the docs ( https://www.home-assistant.io/integrations/smtp ) and a quick test in the dev tools, you set it in the data section as "images".
Okay so we probably just need to add a images line to the data block in each notify section 6 or 8 places or something. Should be simple. If you have a moment so do a pull request that would be great. Otherwise I'll get to it when I can
Please try this specific branch and file https://github.com/SgtBatten/HA_blueprints/blob/smtp/Frigate%20Camera%20Notifications/Beta
@jamesb2147 any word?
Just put it into testing. Should be able to get back to you this week.
Unfortunately, that doesn't seem to have made the images available. On the web, I don't see any indication of a picture in the email or attachment, but on mobile I get a "broken image" icon in the Gmail app. Looking at the "original message" on the web, I do spot it trying to do something:
Not sure how/where that's breaking though. You're confident the URL is valid?
Two thoughts. Try with attachment set to thumbnail instead.
If no good, try the latest version on the smtp branch where i have added a baseurl to the url.
The url is the same as we use for all other notifications, so it is valid, but maybe not compatible with smtp.
any luck @jamesb2147
Hi SgtBatten. I was reading this thread as I would like to use your blueprint to notify by email. Have you had any progress? When I look at your beta it only has Notification to Mobile Device and Android TV / Group. Thanks
The SMTP things are win a seperate branch to keep them seperate during testing. Did you want to try it?
The SMTP things are win a seperate branch to keep them seperate during testing. Did you want to try it?
Yes please i would love too!
Sorry I don't need to do anything, it's just there, you need to change the branch to SMTP, or click this link https://github.com/SgtBatten/HA_blueprints/tree/smtp
You'll need to manually copy the blueprint into home assistant
Sorry I don't need to do anything, it's just there, you need to change the branch to SMTP, or click this link https://github.com/SgtBatten/HA_blueprints/tree/smtp
You'll need to manually copy the blueprint into home assistant
Got it working! Thanks heaps for your help.
Please let me know how it works for you
Describe the problem you are having or the outcome you are trying to achieve.
I am attempting to pass the image as an attachment to an already-configured SMTP integration setup as notify.email. It appears that all the Frigate integration seems to work fine, like the events trigger and we can see in the trace timeline that it's generating a link to an image.
Overall for email, text seems to work fine, for what it's worth, as I can control both the Subject and Body. It's just that the image attachment part doesn't come through.
Version
0.12.0.1
Automation config file
Frigate Config
No response
Any other information that may be helpful
Here's some trace info from a DEBUG level event where you can see some of the required info coming through:
Frigate Notification () DEBUG: Info: fps: 5, frigate event id: 1686784172.22988-elye99, object (formatted): person (Person), Config: camera(formatted): back_porch(Back Porch), Base URL: , critical: False, alert once: False, Update Thumbnails: False, Target: group (input/formatted): notify.email/email, cooldown: 30s, loiter timer: 0s, color: steelblue, sound: default, Title: Person sighted, Message: A Person was detected on the Back Porch camera., tap_action: /api/frigate/notifications/1686784172.22988-elye99/back_porch/clip.mp4, button 1 Text/URL: View Clip (/api/frigate/notifications/1686784172.22988-elye99/back_porch/clip.mp4), button 2 Text/URL: View Snapshot (/api/frigate/notifications/1686784172.22988-elye99/snapshot.jpg), button 3 Text/URL: Silence New Notifications (silence-back_porch), icon: mdi:home-assistant tv: False, tv_position: center, tv_size: large, tv_duration: 10, tv_transparency: 0%, tv_interrupt: False, Filters: Zones: zone filter toggle on: False, Multi Zone toggle on: False, Required zones: [], Entered Zones: [], Zone Filter TEST: PASS, Required objects TEST: Input: , TEST: PASS presence entity (not home): Entity: TEST: PASS, disabled times: [], State Filter: state filter toggle on: False, state filter entity: , required states: [], State Filter TEST: PASS,