Detect Light Level from IP Cameras

Hi,

I’m looking for way to determine a light level from my IP cameras. I have a number of cameras, some inside and some outside. The internal cameras all face a main entry point for security reasons.

I’m looking for a broad brush level that is sufficient to determine if lighting should be enabled or not. I already have ESPresence sensors in some rooms which would probably be sufficient to determine if someone is in the room, but I’m looking for something to determine if it’s dark enough to turn some lights on.

I did think about place a single light sensor of some description outside and using that one source to determine if it’s dark enough… However, there are times where it’s light outside, but we have curtains closed for watching the TV / cinema etc and that it might be useful for the lighting to auto activate.

Rather than investing in multiple light level sensors for the rooms, I was wondering if anyone had done something to determine if there cameras are in night mode somehow and have a sensor on this to use for the lighting level.

I do run frigate as well, but unless there is a way I can determine the black and white image rather than the colour one, I’m not sure how I could do this.

Anyone with any bright ideas or should I go buy a bunch of light sensors!

I just ran accross this, but Unifi Protect cams expose a TON of sensors and items when you connect Protect to HA. And you can write an automation to do something if nightmode turns on, or if “is dark” = yes. Here is a pic of some of mine. If I go into automations, I can create automations that do a TON of other things with the camera input sensors…

Also, as the newest firmware for it now shows vehicle color, dog/cat/donkey/horse/etc (animal detected), audio detection of noises and marks as what it is, i.e. Dog Bark, Cat Meow, Horse Nayh (whatever a horse does), license plate number, etc… there is a TON of expantion in the newest firmware that the HA integration hasnt included yet as I am on BETA firmware for Protect.

1 Like

Looks interesting. Thanks for the reply.