How do you stop a smart app?

Say I am using an app like Gentle Wake Up, and it gets started by some event.

How do I stop it mid cycle?

You can uninstall it. Unless there is some method coded in the app to cause it to ā€œstop mid cycleā€, which can be triggered by some event, the app cannot be stopped.

Yeah, I was going to say ā€œother than uninstalling it, of courseā€.

Weird. Calling them ā€œappsā€, but then having no option to stop a process is pretty counterintuitive. I canā€™t think of any other type of ā€œappā€ I use that cannot be stopped.

What?!

Practically every background App in Android and iPhone cannot be stopped by the user. And far too many Apps have background threads.

A few, to be precise, can be ā€œforce stoppedā€ using the Android App Manager, but this practice is not recommended.

Sure, in an OS. This isnā€™t an OS. Itā€™s a bunch of independent asynchronous execution threads.

You do have options to ā€œstopā€ a SmartApp. But, one has to define terms. A SmartApp isnā€™t ā€œrunningā€ in the sense that Safari runs on OS X. Itā€™s just code sitting there activated by external events. Those external events can come from sensors, or schedules, etc. Probably what you want to do is to kill off future scheduled executions, or disable certain sensor inputs. Thatā€™s about the only thing that ā€œstopā€ could mean. Those things could be coded into a SmartApp. Of course, one would also need a method to ā€œrestartā€ the app, which would really mean re-enabling sensors or rescheduling future executions.

What I did was created a mode titled ā€œdisabledā€ because I never switch into that mode I will go into the smart app and select ā€œonly when mode isā€ and set it to disabled. That way I can control when it gets executed. Of course not every app has that option but it is pretty easy to hack the code to put it in.

Unfortunately, there is only one Mode variable, and most SmartApps use it in the positive, not negative (i.e., ā€œrun if mode is A, B, or Cā€; rather than ā€œrun when mode not Dā€.

Thus every time you add a new mode, you need to update EVERY filtered SmartAppā€™s configuration.

Safer to create one or more ā€œmaster Virtual Switch(es)ā€ for disabling, but, while not too hard, itā€™s unfortunately not inherent to the architecture.

Iā€™ve feature requested new Device Capability ā€œModeā€ specifically for this use case, but dead in the water.

2 Likes

Any more progress on this idea yet?

I think you need to be a bit more specific, which idea? If itā€™s ā€œstop a smart appā€, there wonā€™t be any progress because that makes no sense. If itā€™s ā€œdisableā€ something, there are many ways to do that, but there is no underlying feature of ST that directly supports ā€œdisableā€. It is possible to implement smart apps that have disable functionality, for example, to disable motion-active events from turning on lights, or motion-inactive events from turning them off.

2 Likes

Well, I guessā€¦what Iā€™m looking for is the ability to temporarily disable somethingā€¦ANYTHINGā€¦GEEZ!..in ST. lol

I have seen a few threads where people are trying to get at it from one angle or another, but I donā€™t really give a crap which angle eventually gets implemented. There just needs to be a way of temporarily disabling Things.

e.g Letā€™s say I eventually get my currently wired home security alarm system integrated with my ST (working on one of the many angles on that). Well, if Iā€™m tinkering on things or doing maintenance or whatever, I will want the disable mechanism to be simple (click the disable button), easy (itā€™s right thereā€¦no searching for it), straight-forward (nothing complex to have to do or think about; there is enough complexity already lol), intuitive (doesnā€™t need to be ā€˜configuredā€™ elsewhere to make it available here or there, but is just there, where any normal person would expect it to be), and integrated by ST (I shouldnā€™t have to go around and ā€˜configureā€™ ANYTHING to make sure the disable button is in all of my apps, but it is something that should just simply be there, part of what a SmartApp is).

It would be nice if there were a disable option attached to every type of thing; including a Master Disable optionā€¦to completely disable all devices/things/apps and interactivity (e.g. no IFTTT triggers, etc).

I get that there is the issue of whether to disable devices or SmartApps, etc, and I know there are a number of ways of going about it, etc. Iā€™m not attached to any particular way of getting it done. I just want to do something that seems like it shouldnā€™t have to be a ā€˜feature requestā€™ (I have never encountered a thing or device or gadget or machine or program of any kind that didnā€™t already have some sort of disable mechanism built into it long before I ever got to touch it; no disrespect to ST. Iā€™m just shocked).

1 Like

There are hundreds (perhaps literally?) of ā€œexpected featuresā€ that are missing from SmartThings. I think what you describe is quite useful and should be available down to the individual device, actually.

But besides the custom-solution option, the only answer is ā€œTake a numberā€¦ā€; there are hundreds of feature requests in the (very much unpublished) queue.

1 Like

Indeed. :slight_smile:

4309w3u4ogijse489tuow39ijgpos9e4g089sj0g9ijw3049gu0ws94tuj

Actually, what your talking about only really makes sense as to SmartApps. Without SmartApps, devices donā€™t do anything except throw events. If no one listens to those events, no big deal.

So, if you are done being on your soap box, there are PRACTICAL ways to do this, i.e., disable a given SmartApp. Virtually all SmartApps have built-in mode restrictions available, often hidden under More Options. Give yourself an extra mode: you could even call it ā€œDisableā€. All you have to do to ā€œdisableā€ a SmartApp is to give it a mode restriction to only run when mode is Disable. Presto. Itā€™s disabled. Thatā€™s as easy as going in and throwing a ā€œdisableā€ switch somewhere, and has the same effect. :grinning:

2 Likes

Sorryā€¦I didnā€™t notice the box there. Mostly just processing things outloud. :slight_smile:

I read and completely understand the words youā€™re saying, but Iā€™m still not sure I understand.

When you said, ā€œAll you have to do to ā€œdisableā€ a SmartApp is to give it a mode restriction to only run when mode is Disable.ā€, I think Iā€™m losing you around ā€˜a mode restriction to only run when mode is Disableā€™.

I guessā€¦1. what is a mode restriction? and 2. why would it only run when mode is set to disable? Wouldnā€™t that be only run when mode is set to enabled?

Sorryā€¦I know some of this is just because Iā€™m still so new to ST. So, if there is already a thread for this, please send me there. :slight_smile:

If you tell the SmartApp only to run in a mode that wonā€™t ever be THE current mode, then it wonā€™t ever run. Your normal modes can be whatever. Thatā€™s how you disable the app. To re-enable the app, you remove that mode restriction.

Look at the bottom of the first page during the installation or updating of an app, e.g., even that Garage Vent Fans that I published, there is a selection called ā€œSet for specific mode(s)ā€. Open that up and select the modes you want the app to run in; the default is All Modes.

In some apps, this is hidden under something labeled ā€œ+ More Optionsā€. Open that up, and ā€œOnly when mode isā€ is there. Same outcome.

OKā€¦yepā€¦Iā€™m on it. Thanks!

Nowā€¦looking for where to create a new mode (i got this)ā€¦

1 Like

Go to the Dashboard, click the 3 dots upper right, My Locations, Gear icon, scroll to bottom of that page. This is one of the more obvious destinations in the app, and Iā€™m shocked that not everyone finds it immmediatly :grinning:

Haha, ya, I just accomplished same via the IDE. :slight_smile:

I totally see it now.
So, to disable it, just uncheck all of the other modes and check the one I created for this purpose. Yes?

Then, if I want to add this functionality to other SmartApps that lack it, is there any chance itā€™s just a matter of finding the right section of code and copy/paste it into my other SmartApps?