Master Switch: controlling scenes through both ST and Alexa. Will they stay in synch?

Here is my problem.

I currently have have 5 lights that are controlled through smartthings in my living room. i have used scenes to set these lights at various states depending on what we want. Currently have 4 scenes.

Bright - Light1=100, Light2=100, Light3=100, Light4=100, Light5=100
Dim - Light1=0, Light2=60, Light3=60, Light4=0, Light5=15
Movie = Light1=0, Light2=27, Light3=33, Light4=0, Light5=7
Dark = Light1=0, Light2=0, Light3=0, Light4=0, Light5=0

Until now we have controlled these lights using alexa. My wife does not like alexa and to her point, alexa’s comprehension and response is spotty at best. To try and maintain the smart lighting yet simplify its use, and also make sure we can use the lights when the internet is down, i have purchased a GE toggle switch. i would like this toggle switch to function as the master switch.

Desired function is, If the switch is turned on i want scene bright to activate and if the switch is turn off i want dark to be activated (i.e. all lights off).

What i have found is that if you use alexa to turn on a scene, therefore bypassing the switch you can no longer use the switch to turn off the lights because the switch was never in the on state. is there a way for smartthings to know if you press on or off without ever being in a previous state?

My current solution for this is the following.

I have created routines which call the various scenes which i previously used. These routines also do 2 additional things. 1) they set the hub state to a state i named “limit” 2) they turn on the wall switch

turning on the wall switch in each routine proved to have an adverse effect, since i used a routine to activate scene bright when the wall switch was triggered. This meant that any time you activated any of the other routines “bright” would inadvertently get activated at the step when the wall switch was turned on.

This is why i also had each routine change the state of the hub to “limit”. I used this state to ““limit”” what the wall switch does. since the hub is only in the limit state when “dim” or “dark” routine is run, i put an exclusion in the wall switch routine that says only active scene “bright” when not in state “limit”.

with this i can use the routines to activate the desired scenes with alexa and change the state of the switch to on. when the switch turns on it only activates “bright” if no other scene is already activated. although clumsy this seems to work. the issue i see with it is that if i want to implement similar logic to other rooms with multiple lights i will run into the problem that the hub can only be in one state at a time which wont allow for multiple simultaneous control of each room.

any thoughts would be much appreciated.

I would just use webCoRE and create the Scenes there. Use Virtual Switches and name them appropriately. You can also make Virtual Switches as overrides and also put the overrides in the rules (Pistons).

For Example:

Virtual Switch called ‘Dining Room Bright’

In webCoRE:
If Dining Room Bright Changes to On
Then With
Light 1 Set Level to 15
Light 2 Set Level to 30
Light 3 Set Level to 45
Etc…

If Switch 1 (Physical Wall Switch) Changes to On
And
Dining Room Bright is Off
Then with
Dining Room Bright
Turn On

If
Dining Room Bright changes to On
And
Switch 1 is Off
Then with
Switch 1
Turn On

This way you have Alexa control for the Virtual Switch and program control if the “Scene” is activated programmatically.

With the GE Plus Series, you also have double click up and down so you can activate whatever you want with those.

Hi Rontalley,

thanks for the response. With webcore, does my hub need to be online for this to function or is it something that runs locally? With the addition of the switch i was hoping to not have to rely on an internet connection in order to be able to use the lights.

Yes, your Hub has to be online. SmartThings is heavily reliant on the cloud although somethings do run locally, I do not know if “Scenes” does. Last I knew, they also relied on the internet.

Routines don’t run locally, either. :disappointed_relieved:

Only the official smart lighting feature and some parts of smart home manager run locally.

szauner, lucky for you I actually wrote/modified a smart app to do this yesterday so my memory is fresh on the topic.

What I did is I created a Routine for On and a Routine for off, then I created a virtual switch and I made the on state trigger the on routine and the off state trigger the off routine. After that, I modified the Button Controller template code from smartthings to toggle a switch for when I pressed a button, and voila.

The code is super rough still and ugly since developing for SmartThings is a pain but I can try and make it shareable if you think this will help you out.

Scratch everything I said, I might have an easier solution, but I’ve got some questions for you though.

You said “What i have found is that if you use alexa to turn on a scene, therefore bypassing the switch you can no longer use the switch to turn off the lights because the switch was never in the on state.”

Does that mean that it can never turn on/off again? or that the next button press fails? Basically, does it never work again until you call the routine you needed or does it work correctly if you trigger the switch twice?

Hi jluzonpr,

To clarify what i mean.

When i call a scene through alexa, the lights turn on however the switch does not. This is as intended since the switch is programmed as such that when it turns on all the lights in the room turn on to full brightness. So if i were to include the switch on in the each of the other desired scenes, all lights would then turn on to full brightness.

So when a scene is on and the switch is not, you are not able to turn the switch off again to turn the lights off. you can by pass this effect by first turning the switch on and then turning it back off but this is very undesirable for me.

JDRoberts and rontalley, thanks for the info on scenes and routines. This is helpful info because i thought i was going to have a more robust system capable of being internet free. since this does not look like it will ever really be the case(except limited functionality i.e. lights physically connected to a switch), i am leaning to looking into webcore. webcore seems like it has a lot of the power i would like to customize by home.

Sam

The author of webCoRE was actually hired by SmartThings! That speaks volumes on how powerful webCoRE actually is. Follow the instructions I posted above.

Just a little background. I have over 250 devices and a slew of Virtual Devices. There are plenty of ways to do things and I have tried most of them. I am heavily involved in this community and I have helped many many users. Once you start using webCoRE, you will be free from limitations!