"Manual" Light Switch Interaction


#1

1) Give a description of the problem
I’m trying to build a piston that if I physically turn a light switch on at the wall it sets the level to 100, but not have that happen if done w/ any other app like ST apps or Alexa.

2) What is the expected behavior?
It works when I turn on at the wall “level” goes to 100 for just the light I switch on.

3) What is happening/not happening?
When I ask Alexa to turn on a group of lights they all turn on. Is any activation other than through WebCore seen as manual?

**4) Snipping Tool


#2

Sorry…it should have been more precise…

When I ask Alexa to turn on a group of lights they all jump to 100 in a second or two and not the lower level I ask Alexa to set them to… Is any activation other than through WebCore seen as manual?


#3

Most DTH (Device Type Handlers) don’t differentiate physical from digital. For the few that can (I have one that does now, finally) it still doesn’t work because the dimmer itself masks the input type when it sends a message back to the SmartThings cloud.

As you’re beginning to find out, differentiating between one type of an input and another is a real rabbit hole. You’ll spend days (speaking from experience) trying to figure out where the chain is broken, only to end up right back where you started.

You can set it to 100% through a variable if webCoRE is causing the activity, but telling the difference between a manual switch operation and Alexa/other means is difficult-to-impossible… unless those other means happen to trigger a webCoRE piston for their actions?


#4

Thanks! I really suck at programming and figured it was just me. When my front porch light came on at dawn this morning and then jumped to 100% I realized it was not an internal to WC vs external by Alexa issue. Seems really overly complex, but maybe I can create variable for every light that are set to a 1 if the on/off is done by WebCore, two if by Alexa (somehow), and zero if it wasn’t done by either to differentiate…or something like that…however…I’m guessing the real root cause is updating all my light switches early in the “automation game.”


#5

How are commands from Alexa reaching your lights? Does it go through your SmartThings hub or some other means?


#6

Currently, just the standard setup with Amazon home automation. The only thing I can think of maybe a virtual switch/button to know that came from there vs. the hub…and then nothing if from the wall switch.

BTW…The real root of the problem is that I don’t like bright lights and dim most of them for ambiance at night fairly low. The next time I turn them on by hand, I more that likely actually need bright light to see something and the GE-ZWave toggle switches are really slow to brighten…so you have to stop and hold the switch for a few seconds. Not the end of the world…but slightly annoying…and light switches are a pretty common everyday human interaction.


#7

I have the same switches, so I know your pain.

Another ‘solution’ you could look at is using the NuttyTree device type handler. That allows you to change the ramp rate for the dimming feature and might save you some grief. Then you can just use dimmer settings as your default and ramp them quickly by holding the toggle up.


#8

Ahh…will try that!


#9

BTW…was not thinking as it’s been over a year probably since I tied in Alexa. It IS linked to the hub. I’d just never thought of it that way (silly me). So, everything BUT manual interaction does come thru the hub and I could track software vs. physical there (or at least that doesn’t seem impossible) …more fun stuff to try :slight_smile:!


#10

Yep, that’s the other option!

If you have Alexa going through the hub, you could move her ‘activity’ to a WC piston, and then have a pretty reliable means for capturing whether a light was turned on through a program or the switch.


#11

Thanks! I think I get that, but may be missing something. Is there a way to get between the communications from Alexa coming in to the hub to capture the level I specify verbally?

I was thinking to create virtual switches that Alexa would trigger (setting a “software variable”) resetting anytime the switch was turned off (or worked from the wall) vs. the real device…use those for other WebCore pistons also and then anytime the real switch was used I could have WebCore set the switch to 100.

I’m sure my current logic flow needs corrections, but guessing you get the overall approach. Of course, I often “think” I can make something work and learn that covering all the possible interacts in behavior a human can do is a little hard to outguess :thinking:


#12

I understand what you’re trying to do, but don’t fully grasp your end-to-end system yet to make an informed suggestion.

So when you speak a lighting command to Alexa, you can verbally set the level to any percentage? If so, what path does Alexa take to get to your dimmer switch? Is it through IFTTT, then SmartThings, or straight to SmartThings? Does it trigger an app paired with SmartThings? Or an activity?

Just trying to understand the pieces in motion between you saying “set my lights to 58%” and your dimmer switches receiving the Z-wave command to do so. :slight_smile:


#13

I have the SmartThings Connect App as a Skill added to Alexa. I was having some strange issues a while back and disabled all my IFTTT access to anything. …Though I will go that away again someday. It discovers devices and sends commands directly to/from the hub. I usually use it only to control lights and via SmartThings/Alexa often set my Nest AC/Heat levels/states. I disabled it from controlling locks etc via virtual devices (primarily out of fear :). I have several groups… like for all the upstairs or downstairs lights as well as a few group that I call “mood” groups for cooking / watching movies turning on the fireplace etc. Almost all light groups have devices capable of level setting verbally. I also can tell Alex to set temp etc. Hope that helps…& Thanks!


#14

So I think this may actually be even easier in theory. By that, I mean how to set up the piston is probably obvious, but at least my first try isn’t working.

Since via both ST Pistons and Alexa I always set a brightness, the only thing I have to to make manual interaction with the switch always turn on to 100% is to reset that level anytime the switch is turned off. That way if I do it through software it always goes to whatever I tell it to, but if I flip a switch on the wall physically, it’s always set to 100.

The problem I am having is that right or wrong the set level command actually turns the lights on to that level w/out a separate command to do so.

