Notification if motion NOT detected for a period of time

Hello everyone. I currently use Apilio in a, ‘turn my lights on when I arrive home, if it is after dusk’ setup which I made with a lot of valuable help from the old Google forum. As that involves only 1 condition, 1 variable and 1 logic block I’ll be on a Starter Plan. But I want to spend the next couple of weeks to see f I can extend my knowledge and ability. Find other uses for Apilio.

I’m wondering if anyone can help with my current project? I have an elderly parent who lives alone and I am concerned about them taking a fall or coming down with another illness. My parent refuses to wear a personal alarm or similar device.

I have a Briliant motion sensor which connects to IFTTT.

Ideally what I want to do is: If (between 6:00 am and 9:00 pm) there has been no motion recorded (in the last 60 minutes) then send me an Android SMS.

I get that I need a Variable and a Condition for the time my parent is usually awake. Can I use Apilio to assess if motion has been recorded in the last hour? Ideally, I would want to filter out time sitting still watching television etc.

Any help you offered would be appreciated.

1 Like

Hi there,
I have heard of at least one other user quite a while ago who did exactly the same.
I would have a boolean variable “motion_detected” be updated to true whenever the Brilliant motion sensor detects movement. Then add a condition which requires the variable to have been updated in the last 3600 seconds (so it will be seen as “false” if it was not triggered lately).
Finally, create a logicblock that is checked every hour and make it send you a message. Of course you can add another variable and condition to limit it to times where you actually expect movement.

Do I need a way to change the variable back to false after a period of no motion? Am I right in saying that if I don’t, the variable will always be false? To address this, I have created an IFFTT applet using the Date/Time and Apilio services - If 15 (and 45) minutes past the hour, then update a variable to false. So the variable becomes true on motion and then inside the next 30 minutes, it returns to false. Thoughts?

This is the setup I have created:

Boolean Variable:



I have an IFTTT applet using the Date/Time and Apilio services - Every hour, initiate an evaluation of the logicblock. and IFTTT applets to SMS me different responses depending on if it is a positive or negative result.

The way I see it, every hour the logicblock is evaluated. If in the last 3600 seconds the variable has been true, I would get an SMS. Likewise (with the current setup), I would also get a message if it had not.

I have set the motion (changing the variable to true) using the sensor and also used an IFTTT button to change the variable. I can see the variable is changed, but every hour I get the same negative response.

Any thoughts?

Do I need a way to change the variable back to false after a period of no motion?

You don’t need to. The “Modified within” restriction takes care of that. The variable can always be “true”, because if the data is older then 60 minutes, it will be considered to be “false”.
Try deactivation your scheduled set-to-false IFTTT applet and re-check.

Did you see that you can test a logicblock in the frontend manually? It will tell you the result and also list in detail why it came to the conclusion.

Clearly I was overthinking it. That’s great and it seems to work when I use the iFTTT button. The motion sensor communicating with IFTTT and onto Apilio however has been problematic. That has nothing to do with Apilio.

Thanks very much for your help. It always seems so simple once it’s up and running.

1 Like

I can’t get this work. Any ideas would be appreciated. I am unable to get the IFTTT applet, if motion then update a variable to true (or false/toggle) to work.

In trouble shooting, I confirmed two IFTTT applets that work:

  1. if motion then send Android SMS; and
  2. if button widget press then update an Apilio variable to true.

So I know the sensor is communicating with IFTTT and causing an action and I know that IFTTT can change the variable. I just can’t understand why the motion can’t catch the variable in any way.

This is really strange. It sounds as if there’s a problem in IFTTTs routing of events.
I will try to find help at IFTTT to investigate this.

I always appreciate your prompt help. If it helps, through more trouble shooting, I have discovered that when I cause motion on the sensor and then click “check now” in the IFTTT applet a short time later, the variable changes to true.

Further, I have a Brilliant door sensor (reed switch) and an IFTTT applet using that device also fails to update the variable in Apilio. However, a Brilliant globe seems to be working fine, with the variable changing as it should within a couple of minutes.