Trigger an automation when an IP on my LAN is accessed

I’m trying to create an automation that will trigger when a specific IP address on my LAN is accessed by any browser on my network. I’m not sure this is even possible but figured there are smarter people on this forum then myself.

I have an OctoPrint server running with a webcam attached. The webcam is always on and feeding to the server which can be accessed by any browser pointing to a specific IP address. Since i don’t want to leave the basement lights on all the time i would like to setup a small lamp/light that turns on when the webcam is accessed by any browser. (I will access via laptop or via phone) Then when the browser tab is closed the light would in turn shut off.

I was thinking some sort of reverse proxy that when accessed could send a webhook message then redirect to the camera feed…Not sure how that would turn off the light though…that could always be on a minute timer. Doubt I’ll be watching for more than a few seconds here and there.

Love to here some ideas from the community!