What I’m trying to do it make a “night time” light in the hallway. If someone gets up because they need to use the bathroom, I want my upstairs hallway lights to come on… but only at like 10-15% so it’s not blinding. Then after 5 minutes or so, they shut off. (actually, what they do is after 5 minutes they go up to full brightness, then shut off so that if I turn the switch on in the morning it comes on fully.) That part of course isn’t hard.
I also want this to happen only at night. Ideally I’d use the light sensor for this, but I’m still working on if that’s the best way. I think I’ll move to that but right now I just have it set so that it only works from 9:00pm to 5:30am.
I also want this to happen only if the light is off. If the light is on I don’t want the app to trigger. Because (feel free to skip the italics if you don’t want to read the whole story):
I put my kids to bed at 9:00 (for example). Then I go back downstairs with the wife for a few hours. Little Billy gets up to use the bathroom at 9:30. Hallway light is off, so it clicks on (dim)… Billy uses the bathroom, goes back to bed. Light turns off after 5 minutes. At 10:15 little Suzy needs a drink. She goes into the hallway, light turns on (dim), she gets her drink and goes back to bed. Light turns off.
Then around 11:00 the wife and I head to bed. We turn the light on using the AUX switch on the main level. Because this is an AUX switch it does NOT register with the HUB right away that the switch is on. (The main wouldn’t either actually as it’s thru the Mesh network, no directly tied to the Hub.) The light goes on but SmartThings doesn’t know this yet. We walk upstairs and the motion sensor sees us. At this point ST does not know that the light switch is on and the light sensor hasn’t updated either. ST thinks the light is off and the area is dark. So the motion sensor sees us and says: I have movement and the light is off, therefore I’ll turn the light to it’s dim level and turn it off in 5 minutes.
So what I need is a way to get (near) instant updated information on the light level or switch status. I’ll testing the polling command and see if that’s quick enough when I get a chance. My fear is that while it will be quick it may not be quick enough.
The steps in my program would be:
Motion seen
Poll light sensor.
Test light level, it’s above x, then don’t run app
Otherwise, run app.
Unless that poll function returns a lux level immediately the light level test is going to use old data. What I really need is a way to trigger a poll when I turn on the light on the main level. That gives at least 3-4 seconds before I come up the stairs and trip the motion sensor. But there’s no way to do this presently short of another sensor on the main level.
(The other option is to delay running the app slightly to allow updated lux info, but this also isn’t desirable. I want that light to come on as soon as possible when someone is leaving their bedroom at night. If it pauses 2-3 seconds before running that’s most of the distance to the bathroom.)
The firmware update mentioned by Duncan is promising:
In a future hub firmware update (the one after the next one), the hub will poll these out-of-range switches much faster than the current 5 minute poll that comes from the cloud, hopefully on the order of seconds. That change will help with getting timely updates of switch changes.
http://build.smartthings.com/forums/topic/manufacturer-review-gejasoc/#post-4663
Assuming this works as advertised, this should solve my problem.
Switch is turned on via Aux on main level.
We walk upstairs (2-3 seconds)
Sometime during this walk upstairs, the Hub polls the out of range switch and reports it as on.
We come into range of the motion sensor. The app triggers, but the test for if the light is on or not reports on, so it doesn’t dim.
I do NOT know of this updated polling proposed will update Lux levels on the order of seconds. If so, then I could also use the light sensor for this.