Add support for base64 encoded content as notification attachment #3785
Unanswered
rlenferink
asked this question in
Core functionality
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your core improvement
It would be very helpful to add support for base64 encoded content as notification attachment
Current limitations
Currently notifications support Standard Attachments, where files need to be stored in a reachable webserver directory. Adding support for base64 encoded images also solves this.
Technical benefits
The main benefit would be to send a notification from a webhook trigger which already includes the image as base64 encoded content.
The use for this is UniFi Protect, which already offers the ability to include a camera screenshot in the body of the request. Having the ability to immediately use the base64 content solves the need to have the camera stream in Home Assistant, with a task to generate a screenshot from the camera stream. Which is currently the best alternative - but with camera streams a slight delay (mostly ~2 seconds) can already cause the detected object to no longer be visible.
Reacting on the exact data of the webhook creates better info to the end user receiving the notification.
Additional context
An alternative could be to add a
File: Writeaction to write to a file in a given directory (in my case to write the base64 image content to aexample.jpgfile) where the path to the saved file can then be used in the notification again.From a technical side if it is possible I'd vouch to go with adding support to include base64 content in notifications but I am not proficient enough in Android / iOS programming to know whether this is possible.
Beta Was this translation helpful? Give feedback.
All reactions