-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Notification images from /media/local #178
Comments
Hm, interesting, HASS.Agent will use the token that is provided during setup to access the media, but, it tries to do it only when the URI/URL points towards the domain that you have HA configured. For example:
Looks like the camera proxy works as intended because it's handled internally by the integration and a time-based token is appended to the URI provided in notification data. I tried to use full URI "https://yourha.net/media/local/ozo63ta2atr71.png" and the media only one "/media/local/ozo63ta2atr71.png" and unfortunately first one works for HASS.Agent and not for HA and the second one only for HA... I'll do a dive into Android app to figure things out and then work something out. |
Thanks for taking a look! After digging into it a little bit, I noticed that the HASS.Agent-Integration looks to be trying to deal with these (line 84): It looks like |
Did a little bit of digging and it looks like the HA Companion App is the place where the relative URLs/URIs are handled. |
@iankaufmann If you could, please test this debug release https://github.com/amadeo-alex/HASS.Agent/releases/tag/2.1.1-beta2-notificationmedia and let me know if it works as expected :)? |
Hmm, no luck.
Getting the same error, like the HTTP link is still not being passed. I tried running the installer first, and then I tried again with the .zip file and just replaced my config folder. I was paranoid because the first line of the log file is "HASS.Agent version: 2.1.0" (not 2.1.1-beta2-notificationmedia), but not sure what I could be doing wrong at this point... I ended up doing a complete uninstall, reboot, and fresh install and it still doesn't seem to be working. Is there an update required on the Home Assistant integration side as well? |
Now that's embarrassing... This is the correct one - https://github.com/amadeo-alex/HASS.Agent/releases/tag/2.1.1-beta2-notificationmedia2 (the versions will still say 2.1.0) |
Haha no worries! Glad it was that and not something deeper that was causing my specific case to not work. It's simple enough to reinstall since we can just back up the config folder, and that works well! Ran the updated installer and can confirm that now the /media notifications work great! I had developed a workaround by dumping the annotated images into a subdir of BlueIris UI3 so that there would be a webserver on the LAN that could serve them. I don't have that open to the WAN but it worked for my PC running HASS.Agent, I just needed to send two different notifications in my HA automation, one for non-HASS.Agent devices and one for mobile app devices. It worked but this will let me streamline it back into one notification group. Thanks for your work on this! |
This PR adds logic required to properly show notification images passed with relative URL - "/media/pics/image.png". Thanks to @iankaufmann for reporting! #178
I have a media source that contains annotated images at:
/media/local/BlueIrisAIAnnotated
To be clear, images in notifications work just fine if instead I use:
/api/camera_proxy/camera.blueiris_garage
So I am NOT having an issue with receiving notifications, or even receiving notifications containing images.
What doesn't work is using:
/media/local/BlueIrisAIAnnotated/garage.20241005_190403565.jpg
Using this media source for notifications works with the companion app on my Android phone, so I know that it isn't an issue with the media source itself.
I can only assume it has something to do with authentication between HASS.Agent and Home Assistant.
Is it possible to get this to work?
From Developer tools I am executing this:
I get the notification, but no image, with this log result:
Misc info (please complete the following information):
Windows build (ideally screenshot/info of
winver.exe
output):HASS.Agent version: 2.1.0
Please check what's applicable (multiple answers possible):
The text was updated successfully, but these errors were encountered: