How to dim lights on and off smoothly?

I have a variety of lights that support dimming. However, they don’t transition from one dimmed setting to another. Ideally, I would like lights to dim up or down smoothly instead of just turning on to this set value abruptly. How do I achieve this?

What is the switch and what type of bulbs are you using?

The GE Link bulbs are being operated directly, so no separate switch for those.

I have some incandescents that are operated from a GE dimmer which do dim smoothly when operated directly by the switch but are abruptly set when I change the dimmer value from the app on that switch.

1 Like

ah ya the GE bulbs don’t have the transition in there. I could probably add it though. I’ve heard people complain about them so I didn’t put it in there.

1 Like

My recollection is that the GE’s don’t support it, at least not from the Hue bridge.

Ah, and I imagine the Hue bulbs don’t have this problem? The GE’s are dimmable so what is the limitation—the rate at which you can send a the signal?

Hue bulbs support an additional parameter “transitionTime”, which defaults to 400 milliseconds, but is settable anywhere from 100 milliseconds to 30 minutes.

Note that this parameter is NOT supported in SmartThings’ Hue integration, so you’ll see 400ms transitions from one state to another, and that’s it.

1 Like

I will second the desire for smooth dimming support of the link bulbs aka Fade Rate. I bought a few today and set them up to dim in the evening and it was quite a show watching them in all the different rooms. Mine are connected directly to the ST hub and it seems to work really well. For a $15 connected bulb that is.

2 Likes

It would be nice to have the option of smooth dimming if we want it for a specific application. I will probably be buying several more of the GE bulbs and would like smooth dimming on some of them but not all of them.

5 Likes

Has anyone looked any further into this? Transition time is required by the ZigBee Light
Link standard, so I’m sure the GE Link bulbs support it.

I’ll be taking a look over the weekend to see what (if anything) can be done for adding support.

1 Like

Yes. Please put dimming in for the Link. I would buy you a beer if you did. :smile:

1 Like

It turns out that this is super easy to do. I’m still just learning the basics, but here is a quick example which demonstrates transition time:

def setLevel(value) {
    log.trace "setLevel($value)"
    def cmds = []

    sendEvent(name: "level", value: value)
    def level = new BigInteger(Math.round(value * 255 / 100).toString()).toString(16)
    cmds << "st cmd 0x${device.deviceNetworkId} 1 8 4 {${level} 1500}"

    log.debug cmds
    cmds
}

1500 (1.5 seconds) is the defined transition time here. I think there are a number of issues which can be addressed in this device type. For example, why power it on and then change the level? I’ll post a complete device type when I have something I’m happy with.

5 Likes

@kelchm did you test this with a GE Link? I tried something similar and couldn’t get the bulb I tested to dim smoothly. When I added the transition time, it stopped responding to the command. I also tried writing the transition time attribute in the config to no avail. I saw a comment in the Zigbee dimmer device type that writing to the transition time attribute wasn’t working though. I used the below from the Zigbee documentation. I’m sure I was doing it wrong though.

"st wattr 0x${device.deviceNetworkId} 1 8 0x10 0x21 {1400}”

The snippet I included works perfectly with my GE Link bulbs. Honestly I’ve just started diving into both the SmartThings and Zigbee documentation so I probably won’t be able to answer why your snippet doesn’t work for a little while yet.

2 Likes

How do I add this code to my bulbs?

I got it working using your code. So much nicer to have the transition. What was the next step you were working on? I think I want to try and incorporate that into a tile or preference that the user can adjust to their liking.

This is great! The set level works perfectly. A couple of questions:

  1. Is it possible to dim the light up or down for the on/off operations?
  2. How come when I dim down, I cannot dim with any double below 7.0?
  1. The device type is currently using the on/off zigbee cluster (0006) for turning the bulb on/off, which does not have the TransitionTime option that we can add to the on/off command. If my reading of the Zigbee documentation is accurate, the on/off command will automatically use the TransitionTime attribute since the device incorporates both on/off and level control; so we need to write to the TransitionTime attribute, which is something I mentioned above (ST currently doesn’t have it working either based on the Zigbee Dimmer device type code). If we could write to that attribute, the bulbs would always fade up/down at that rate unless we override the speed as part of a set level command.

  2. Do you mean you can’t select anything that low? Or that the bulb turns off when dim settings lower than 7 are chosen? It could be that the minimum level that the bulb supports is around 7, so it turns off below that point.

Thank you for your reply.

As for choosing a number below 7, when I tried say 5, it simply wouldn’t do anything. This isn’t a problem for me was more just curious. Thank you for the work you’ve put into this because its one of the things I didn’t like about the Links.

Ohp

Found an issue with dimming below 7. We’re not padding the hex value, so if the value is “a” we’re sending “a” instead of “0a” That one should be easy to fix. I can also add a transition time.

I do write a default transition time, but I don’t think its sticking.

2 Likes