Hello,
This is my first post, While setting an automation to turn light on when motion is detected by Hikvison cam, it works fine, but when I turn the light off after no motion for 2 min, the motion detection of the cam consider the light going off as another motion detected, so it turns light on again, then I will go into loop light on light off , light on light off etc.
My question is there a way to disable the binary sensor for the motion of the camera , then I turn the lights on and then turn the binary sensor on for motion again?
I home I made my question clear, thanks in advance for any help
You could include a condition in your light.turn_on automation that says the light must have been off for a few seconds. That way it won’t retrigger straight away.
What type of motion detection did you setup on your Hikvision ? I’m a little surprised it would consider a simple change of lighting as a motion event.
If your camera supports smart events (EasyIP 3.0 or higher), then I would highly recommend using those instead of normal motion detection. Especially the line crossing and field detection events work well. They’re a lot better in terms of false positives. EasyIP 4 adds a (pretrained) machine learning model to specifically detect humans and vehicles. So if your camera supports that, use it.
You could try playing with the delay time in the condition a little bit.
Also, if I remember correctly there is a setting in the Hikvision cameras regarding detection of light changes. If you can find that you should try reducing it’s sensitivity.
You should also change the mode: to restart as per my example.
Thank you very much for your feedback, it is not simple change of light, it is from compete light during the night to complete dark, Unfortunately I’m using a very basic hikvision IP cam which supports only basic motion detection through grid, no line crossing settings.
Again thank you for your suggestions.
I think I knew what is wrong with my code, you said in your first reply that I should
But in the code I used the binary sensor for the motion detection entity “binary_sensor.mymotiondetectorrule_cell_motion_detection_2”, not the light id “switch.entrance_53”
I think this is the problem, I will give it a try and let you know.