This leaves me with a couple questions…and please keep in mind there are about 20 of these switches I need to watch.

  • One…I assume there is no way to set a level without turning on the switch…or at least not with GE 14295 switches?

  • Two…If not, is there a way to capture the state when any one in the group changes and then cycle through that all of them and only toggle the single one that just changed followed immediately by an off command? I’m assuming the capture command creates some sort of array? The already “on or off” option impacts everything in the group so without toggling them individually the piston turns them all on to 100. I’m fairly sure my wife would not be amused by that :face_with_raised_eyebrow: .

Any guidance at all would be greatly appreciated.


#15

BTW…I am pretty sure it would need to be able to break out of the piston when the final off command was pushed (or toggle some variable while running that kept it from triggering itself repeatedly) or the “turn off” of one of the switch in the group by the piston would cause it to loop forever since that was the original trigger for the piston.


#16

That is correct - something I’ve wished there was a workaround for since I bought my switches (this seems universal, not specific to GE, which I also currently have about 25 of installed now).

Can you give me a couple real-life scenarios with the room/bulb names in question? This sounds very similar to something I set up for my basement where 3 lights act as one… and I can control all of them from any switch. But different enough it won’t be a copy/paste… and I want to make sure I understand what you’re going for before I put together a piston for it.

Short answer: it can be done! I just need to fully understand what you’re after first. :slight_smile:


#17

Thanks for the help!

In short, all I need it to do is set the level to 100 ANYTIME the switch is turned off. After working with it for a while it looks like “on/off” and “set level” BOTH turn on the switch. I had assumed you could set a brightness level and THEN turn on the switch as a separate step.

But the use case is I guess from a logic standpoint easy…

-If the switch is set to any level
-Then anytime the switch is turned off
-The level is then set to 100 so the next time it turns on it’s at max level of 100 (unless ST send a different level next time before turning it on)

The problem seems to be that since apparently “set level” command is really a “turn the switch on to level X” command…and does not just set the level the switch would go to next time it was turned on.

That fact that the switch remembers it’s last level even after being turn off made me think it was a separate register…is there some other command for that?


#18

You know…after reading through what you’re doing here, I think what you really want is something like what I have setup for my lights.

I setup a virtual switch for “Sleep”. When I go to sleep at night, I tell the Echo device “Good night” and then it turns on the Sleep switch. I then have WC sitting there waiting for that switch to come on and when it does I have WC go through and set all the dimmers that I want configured to come on to only 10% the next time they are turned on. That way if someone has to get up in the middle of the night they are not blinded by a massive amount of light coming on (the vanity in my bathroom has 6 bulbs in it). Then in the morning when I wake up I tell the Alexa that I’m awake (or more usually the morning wake-up routine turns off the sleep switch) and when the Sleep switch turns off I have the piston go back around and reset all the dimmers to 100%.

The other thing I have going is that I use my Location modes to determine how bright to turn on the lights. So if I come home right after work and the mode is in Evening, then the lights will come on to 75%, but if I come home and it’s very late at night (in Night mode) then I have the lights only come on to 25%. Location modes are rather powerful for this type of setup.

I know you’ve been asking to have the lights just come on to 100% when you press the switch…but what I’m proposing is that you automate how the lights come on based on what time of day it is… That way you don’t have to worry about “is physical” or if the Echo turned on the lights. They will just be set the way you want them when you want them set that way…

Let me know if that sounds appealing…I can share some of what I’ve done so you can see how to set that up.


#19

This works, I tested it using 3 lights and every combination I could throw at it… 3 lights on, one below 99%, 2 below 99%, 1 below 99%. Multiple passes of one switch off at a time, 2 at a time, or all 3 at the same time.

You can adjust the delay to whatever suits your Device Type Handler… my lights fade off pretty slowly, so from 99% I need at least 5 seconds of delay to give my dimmer enough time to fade off and then send it’s “I’m off” message to SmartThings.

You can also change the threshold from 99% to 100%… my dimmers max out at 99% so that’s why it’s written that way; if I put 100% they would always get their level adjusted at power-off.


#20

What a community! Thanks for taking the time and effort to respond…

Mike1616…what you have set up is very cool and probably a great add on routine! What I want though is conceptually quite simpler. If I manually turn the switch on I want it bright to see something and simply want if I turn the switch on at the wall it to always go straight to 100. (but not if the command comes via ST/Alexa)

michicago

Your routine is much like mine…and unless you have a wall switch that behaves differently, runs into the same problem mine does…which I assume it does since you send a “turn off” command after the set level. Any set level command, as in the simple routine pasted in below, TURNS ON the light. It does work, but the outcome is I turn the light switch off…then it comes on bright…then it turns off. IE - The end result is correct but a light flashing back on every time for a bit every time I turn it off manually is not exactly the behavior anyone would expect out of a normal wall switch.

If there is no way to change the “last level” state of the switch without turning the light on…what I want is not possible with the products on the market today.

The routine below is just to show that if you send the set level command to a switch it’s actually “turn the switch on to level X” command as it turns on my light. Silly me, every time I had coded this type of thing before I had always sent a “turn on” command right after the “set level” command because I thought I had to do so.

The only real way I can think of doing this still is create virtual switches for every light switch that ST/Alexa would turn on and then if only the real switch alone was turned on at the wall (no toggle of the virtual) send a “set level 100” command to the physical switch.

I’m pretty sure that would work…but what a pain to rebuild all my existing routines to trigger over twenty new virtual devices. It just seems like this should be easy. I’m guessing in a few years it will be. I think there are also some switches on the market that if you do something like double tap them they go to 100, but not really feeling like spending over $1000 replacing them either…at least not yet.

Again…THANKS guys!