Wall switch changes mode setting/Hello, Home

Hello all!

I have SmartThings at each of my houses, one of which has a Nest Thermostat. I have added the Nest using the code I found in the forum…Works great. Now I need a way to automate it a bit more. When I am driving to town, I would like the house to preheat and change the Hello, Home or mode based on my location. The IFTTT Android location will work by setting the thermostat and turning on specific lights. However, the mode or Hello, Home programs can’t be initiated by IFTTT.

I guess what I am needing is a way for a switch on/off status to change the mode or better yet, run a specific Hello, Home routine. That way, I could use IFTTT to determine my location, which could then turn on a switch, which could then change the mode/run a specific Hello, Home. Same thing when I leave town…if IFTTT turns off a specific switch, the house goes into Goodbye mode.

I have done some coding in my time, but just started using SmartThings and haven’t dived into how to accomplish this. Anyone have any suggestions or could code this up quickly?


Check out this post:

The code you provided in that topic works great for what I needed! Thank you so much, Eric!

You are welcome. :smile:

I looked at @baldeagle072 's code in the other topic linked to above, and I see how it works, which is good.

But I’m just wondering if anyone has done this with only one “man in the middle” instead of 3 (IFTTT --> virtual switch --> virtual presence sensor).

I know this can be done with a button controller, but surely someone has code already written where just flipping a binary switch changes the mode. Or does the ST environment always require two “men in the middle,” the switch and the presence detector, to make this work?

Anyone? @MichaelS ? @tslagle13 ?

Thanks! :slight_smile:

See if these will work for you: https://github.com/MichaelStruck/SmartThings/tree/master/IFTTT-SmartApps

Hi, I know this is reviving a REALLY old thread, but your app is the closest I’ve found to dealing with roomba/irobots that set off sensors. After running for quite some time in large rooms and homes, the top of these robots get warm enough to set off PIR motion sensors.

Here is a situation, with 7 routines/modes that roughly do:
away, all inside/outside armed, except external camera motion off (for weird weather moments)
away, all inside/outside armed
sleep, all outside and almost all inside armed, ext cameras off
sleep, all outside and almost all inside armed
stay, all outside and permiter armed, ext camera off
stay, all outside and permiter armed

I have a few hundred devices using copper and WiFi Eth, zigbee, zwave, and bridged on via gateways.

I have insanely elaborate rules, and real-time integration into webcam streaming servers, file servers, music servers, old school stereos/amps, etc.

Here is the rub, at a specific time on particular day(s), regardless of the paired routine/mode active, these vacuums will start their journey, and after X amount of time, they get warm enough to alarm the PIR motion detectors.

I’ve used your smartapp routine modifier, in combination with virtual switch creators and a few smart lighting controls, to only push the routine/mode into a unique stay/vacuum setup if the vacuum comes to life during an away/away-no-cam status, and another unique stay/vacuum setup if it is during a sleep/sleep-co-cam status. Works great, and since the temp status is linked to what the previous setup was, I can reverse it when ever I want back to the original setup using another set of obnoxiously complex rules with nested semaphore light switches.

All is dandy right? Nope, if someone changes the status while it is vacumming, for example someone wakes up and flips it to disarmed, I don’t have a way to trap that and adjust accordingly, so the alarms go crazy when it reverts back to the original status after the vacuuming is done.

So then I applied even more logic to it, but the nested functions and virtual switch modifications break, especially when i need to add in all the other rules that get messed up due the silly parlor tricks.

So, , can you be incentivized to make some tweaks to your 4 year old code that supports an IF statement that stops the auto-revert to the pre-defined routine/mode when the light switch is turned off, when the status has been changed since it the light switch was first turned? For example, if status doesn’t equal what you changed it to when the app did the 1st trigger (when switch was turned on), leave the status as is, despite there being a rule that says to switch is to something else when the light switch is turned off.

Yes, your app does support only using a rule for on-only, off-only, and on-off rules, but to factor in all the combinations of a complex setup, I need somewhere around 26 different 1-way rules with pretty specific functions, and then “reset” rules to wipe out my tons of temporary (using the virtual light switches as binary values for oodles of rules) storage holders to make sure they don’t have overlapping impacts.

With that type of addition, presto, you now have a pretty kick but app that can now deal with “timed events” that would normally send off alarms, like:

  • automated vacuum robots
  • automated bird feeders
  • automated coffee pots (steam sets off PIR sensors)
  • automated bread makers
  • automated portable or room heaters
  • automated ceiling fans

That IF statement would solve a lot of problems, and open up a ton of other uses.

Thanks for reading my plea.

As a precaution and for clarity, i am using:

You should be able to do this in Webcore. :sunglasses:

It’s essentially a scripting language for SmartThings that has its own set of variables to “trap” information. Very powerful and ideal for “insanely complicated” problems. :wink:

It’s free, created by the community here, and has its own forum with lots of experts there to help you.

The following explains (the topic title is a clickable Link)