Motion detection Reolink loop

I have setup automation using Reolink camera motion detection feature, to turn on light when camera detects motion.
So this part works, I mean, camera detect motion, automation turn on light.
When my light turn back off, it then trigger the cameras’ motion detection, which triggers the automation again and we start all over.

Anybody know simple solution to prevent that?

1 Like

I’ve written a check into my appdaemon which sees when the lights were turned off and if the sensor detection motion and then I make a bit of an assumption that if they are within x seconds of each other it’s light induced motion detection. A little hacky, but it works.

1 Like

Would you please share it with me? Appreciate it :slight_smile:

Sorry it’s very custom. But it looks something like this.

def motion_detected(self, entity, attribute, old, new, kwargs):
        self.log(msg="Motion Detected: " + entity)
        if "camera" in entity:
            self.log(msg="Probably Light Induced Motion")
#Get Light History and check how recent...

Actually I’ve got it resolved with a help of Reddit user. Here is the topic:

TLDR is you have to create timmer, eg. 5 sec. and then once you fire the automation to turn on light you add condition to check if this 5 seconds trigger is idle. If yes, turn on light, if no don’t run automation.