Motion sensor re-updating but not triggering

I started with 1 Wifi motion sensor from Tuya, to act as a simple trigger. In the dashboard log I read multiple lines with:

  • Tuya condition ‘MotionTrigger’ changed. The status ‘Pir’ for device ‘Motion’ was re-updated to pir by Tuya.
  • Tuya condition ‘MotionTrigger’ changed. The status ‘Pir’ for device ‘Motion’ was re-updated to pir by Tuya.
  • Tuya condition ‘MotionTrigger’ changed. The status ‘Pir’ for device ‘Motion’ was re-updated to pir by Tuya.

It is never reported by Tuya to go back to status None. Therefore the Logiblock is not being triggered.

How can I trigger a Logiblock upon a condition that was re-updated, instead of only upon changed?

3 Likes

Hi @rljkoster!! Welcome to the Community! :slight_smile:

This is a known limitation with many presence sensors: they only ever send one event, telling you when they have detected someone. But they don’t send you an event to tell you “nothing is happening now over here!”.

With Apilio, you can add a timeout to your PIR condition to make sure that you are using data that is recent. This is like adding a way to make the sensor “false”, even if the sensor is not capable of sending this information How to setup time constraints for Conditions: delays and timeouts

Here’s an example where we use a PIR sensor with a timeout to only turn on a light for a while after someone has been detected:

Let me know if this is similar to your Logicblock! Thanks! :smiley:

1 Like

You may find this link useful too!

@Anna, correct me if I am wrong but the timeout countdown starts the first time the sensor reports TRUE, and does NOT re-start again when there is a “re-update”

That means that, if you set the timeout to, let’s say, 1 minute, and you want to take an action when that happens (e.g. turn off lights), then that action may be triggered even if there is still motion in place.

An option would be needed (idea for @pebneter! :blush:) in conditions to set wether the timeout countdown should be reset upon a reupdate.

Obviously, if all @rljkoster needs is to detect movement (e.g. for alarm purposes), then the timeout approach may work. If lack of movement needs to be detected, then my recommendation is to buy new motion sensors (I’ve already gone through that).

:stop_sign: Update: This is how it actually works according to @Anna, so no problem here.

1 Like

Suuuuuper nice drawing, @teknofilo, please send it my way so I can update it, haha :blush:!!!

Timeout countdown is reset every time there is a new update :+1:

There it is: https://www.dropbox.com/s/ns95e25h8v2jnxp/MotionTrigger%20condition.pptx?dl=0

If that’s the case, then it should work perfectly.

2 Likes

Thank you all for the tips, it worked!

For future reference, this is how the Tuya Wifi PIR Motion sensor works now:

  • Link it to the Tuya app on your phone
  • Connect in Apilio to Smart Life (Tuya)
  • Create a Condition and link to it from a Logicblock, for example:
2 Likes

image

2 Likes

Setiing it this way, the LogicBlock will be evaluated every time the Motion Sensor sends a trigger

2 Likes

Fantastic stuff, @rljkoster!! Glad is working now as you expected it to :slight_smile: Thanks for letting us know

1 Like

You got it! Thanks so much for sharing :bowing_man:

1 Like