Yes, I set the lights up with the Smart Lighting app. There is an option to turn switches on / off at sunset / sunrise. I limit those actions based on the mode. E.g. using Smart Lighting I turn on the kitchen and family room lights at sunset - 15 min only when mode is Home.
To handle the case where we’re not home, I will use another Smart Lighting instance to turn on switches when someone arrives. So between those two Smart Lighting instances and routines for Good Night, there are some switches in the house that we almost never touch. Which is the ultimate goal of home automation, if you ask me :).
I’m very new to Smartthings even though I have plenty of experience with coding and automation, but I’m having trouble getting the simplest routine to work reliably.
I got an Aeotec Trisensor to monitor my freezer temperature and notify me if it starts to increase. Got the Trisensor paired to the hub, installed the custom device handler, configured it to report the temperature every 5 minutes. All that works perfectly and shows up in the Smartthings app history for the device.
I set a routine that says if the temperature is above 15 F then send me a notification. I wanted to test this at room temperature to ensure it would give me the notification every time it reported the temperature if it was above 15 degrees so I would continue to get updates until the problem was resolved.
I save the routine and on the next temperature report the notification worked perfectly and pops up on my iphone. Great.
Then after that, i never get the notification again even though the temp continues to be reported every 5 minutes and it continues to be above 15 F, and it varies by several degrees when I have the threshold set to 1 degree, so its not like the temp hasnt changed either.
So if I go in an set the routine configuration again and hit Save, I get one more correct notification, then nothing after.
There is literally nothing in the Smartthings app I can see that controls repetition or reset for the temperate event.
Being new here, I read all about virtual switches and variables and modes and time settings and all sorts of interesting sounding things that are not exposed in the app.
All I want the thing to do is fire the routine every time the temperature reported meets the condition. This does not sound like rocket science, and I’m a technical guy but I don’t see anything in the app that would make the notification fire only once correctly.
Am I missing something obvious or is the whole routines thing as unreliable as a lot of folks on here are posting about? TIA
You’ll probably get a comment or two about using a five year old thread and how Routines are not the same thing they were back then. But anyway …
When device integrations generate events to update attribute values, the ‘system’ defaults to only sending those events around if there has actually been a change. However if you are seeing the events in the history even when they haven’t changed then the Routines will be getting them too so you are probably OK there.
Where you may be less OK is in assuming the Routine condition is testing for a value above 15 degrees. It is a perfectly reasonable assumption but not necessarily a correct one. You may find that the condition implemented actually only reports true the first time it is seen above 15, or it explicitly checks for it rising from below to above 15 and only reports that as true. Indeed that is my recollection of how they work and it is consistent with your description and that of others.
The Routines in the app provide a simple UI for guiding you through creating a range of very useful automations without ever needing to leave the SmartThings app. You can do a lot more with the Rules API, as it is known, than the Routines offer.
Thanks for the feedback and follow-up. Understood about the 5 year old thread because honestly it’s hard to figure out where the best source of truth lies for any particular question — I keep running across posts that include “until we have actual documentation…” which is really a challenge if there is no definitiveve reference material other than the oral traditions of the community hive mind, as much as that represents a tremendous resource and for which I am always grateful.
I’d be happy to go through 500 pages of obscure settings and switches and method calls if such a thing exists.
If there is any reference to the actual behavior of the routines as implemented to guide the possible workarounds that would be great, although it seems like that it is limited to trial and error experimentation absent documentation. As for those workarounds, it also sounds like I need to dig into development capabilities that look like they have a great deal of community-developed capabilities, instead of just doing consumer-exposed configurations in the app as I had originally planned.
Don’t be phased by the strange URL. It was the beta site for a completely new developer/documentation site but when the Edge Drivers were launched it had to go mainstream in a hurry.
I found this/your Helpful comment on SmartApps & Automations FAQ Apr 2016.
You say “A routine is a set of instructions that run one time and then are completed.”
I’m having exactly that problem.
I’m unable the get my smartthings app routine to repeat.
This is my routine:
IF: Every day Precondition Time 6:PM to 10AM repeat every day, Precondition MyIphone at my home, Echolink Mothion Sensor: No motion for 10 hours, Then: Send SMS text message to alert no movement in 10 hours.
This routine will trigger once and then never ever again, even though the routine has repeat every day.
Can you tell me how to make it run every day and alert if no movement still has not occurred.
I figured out how to create a rule and post it to my hub using Postman and this tutorial;
The tutorial has a script to turn a light on, but that’s all. And it works, but it doesn’t have a command to turn the light off.
If you can’t make the smartthings app routine work, can you help me make a java script rule that works.
Unfortunately, I personally can’t. I am quadriparetic and dependent on voice reader software these days, so I don’t do any programming anymore, and I don’t know all the details of the smartthings architecture because of that. But there will definitely be other people who can help, you can start a post in the “automation ideas” section of the forum, and someone should be able to help you there.
Also that routine will run only between 6pm and midnight. If motion happened after midnight nothing will happen as 10hrs of no movement doesn’t work with that precondition between 6pm and 10am, 10 hours of no movement will be after 10am, and if you are present. If you are not present it will not work either
Next day works, as I have similar routines for my driveway and front porch lights where if there is no motion for 3 minutes lights go to 50%. You might need to change preconditions.