I’m using the app to turn on a hallway light when motion is detected between sunset and sunrise. Of course I have it set to turn off the light after motion stops. The issue I’m pretty sure I’m having is that if the light is triggered to turn on just before sunrise it will never turn off (because nothing triggers) so my light stays on all day.
I couldn’t find the code anywhere to see how this code should function, but it sure seems to be working like that. Maybe if I said stay on for 3 minutes before turning off it wouldn’t stay on, but that’s now how I want it to work.
Can someone that knows this code tell me if this is the way the code is written to work?
1 Like
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
Unfortunately, the code for Smart Lighting is frustratinglyclosed source / proprietary (unlike >80% of older SmartThings SmartApps and Community developed SmartApps). This makes it impossible for the Community to offer the quality free assistance we generally try to do. So… I highly recommend Rule Machine.
Okay … I tossed out Smart Lighting and went with Rule Machine. Much more powerful, but surprise surprise the same thing happens to it. It seems like it’s missing a motion inactive signal. Maybe I’ll just try shutting it down on a timer instead of motion inactive though I think the way I have it is more appropriate.
According to the hub my sunrise time is 7:39 and I programmed sunrise +30. It seems to be that if the event triggers the lights on before the sunrise trigger and motion is constant until after that time trigger, the light/rule does not run to turn the light off. I could be wrong, but that’s what it seems like.
If you look at the two event captures below you’ll see that the last time the light was trigger on was at 7:45:21 which is just after motion was detected on the Multi at 7:45:19. From that point forward even though motion inactive was seen 3 times the light was never affected.
I thought this detail may mean something to somebody. I can always add a rule that says if the light is still on after sunrise +40 to turn it off. But I’d love to know why this happens.
I stopped using the Smart Lightning and use Lighting Director. It is more reliable than the Smart Lightning but it does not have the sunset and sunrise features. It is worth a try and the Rule Machine will truly solve your problem if you were comfortable to deal with the IDE.