On version - 0.101.3
I’ve neglected it recently so I thought I’d update go through trim out any old config and rectify a few issues.
The only one i’m struggling with now is my cameras.
I have 4 cameras as entities and they work great. i did have a few automations setup for a state change on the doorbell or front door based on presence -> telegram push of images grabbed from the cameras.
data:
photo:
url: >-
https://MYURL:8123/api/camera_proxy/camera.front_door?api_password=MySuPeRSeCreTPassWoRd
message: 'Time seen {{ as_timestamp(now()) | timestamp_custom(''%H:%M'', true) }}'
title: Front Door Opened!
This seems to have stopped working at some point. Hitting that URL directly doesnt work either (401: Unauthorized) so i assume legacy_api_password is depracated now.
A quick browse around the forums seems to suggest i should be using :
trusted_networks to combate this
more searching the forums -
If I fire up postman and hit https://MYURL:8123/api/camera_proxy/camera.front_door? using a newly generated LLT with the authentication set to bearer and it works. Do we have an example of how this should be formatted? I see a fair few questions about this and no full answers.
It is no longer possible to make authenticated requests using trusted networks or by appending ?api_password=X to the URL. You will now first need to get an authentication token and use that token to make requests.
Is there some reason you don’t use the URL of the camera itself to send the image? You don’t need to proxy the image through home assistant.
Aha, well that explains why the legacy_api_password wasnt working.
Although I still cant find any examples of what the connection string would look like for proxying it through if using an LLT. Reason I ask is because out of the 4 cameras i have setup, 2 of them are ffmpeg and a direct grab doesn’t work.
All of my cameras are ffmpeg, but I had no issues connecting and getting a capture. I was using a HTTP GET node in node-red to grab an image, but I have since moved over to the HA api grabbing the camera (because Node-Red already has a LLT websocket connection into my HA)
oh cool, Hmm… any chance you could throw some config of how that looks? Node-red scared me when i looked at it and I haven’t had time to re-visit it yet.
Motion Detection is a subflow consisting of all the motion sensors I want monitored outside of my house, Notifications is a “traffic light” node so that I can disable the alerts easily, set path is a function that simply looks at what motion sensor triggered the flow and creates a path to pass to the API call.