Motion Based Light EXCEPT when Manually turned On

manual
except
off
light
motion

#197

sure. in fact i am pretty sure i had done something similar for another user. i will check later to see if i can find it. if not i will modify this and share here.


#198

thanks


#199

try this:


#200

@Drlungbarrow try this for setting up various rooms https://community.webcore.co/t/rooms-manager-smartapps-and-rooms-occupancy-dth-smarter-lighting-with-rules-driven-lighting-thermostat-routines-now-with-window-shade-control/1813?u=pcgirl65


#201

I have kind of a mash-up of requests that made it impossible for me to get started on my own. If you give me the basic logic template, I’m sure I can take it from there, though…

  1. Lights should come on using a motion sensor
  2. Lights should turn off after 10 minutes of inactivity
  3. Lights should STAY on, if turned on with Google Home
  4. Light Level should depend on a lux sensor
    a) 35% if lux = 800-1000
    b) 70% if lux = 400 - 800

I’ve got all of this working (minus the “stay on” portion) in 4 different pistons right now, so like I said, I’m pretty confident that if you get me the basic logic structure, I can work out the kinks :slight_smile:

Thanks!


#202

i dont use google home … is there a way for the piston to distinguish that the light was turned on by google home?

EDIT: note that there is a still a way to do this if the piston has no way to distinguish if the light was turned on by google home or manually. then when turned on by google home or manually the light would just stay on.

have you checked out this app? using a few settings often its possible to handle a entire room and its devices:


#203

WOW! That app has a LOT of features! I agree that it would probably do what I’m looking for. Unfortunately, when I create a room, set the name, then hit SAVE, it gives me an error, and doesn’t save the room :frowning:


#204

The ST log definitely shows the “turn on” event coming from the Google Home, so it should be possible to distiguish.

If you don’t mind building me the logic framework, I will put in my devices, and see if we can get it to work!


#205

whats the error shown in the IDE log?

did you publish both the rooms manager and rooms child smartapp and the rooms occupancy device from the IDE?


#206

DUH… no. I hadn’t installed the device. I got it all working, but it doesn’t do what I want in terms of changing the light based on the lux sensor, so it’s back to the pistons :slight_smile:


#207

sure it does. just create 2 rules for those lux values. :slight_smile:

or use AL settings to automatically change the level / color temperature with time of day.


#208

The trick I use for this portion of your dilemma is using a Simulated Switch.
(make sure you choose a unique name)

Piston 1:
If SimSwitch turns on
Then turn on favorite lights
End IF

If SimSwitch turns off
then turn off favorite lights
End IF


Piston 2: (the one you are working on)
If Motion changes to active
then turn on favorite lights
End IF

If Motion remains inactive for 10 minutes
and
SimSwitch is OFF
then turn off favorite lights
End IF


The hardest part may be training your household to use the new SimSwitch for Google instead of asking it to turn on the specific lights like they are used to doing…


#210

nah not really that hard. Just name your simulated switch to the name of your lights the way your used to, and rename the original lights to something else


#211

That would work very well…

And if it is a group of lights that Google Home toggles, then you can delete that group, and name the Simulated Switch the same name


#212

did the posts from @WCmore and @Gopack2 solve what you were looking for?

if not please dont hesitate to ask any of us here.


#213

Those are good ideas. I’ve asked for some help with the logic from some friends, but they haven’t had a chance to help out yet.

I’ll post what we come up with, if it does the trick.


#214

try this. i slightly modified the first piston in this thread for what you mentioned in your post. i have set the level to 35% when lux is above 800 otherwise to 70%. if you want to set the level to something else when the lux is below 400 thats an easy change to the set level statement.


#215

Hello everyone,
I’m new to smart things and completely new to WEBcore (and of course I still haven’t figured out how to start…)
I’m sorry because my issue it’s probably something very easy, but I have to admit…I’m lost!
What I want is to have a simple motion sensor activated light controlled by movement, but I also want to capability to disable motion sensor pressing a Flic button I have in my bedroom.
Can somebody point me to the right direction? I don’t know ho w to program, perhaps a piston already made would save me a lot of troubles…
Many thanks


#216

try this:


#217

I like this @bangali, is that an exclamation point on line 47?
I have never seen this before…
Does that toggle the boolean variable each time it is pressed?