Automation for android notification with attachment #368
apaperclip
started this conversation in
General
Replies: 3 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the quick reply!
and I see info level and debug level logs for werkzeug. When the %3F is in the URI I do not get a log entry for the request at all. 2/3 Thanks for the reply and information. |
Beta Was this translation helpful? Give feedback.
0 replies
-
If its not in the logs at all, then my guess is that the request isn't getting to flask. Flask actually sits behind nginx, so you could also look at the nginx logs |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Blake,
I had three observations I wanted to share.
HA 117.6 in docker
Frigate custom component
Frigate 8.0 beta integration in a container (not the addin)
image: /api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}.jpg?format=android
. I found this did not work like the previous camera proxy path. Once I puthttps://my.domain:port:/
in front like your example, images started working again . I thought this was odd and was chatting with dshokouhi on the android discord channel. The android app should be prepending the base url whenever it receives just the path. Looking at the android app logs I see that when supplied with just the URI, the app is url encoding the ? to %3F and something in the flow does not like it and was 404'ing the request. This encoding should be fine, but I wanted to see where the issue was. Looking at my traefik logs, it passes the request on through and gets a 404 back from something.I also bypassed traefik and went http direct to 8123 of home assistant had the same behavior, ruling out traefik.
I hit the frigate enpoint
events/id/snapshot.jpg
taking the event id from the .jpg image above that the app was using and it did not work if I used %3F, I had to use the ?.I don't know if this is coming from the HA api reverse proxy, or something inside frigate. What logging can I turn on and where (integration? docker container?) to find where this an issue?
I think I could get around this by using
/api/camera_proxy/camera.front_person
that the integration creates. But I wanted to know if there was there a reason you went with pulling the image from frigate itself vs using the snapshot from the snapshot camera entity.Another item that came up while I was discussing with dshokoui was the HA docs at https://developers.home-assistant.io/docs/api/rest dont have an endpoint for // like we have here with /frigate/notifications. Is this approach HA supported? I can hit the /api/frigate/notifications image endpoint without authenticating to HA (used incognito mode from a browser). Whereas the api/camera_proxy endpoint requires auth and its handled by the app.
In testing of item 1 I removed the android query parameter and found that the image was larger in my notification shade on my Pixel 3a/android v11 and filled the width of the notification. I don't think it was stretched or anything. This could make items 1 and 2 moot for me, but if others want the android format, they may have issues with combination of scenarios.
Sorry this became a lot longer than expected. If you want this info shared as issues or elsewhere please let me know.
Beta Was this translation helpful? Give feedback.
All reactions