I am trying to write an automation to control the temperature on mini split AC’s in my rental house. I am using Cielo Breeze Plus thermostats and Aeotec Motion sensors in the automation. The automation is set to monitor the motion in the room from 8:00 am to 7:00 PM. If no motion is detected in the room between those hours for 30 minutes the automation should change the temperature to 78 F. The automation works great if someone actually moves in the room between those hours but if a guest gets up early and leaves the room before 8:00 a.m the automation never triggers leaving the AC running at a cooler temperature possibly all day. Basically, the “NO MOTION” trigger actually works like a “NO MOTION AFTER MOTION” trigger. I have been through the wringer with SmartThings support and they apparently have no clue as to why it is not working. Now that I don’t have WebCore anymore I need to find a way for this to work. Does anyone have any ideas?
SmartThings Automation won’t trigger with no motion on motion sensor
Why not inverse the logic and have the default temp be 78F and if there is motion in the room during those times, set the temp to 72F (or whatever you’re using)?
I think the original Routine should execute as long as the 30 minutes without motion condition becomes true after 8am.
So I would try running an additional Routine at 8am with the no motion for 30 minutes as a condition. If there hasn’t been any motion since before 7:30 it should execute.
I found a way to make this work but it is kind of screwy. I added a virtual switch to the automation and have it trigger at the same time as the pre condition becomes true but with the same 30 min delay as i am using on the motion sensor. The virtual switch stays true after that during the day and I have it turn off at night when I want the automation to be idle. I am not at this location right now so I am not 100 % positive that the automation will work with motion during the daylight hours but it works every time if I change the temperature remotely. The next morning (if no one is in the room) it triggers at the exact time it is supposed to. No idea why the automation can’t seem to detect no motion without having that extra trigger present.
Can you post a screenshot of the Routine you have set up now?
If you have a condition saying ‘motion remains inactive for 30 minutes’ it will become true 30 minutes after a motion event occurs that says the motion is inactive, and it will change to false when there is a motion active event. The Routine will only be “triggered” to see if anything needs to be done as a response to those events. Only one of them could actually make the Routine do anything and then only if any preconditions such as time periods are true. So unless the condition becomes true during the time period nothing happens.
By introducing a switch as a second condition and arranging for it to change state early during the time period you are providing an extra trigger that allows you to detect a pre-existing true condition.
To tag on to what @orangebucket is saying, I think there is a general confusion concerning preconditions vs triggers. Preconditions are merely a way to check on the state of something:
- Is the door sensor open?
- Is it 3:00pm?
- Is the dimmer level 50%?
A Routine with just preconditions would never run and execute its Actions because there would be nothing to trigger a reason to evaluate the state preconditions. There needs to be a triggering event for that to happen:
- Motion is detected
- Water sensor detects a leak
- Door lock unlocks
Once the triggering event happens, then all the preconditions are evaluated and if they are true, then the Action(s) are executed.
It doesn’t help that the way ST UI sequences the conditions doesn’t make it clear that “When this happens” and “all the preconditions are true” then "Actions will be executed. It makes me appreciate the UI layout of a tool like Sharptools where the event/trigger conditions are clearly distinct from the evaluation of bounding conditions based on state.
There should probably be (and maybe there is) a pinned topic that goes into the detail of how routines work in the current version of the ST app. I’d do one myself but I think there are others in the forum (@JDRoberts ) who could do it better justice than I
I’ll be honest, I have very little sense of the details now. The app is not really voice-navigable, so I can’t experiment with it the way I used to. There are others who keep up much better than I do in this area.
What you are saying makes sense but what I still don’t get is why I had to put a time delay on the virtual switch that caused the automation to trigger. If I simply put the switch in the automation it still would not do anything. It had to have the same time delay as the “no motion” condition. I really miss WebCore. I could make an automation do just about anything I could dream up and the program actually made sense. I sincerely hope that SmartThings is still working on the automations program because it is severely lacking right now. There are several automations that I had In WebCore that there is simply no way to do in SmartThings routines. I understand why SmartThings did what they did but it has always seemed to me that SmartThings always pushes things out before they are anywhere near ready to work properly and let the community complain about it until they get around to fixing it. This is really bad business when people depend on the system working correctly for rental houses, etc. Sorry to vent about this but I get tired of having to spend hours and hours to fix things that were working properly before they messed with it. Thanks for the explaination
I couldn’t really get that either.
Would be good to see the exact syntax of the routine to try and understand.
When you are doing a routine and you only have a period of time or a precondition set, you get a pop-up message saying:
The time period should be used with other conditions. Add other conditions to save this routine
A precondition can only be used with other conditions. Add at least one more condition to save this routine
It is necessary to ensure that the event or condition that triggers the routine occurs within the period of time (precondition). If this is not the case and the event occurs before or after the time period then the routine is not executed.
You can use the Virtual Calendar from Aplicaciones Virtuales Mc driver, to establish a period of time with two conditions, which are not preconditions, and generate an event when the beginning of the period is met and another when the end is met.
As in your example, if between 08:00 and 19:00 and if there is no movement for 30 min:
-If is 08:00 or greater = true
-If it is 19:00 or less = true
-If no movement for 30 minutes = true
This looks very similar to what I have written. I wanted to post a photo of the working automation but I could not figure out how to attach a photo. Can you explain how to do that?
Click in this icon
or copy picture and paste
This explains a lot. When I type an answer the button that you are showing does not show up. In fact, all that I have at the bottom of the message is the reply button and the close button. Nothing at all on the right side. Wonder if that is because I am using an iPad ? Everything looks the same on the top but none of them helped. Are you using an iPhone? Maybe I can try that
No, i use android
could be in the top menu as the windows version?
Ok, I guess I’ll have to use the phone for this.
This is what I get when I try to add a photo with my iPhone. Maybe someone else can weigh in?
Never mind. It did download . It just looked like a URL on my phone.
This not will work if any of condition is meet 31 minutes or more before the init period 08:00 a.m.
Hmm, I am not there now to test it but it worked perfectly before during the precondition window pretty much any time someone walked into the room and then left for 30 min or more. The automation was written exactly the same except I added the virtual switch to make it trigger as soon as the precondition window opened. I will check it out next week. The house is in Costa Rica so I can’t get to it easily. If it doesn’t work properly, you think the virtual calendar will make it work properly?