go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Create API endpoint to query if camera is reachable

Open PetePeter opened this issue 1 year ago • 1 comments

I'd like to setup a HA automation to try reset a smartswitch that my camera is plugged in to, in case it sees my camera as being unreachable.

So, i tried

http://lipaddress:1984/api/frame.jpeg?src=alfresco_hi

in curl when the camera is off. and .... go2rtc returns 200 with a content length of 0. It should return a different http code, such as 204.

Alternatively, please make a new end point to check for camera reachable or not.

Thank you

PetePeter avatar Dec 04 '24 11:12 PetePeter

workaround. use the frame.mp4 endpoint which returns 500 when camera not available

PetePeter avatar Dec 04 '24 11:12 PetePeter