SmartThings Community

Back Porch Light Automation Disabling


(Tom C) #1

I’m reaching out to see if there is a way to turn off my automation if my back porch light is turned on manually with the switch or from the app.

I current have a piston setup from 15 minutes from sunset to 15 minutes past sunrise when you open the back door the light will come on, and then once the back door is reopened the light will turn off. I have this setup for letting my dog out.

I recently went out to grill and it was a pain to keep turning the light back on. Was wondering if anyone has an idea now to override the automation, if the switch is manually turned on when the door is closed to keep it on till its manually turned off.

I read that you can create a virtual switch to turn off this automation but was wondering is there is another way for people in my home without access to the app. Another way I though was if possible to press the switch up twice to turn the automation on and down twice to shut it off. Or is it simpler than that.


Method to start and stop a Ceiling Fan based on an event but if the fan is already turned on, I do not want to return on and most importantly turn off automatically
#2

If you use echo or Google home then that’s another way to turn on off the virtual switch for override.


#3

Hi @Tom_C,

My use case is similar to yours, but I’ve included a motion sensor under an eve into the scenario. I use 2 Smart Lighting apps so everything runs local.

I use one Smart Lighting app to turn on my deck lights when my screen door opens between sunset and sunrise. It does not turn the lights off.

I use another SL app to also turn on the lights (or keep them on) when motion is detected during the same sunset/sunrise restrictions, but more importantly to turn off the lights after motion has stopped for 2 minutes.

The motion sensor can “see” the door and our dog on the deck, so as long as there’s any kind of motion, the light will stay on. This is also handy for when unexpected visitors (like owls and raccoons) show up after dark.


(Bryan) #4

Off the top of my head I think I’d try to do something with a variable predicated upon the switch being physically turned on and off.

I haven’t tested this, but if you look at the interactions for a switch, you’'ll see both physical and programmatic. If the physical interactions only relate to the switch being turned on and off manually, then you ought to be able to set a variable’s state to reflect if the switch was turned on or off.

Once that variable properly reflect’s the manual turning on and off, you can condition the automation to run only when the light has been turned off using the value in the variable.

That’s my theory. Haven’t actually tried it. :sunglasses:


(Antony Pugh) #5

I do just this with my outside light and door. works fine. nothing more annoying than turning on the outside lights and then someone comes out the door and wrecks it all!


(Lee Florack) #6

In such cases where I want automations to temporarily to be suspended, I either:

  • Create a virtual ‘Override’ Switch that the piston checks for at each run. If that’s on, the piston doesn’t run its automations.
  • For dimmers, I can add logic to the piston to look for a 100% setting. If the light(s) is/are set to 100%, no automation takes place.

Use cases for these two solutions are different but for those cases, they both work equally well.


(John) #7

Hi Iflorack… Is webCoRE needed for this virtual Override Switch or can this be done with Smarttthings Smartapps? Can you provide some detail on how this is set-up. I’m just getting started with Automations.


(Lee Florack) #8

I also use a modified version (see below) of this piston (by @bangali) that’s discussed over on the webCoRE Community forum. There are a couple of variations discussed, one is for a smart bulb/dumb switch and the other is for a smart switch/dumb bulb.

I’m using one like the smart switch/dumb bulb version in my workshop. Under normal circumstances, turning the light on with motion and off after two minutes of inactivity works fine. However, if my wife will be working in a somewhat ‘hidden’ corner and not moving very much while there, making the light stay on is desirable.

Just change the defined variables at the top and it should work. My version uses two sensors but you can use this with just one by removing one and changing the other to yours. Anyway, here’s my version:


(Lee Florack) #9

I use webCoRE because I wanted some other decision parameters that made it the better choice. But Smart Lighting can certainly be used. Once you create the Virtual Switch, create your Smart Lighting Automation based on motion or time or whatever you’d like and then under “+ More Options” select ‘Only if Switch’ is OFF - and select your virtual switch.


(John) #10

Hi Iflorack… Thanks for the information. I am loading over the webCoRE system to Smartthings.

I am looking to do an automations as follows:

  1. I have set up a switch (its an open close door/window switch) that can use an external dry contact to change the state from open to close. The set of contacts are closed (via SPDT relay) when my Furnace Fan is running and open when my Furnace Fan is not running. The modified window/door switch clearly shows me when my furnace fan is running and not running.

