I also need to decrease it after x minutes, or when motion stops. Anyone know how to do this? Turning on or setting new dimmer value after motion is easy.
I have two Hue outdoor lights that I leave at 50%. For security, I’d like to increase them to 100% when motion is detected on the Hue outdoor motion sensor, and then decrease the lighting back to 50% after 5 minutes or something. The first half is easy, but I only see an option to turn off after x minutes, not change dimmer level. I’m using a ST v2 hub.
Webcore is essentially a scripting language for smartThings. Community-created, it is very powerful. And there are many community members who will be glad to help you if you get stuck on anything. They even have their own forum.
See the FAQ: (the topic title is a clickable link)
I do the exact thing with a simpler solution. I have an automation that will turn my porch light to 100% for 10 minutes if the Ring detect motion sunset-sunrise. I created a second automation to take care of turning the lights back on. Basically the second automation says if porch light is off sunset-sunrise (which it is 10 min after motion), turn it back on to whatever setting (50% in your case)…
Oh nice, that would work too. I think I’m going to take a look at scripting, as I’d like to receive alerts that state specifically which device threw the alert, rather than just which zone that I currently have.
My script has “evolved” over time and most certainly not the most efficient use of code. I have also had some issues with timed events recently so I wanted to keep it simple. I try to start with my intent and work backwards to the code. I can always look to optimise later.
Turn on at 30% at sunset
Between sunset and midnight, increase to 100% on motion
Between sunset and midnight, reduce to 30% when motion has stoped for 2 minutes
Turn off at 10 mins after midnight.
I find the rules piece the mot interesting and challenging part of home automation. Good luck with yours!