Is it possible to do any type of image processing through HA?

I have an indoor security camera (Reolilnk RLC-520A). I am currently using it as a person detector by turning lamps on when someone is in the room.

It’s working great, however I only want it to happen if the room is dark. Ideally I don’t want to buy a lux sensor.

I had the idea of making it so that the automation only triggers if the camera is in night-mode but there doesn’t seem to be any entities that I can use for that.

Is there some way I can run some code to check the video feed once per minute to check if it’s black+white (night mode) or color (day mode)?

Or is there another way I could do this that I’m not considering?

Which integration are you using to connect the camera to HA?

Are there any disabled entities on the Settings → Devices & Services page for the integration, e.g.

Screenshot 2024-06-14 at 16-19-48 Settings – Home Assistant

Screenshot 2024-06-14 at 16-19-29 Settings – Home Assistant

Could also be in the Diagnostic entities card on the integration page.

I’m using the official Reolink integration. There are some disabled entities but unfortunately they’re only for changing the camera settings.

I tried one of them that was called “Infra red lights in night mode” but it turns out that’s actually just a settings switch, not the actual current state of the IR lights.

You could try the ONVIF integration and see if the IR illumination state is exposed to that.