Camera continuously switching between day/night modes

Denis28

n3wb
Aug 15, 2020
2
0
Ukraine
I bought the camera Hikvision DS-2CD2421G0-IW. I was glad that it records a great picture even in low light conditions. So I decreased sensitivity in the settings from 4 to 6, so the camera switches to the night mode in the lower light:
DayNightSwitchSensiivity.png

But now I'm having an issue - the camera during dawning and sunset continuously switches every 5 seconds for about a half an hour.
I tried to find a solution on the internet and what I understood: when the camera switches to the night mode it removes IR filter from the lens matrix allowing more light to come on the lens, the camera thinks that now it's lighter and it switches to the day mode where it puts IR filter back. This causes to receive less light from the environment and the camera thinks that it became darker and switches back to the night mode causing endless looping...

I found on the internet the following solution for other cameras: it's required to increase hysteresis - set different sensitivities for night and day modes. For example - set 6 for switching to night mode and set 3 for switching to day mode. This prevents continuous switching.
The problem is that I haven't found how to do it for my camera. On the above screenshot, we can see that the camera provides only one common setting that serves for both switches - from day to night and from night to day.

Are there some tools or some sort of hidden settings where I can configure it?
If not, what else can I do in order to solve this issue?

What I already tried:
  1. Updated firmware from manufacturer site - this didn't help - nothing was changed.
  2. I tried to enable and disable Smart Supplement Light and its modes - nothing helps.
  3. I tried to disable IR light at all - the camera switches every 5 seconds during a half an hour even without embedded IR light!
  4. Tried to increase filtering time - everything remains the same except one thing - now it switches not every 5 seconds, but every 20 seconds or like this.

I would be very grateful if someone helps me or gives more ideas on how this issue can be solved.

Thanks in advance!
 
Ideally you shouldn't be letting the camera dictate when to turn to Day/Night Profile. You should either hard code a time to have it switch profiles or use an external program to flip the cameras to the day/night profile at sunrise/sunset (or whatever time you want). There is a handy program here to do that for Dahua cams but not sure it will work for Hikvision.

Not sure how you are with scripting, but you could write a simple script that would interact with the camera's API and flip it to night/day at sunrise/sunset.
 
I understood...
It's not a problem for me to write some script or program. I found out that day/night mode can be easily changed with triggering the following URL with PUT method and XML in the body:
http://CAMERA_IP/ISAPI/Image/channels/1/ircutFilter
<IrcutFilter>
<IrcutFilterType>night</IrcutFilterType>
<nightToDayFilterLevel>6</nightToDayFilterLevel>
<nightToDayFilterTime>5</nightToDayFilterTime>
</IrcutFilter>

But I couldn't switch it to day/night at sunrise/sunset or at specific time because the camera is mounted indoors - there can be enabled electric lamps light at 2 AM, for example, meaning that the camera should switch to day mode even at this time because it has good light conditions. Also, window blinds can be opened or closed at different times every day - and this also means that it becomes lighter or darker at different times in the room.

That's why I need automatic day/night switching, I couldn't bound it even to sunrise/sunset.

So now I see only one solution - using an external light sensor which should transfer light level to PC where my application reads it and triggers the above camera URL to switch day/night mode. This solution is good for me because I can implement my own switch algorithm which switches to day mode at one light level and switches to night mode at second level, this will prevent switch loop.

One obstacle is: I couldn't find such USB light sensors on the internet to buy it. I found only one device: Yocto-Light-V3 - Tiny USB ambiant light sensor (lux meter)
But it costs as a half camera price. This is a bit expensive camera extension.

I'm still resenting why Hikvision manufacturer couldn't handle this issue in the camera causing me to look for an external day/night autoswitcher...

Could someone help me please to find some acceptable USB light sensor or something that will allow me to read light level in my application?