I have an automation in the new app to activate Armed (Stay) in STHM if between the hours of 10 PM and 4 AM there is no motion is detected by any of my five motion sensors for 30 minutes. The problem is that if I go to bed before 10 PM, the automation doesn’t get triggered. It needs motion to first be detected, and then motion detection to stop (so that a “no motion” event populates the history page) during the time period (10 PM - 4 AM). If all motion stops before 10 PM, then no “no motion” event will appear in the history page during the time period.
I know this isn’t the answer you want, but I had the same problem and this worked for me:
Move your start time back to 8pm (or a time guaranteed to be before you’ll ever go to bed).
Yes, I was going to do that, but it’s not uncommon for us to be watching a movie and sitting motionless on the couch at that time, so I was afraid that the automation would get triggered prematurely. If I were to change the start time to an earlier time and increase the motionless period, then it would mean the automation would trigger later than I’d prefer. Thanks for the suggestion, anyway. I guess I’ll have to settle
What if, instead of using a period of time, you ran automations to set a flag at 10pm and clear it at 4am, and then ANDed your motion sensors with the state of that flag?
The flag could be a virtual switch being toggled to on or off, or you could set a virtual motion sensor to no motion at night and just bundle it in with your other five motion sensors.
Confirm I have the same problem. I addressed it by tuning the window as mentioned elsewhere.
If this behavior is as described on this thread, the “no motion” automation is implemented incorrectly. Instead of looking for a “no motion” message in the time window, it needs to look for the absence of a “motion detected” message in the window,
Exactly right. It should be looking for the absence of a “motion detected” event instead of looking for a “no motion” event, which is actually a motion stopped event. This appears to be operating the way that it does in the Smart Lighting smartapp, which looks for a “motion stopped” event as a trigger, not the lack of motion as a condition.
I know this won’t be the answer that anyone wants to hear, but “motion stopped“ is a sensor event reported by the sensor. That means the system doesn’t have to monitor it for the whole period: When the sensor determines that motion stopped (after a motion detected event) it sends a message to the hub and then that’s what your automation triggers from. That’s how pretty much all security systems and home automation systems which rely on battery operated sensors work.
The alternative, “no motion detected“ during a specific period requires continuously monitoring because there’s no sensor event that would trigger it. It’s essentially polling even if you were just checking the cloud side. So it’s just not the way these systems are designed.
There are lots of alternative ways to handle this, but everything will be easier if you look for either a specific time trigger or a specific event trigger. Rather than the absence of one.
So then it comes down to what events are detectable for your particular household.
For a single person household, often the easiest thing is a pressure mat in the bed. If you go to bed after X o’clock, do your security routine. That one’s simple.
But as soon as you have more people than that, it can get really complicated. You just have to know your own household.
There are some households where they can just run the security routine every night at 11 or whenever and manually remember to do something different if they’re having a party or something. Or have a mode for parties or guests or whatever.
Some people can do it by triggering on the nightstand drawer being opened after 10 PM or some similar event.
So there are lots of different ways to do it, but the point is you want to trigger it from an event occurring. Not from the absence of events. Because in order for the system to be aware of the absence of events, it Has to be monitoring everything all the time, and these systems are just not designed for that.
I understand what you’re saying, but I don’t think it needs to continuously poll. It just needs to set a timer (not an actual timer, but schedule the action to happen in an hour), so that if a new “motion detected” event does not occur with that time, then it executes the action when the time runs out. If a new motion detected event occurs, it “resets” the timer.
Regardless, I’m not interested in excuses; I just want SmartThings to make it work in the way that it’s understood and should work.
The beginning of a time period doesn’t act as a trigger, only a filter. Exact time can act as a trigger. You’ll probably need to two automations: one for exact time and one for time period.
Correct me if I’m wrong, but I seem to remember a tutorial that explained how this “problem” will be solved using the new rules API.
Does anyone know when the new rules API goes live?
It’s live now, but it’s still in development:
I understand that being driven by an event is easier to program than having to set a timer and being driven by the absence of one. (No polling is needed in this scenario - you set a timer for the “Motionless Duration” period, and then suspend until you get a motion or motion stopped event, from the device or the timer fires.)
But, all of this is one for the programmers. The core user issue is that SmartThings offers a “Motionless Duration” function in the new app, and the evidence suggests that it incorrectly assumes it will receive a Motion has Stopped event during the Motionless Duration period. If so, the capability should be fixed or removed from Automations.
I’m having the same challenge. This worked perfectly in the Classic App, and is the most important Automation I have. My setup is very similar, between 10PM and 5AM the next day, while in Home OR Away mode, AND no motion detected for 45 minutes, THEN lock the doors, close the garage, turn off the lights, and set the mode to Sleep.
I CANNOT use an event to trigger this from occurring, as the entire goal of this automation is to run an action when NOTHING occurs. I never want this to run before 10PM, but if I fall asleep on the couch at 9:15 with the garage open, I want it to close the garage at 10PM. If I’m not home at 10PM, then the automation should run.
Again, this is functionality I’ve had for years, and now it is broken. So frustrating!
Anyone know how to simulate motion on a motion sensor or send a trigger saying motion has stopped?