I am using this as a Trigger to Start all my Ceiling Fans in the house (Ceiling Fans run when the Furnace Fan is running). The Fans have a GE Smart Ceiling Fan Switch that is controlled by Smartthings and I set up a certain Fan speed (using the dimmer switch %).

The problem I have is… If the Fan is already on via the manual switch, I do not want it to turn off when the Furnace Fan turns off.

I have a total of 4 Ceiling Fans.

Can you give me some guidance on this?


(John) #11

I have set up the Virtual Switch. What do I use to change the state from On to Off on the Virtual Switch if the Manual Switch was used to turn on the fan?


(Lee Florack) #12

There is a SmartThings Wiki that has an FAQ to do this but it seems to be down right now. Here’s a link to a message that tells you how to create a Simulated Switch. I think there has recently been a ‘Virtual Switch’ choice added to the IDE so I’d probably use that because it runs locally.


(John) #13

I’m sorry Lee and I very much appreciate your help. I found out how to create a Virtual or Simulated Switch.

For my issue, how do I change the simulated switch from on to off or off to on when a ceiling fan is turned on or off using the manual wall switch? I can see the options for the Smart Lighting that allows me to run or not run the automation based on a switch being on or off. Just can’t see how I tie the Virtual Switch or Simulated Switch to the manual setting of the Ceiling Fan switch.


(Lee Florack) #14

To be honest, I didn’t read the entire message stream back to your original post where you described the intent regarding your fans, and determining physical vs programmatic actions. I was answering how to use a Virtual Switch to control an automation running or not - not the part about how you determine physical vs programmatic actions and then automatically turning the virtual switch on. In my case, I usually turn the virtual switch on via the SmartThings app, ActionTiles or by voice with my ten echoes. In your use case, that won’t truly address what you’re trying to do.

You need an automated way to determine if the fans were turned on manually or via automation so you can then turn the fans off - or leave them on based on which it was. Smart Lighting isn’t able to do that.

Theoretically, webCoRE can do it by tracking physical changes versus programmatic device changes. However, from what I understand most devices are not capable of reporting the difference between physical and programmatic actions. Even the ones that are, do not properly relay the needed data through a repeater. At the same time, many DTH’s are unable to determine the difference between physical and programmatic actions. So, unfortunately, it rarely works directly.

One potential way around all of this would involve using a Boolean variable and setting it to true when you use any programming logic with the targeted switch (or fan in your case) and then it will be assumed that anytime it is false that there was a physical interaction. An example of this concept is a few messages back in this thread where I posted my webCoRE piston for my Workshop Lighting (Back Porch Light Automation Disabling)

Sorry I wasn’t paying attention enough to answer your actual original question, but I hope this helps.


(Bryan) #15

This peaked my curiosity as when I posted earlier about using webCore to flip a virtual switch it was based on my theory, not my experience with having utilized this technique.

I have GE 12722 switches so I tested to see if webCore could throw a virtual switch based on physically turning the switch on and off. I found that webCore could indeed flip the virtual switch on and off when the switch was physically thrown. When the switch was programatically thrown, the virtual switch remained unchanged.

Of course, this test only pertains to a GE 12722. If you are using another switch, you may not have the same results.


(John) #16

That is the switch I am using.

I’m still trying to figure out how to do this with Smartthings Smart Lighting or Webcore.

Could you take a shot a building a webcore app using the GE Switch? If you could use some type of on/off or open/close smart switch as the trigger that would be great. I am not figuring out what I need to do with the Virtual Switch to make this work.


(Lee Florack) #17

Excellent testing (and results). I have some of those switches too, so it’s good to know. Glad you took the time to rest it out.


(Bryan) #18

Here is the code to turn your virtual switch on and off when the real switch is physically turned on and off. So with this, your virtual switch will tell you if the real switch was physically last turned on or off. This enables you to enable or disable the automated portion of what you are trying to do based upon the condition reported by the virtual switch.

Switch 1 is the “real” switch. Switch 2 is the virtual switch.


(John) #19

So Cool. Thanks very much!


(John) #20

Hi Brian.

I actually have the GE 14287 Switch. This is designed for Ceiling Fans and allows the speed to be changed.
Using your Piston and changing the names (switch 1 = GE Switch, switch 2 = Virtual Switch), it looks like the virtual switch changes to on from a physical push of the button or a software start (from SmartThings). I’m thinking this is the case because the physical paddle switch can also be used to change the speed of the fan (speed 1-2-3).

Any thoughts?