WebCoRe - Dim Lights Over Time

Apologies if this isn’t the correct area for it.

How might I go about setting my lights to dim steadily over a period of time within WebCoRe please? For example, bedside light dimming from 80% to 10% over the period of half hour?

Any ideas welcome.

Got it! Thanks very much :slight_smile:

Here is one you can import …

1 Like

Are there restrictions on the devices this will work with or is this just basically a ‘set level’ every x ? I had tried this once before using some Hue lights if I recall - granted I wasn’t doing this over a 30 min time span, mine was more like 5 or 6 seconds - but I couldn’t get it to work. (The hue bulbs are paired to the Hue bridge vs directly to the ST hub)

One of the problems I’ve consistently had (that seems to manifest itself with most dimmable devices - though is more obvious with colors) is that if the last color for say a hue bloom was red, and the next time I turn it on I want it to be blue, and I want them to fade on at some rate, they’ll either flash the previous color and then transition or if I’m dimming, they’ll kind of hunt for the level… so if I want it to hit 100% over 4 seconds, it’ll often immediately jump to 100%, then drop to some level (I’m guessing this is maybe where the “on” command would have sent the Hue bulb had I only sent that command - default doesn’t seem to keep 100%), then it might fade back up to 100% or occasionally it’ll fade back and forth for a second before settling on something - not always 100%…

What connects the two? Most devices (based on not especially consistent observation) will ‘turn on’ as a result of you sending it a set level/fade to level command, but unless its already on and at some level, it seems like most devices want to go to the last dim rate/level etc. (It was really most noticeable in the Hue lights - or at least thats what got my attention). The use case for me was that I wanted them to fade up to red at some level after bedtime so I could see without being blinded - or more importantly, without waking up my GF… But instead what I got was an almost instantaneous 100%, then a drop to whatever level. And it seemed to be consistent about it too (or rather consistent about not doing quite what I wanted…)

In any case, I’m pretty sure I’m misunderstanding something. I’ve got some outdoor lights (decorative) that I have come on at sunset and then slowly fade over the course of the evening till they’re at a very low level - but not off. Right now I’m using the ‘Smart lighting’ and have it changing at various intervals which is annoying because I end up with like 10 different smart lighting instances - mostly to make sure it actually does it (not uncommon for me to get up at 2 am for some water only to be annoyed that the lights are on full bore without explanation…)

Which brings up another point - what happens with the example above that ‘happens at sunset’ if it misses the window? Say a blip in the network connection and it misses the sunset event? I feel like there was a piston kicker in the old CoRE or something. I can think of logic to check whether or not sunset has occurred, but - and this would really apply to any potentially ‘missed’ event, it’d be nice to not have something that has to check if something “is” in a state along with an “occurs at an event”. Almost seems like it would make sense to have EVERYTHING be an “is” and just have a timer running that runs all the pistons every few minutes to check and make sure it got em all…

Sorry if I went off on a tangent there :stuck_out_tongue:

Can’t speak for zwave (and Hue might be a bit quirky if you use the Hue hub), but this problem is typical for zigbee and it simply has to do with how the zigbee standard is structured. A zigbee setLevel command transitions from the current level to the new one. An off command transitions from the current level to 0 thus turning off; however once the device reaches 0, it sets the level back to whatever it was just without turning on. This enables the light to return to its previous state when turned back on. The problem is when you send a setLevel command to a device that is off because the first thing it does is go immediately to its saved level, then transitions to the new one. Hence the flicker back to previous state initially.

Your best bet is to set these lights to 0 level at night rather than just turn off. That way they always start at 0.

1 Like

Makes sense I guess - makes resuming a ‘scene’ a simpler set of command, or rather *A* command… ON. I’ll have to do some experimenting. I wonder how much that extra amount of commands adds up time wise with the number of devices… One thing I have noticed is that if I use the Hue app to control the Hue devices, they’re crazy responsive. From the ST hub to the Hue Hub, not so much. Though I suspect this is because its sending individual devices commands (I think I saw a smart app/device handler to group them in a way that the Hue hub would understand - just ran out of motivation).

Anyway, thanks for the suggestion! Now to figure out a way to do global Arrays in WebCore without driving me nuts :slight_smile:

Has anyone found a way to fade to a time? In other words, instead of fading from 100% to 25% in 1 hour, I’d like to turn my lights on at sunset -30 min and fade them to 25% at 10pm. Doesn’t seem like I can enter a time

Would this be possible with an expression?

I haven’t tried it so I’m guessing here, but you could go something like duration = 22:00 (ie, 10pm in 24-hour time) - sunset time + 30?

Hey, guys. Not trying to hijack this thread, but I have a natural follow-on question.

I am a brand new WebCore user and just successfully created my first couple of Pistons. (yeah!)

Thanks to this thread, I have a light that brightens to a certain level over a long-ish time by controlling a dimmer switch. I want my bedroom lights to slowly turn on when the alarm clock goes off to help me wake up.

I now want to interrupt the procedure if the lights are externally modified in any way (e.g. physically at the dimmer switch, via the mobile SmartThings app, Alexa integration, etc.). I have all the external modifiers set up, I just need to know how to interrupt the routine. That way if the routine fires on a day when I could sleep in, I can just turn off the lights.

Currently, I can turn off the dimmer mid-routine, but the routine just turns them back on again as the next level is set.

Any thoughts on the best way to do this?

@Brad Stone, I’m a relative newbie here as well, but I’ve been messing with the example piston below, which says that a user manually turning on/off a switch will override the motion sensor turning on/off the lights. Maybe you can glean something useful from this?

Motion Based Lights Except when Manually Turned on

i know this comment is old, but i wanted to provide an alternative.

ST has an official SmartApp called Gentle Wake Up. It creates a virtual device controller, that when triggered begins this process. If you turn off the light in the middle of it, it’ll just turn back on and continue the process. The way to stop it is to turn off that virtual device controller (which I do with Alexa).

It supposedly has a rule to jump to the end of the process is one of the dimmers is manually turned off, but that hasn’t really worked for me as well as just turning off the controller device.

the benefit of the controller device is that i can trigger that in a number of different ways.

Not sure if the Gentle Wake Up is an app you want to provide as an alternative at this time. The reason for that is it requires users install the Classic app. Most new users are starting out with the new app plus all users are considering the switch to the new app. Possible this app may be converted at some point in the future to be used in the new app or perhaps not. But choice is good. If someone wants to use, don’t let my post stop you :slight_smile: