LED Strip Smooth Dimming - Sonoff Tosmata

I was under the impression that the tosmata firmware for LED controllers would implement the transition parameter to create smooth dimming from one brightness value to another. I am using the Arilux LC01 Module flashed with Sonoff Tosmata firmware.

It seems that is not the case because brightness changes are instant.
Tried the following service call to light.turn_on as well, which was suggested here

{
  "entity_id": "light.kitchen_led",
"effect":"white_fade",
"white_value":100,
"transition":5
}

Anybody had any luck getting smooth transitions working? Thought this would be supported by Tosmata.

use command fade on in tasmota console

1 Like

That introduces only 3 brightness steps when it’s turned off. Looks choppy.

maybe play around with the speed setting
https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#ws2812-ailight-sonoff-led-b1-bn-sz01-h801-and-magichome

Reading the Tosmata commands documentation, I found some interesting ones:
fade - enable/disable fading
speed - Transition speed when turning off, does not work reliably for turning on. works with power off command. power off uses the specified speed value, however, power on uses a shorter fade interval. I am not sure what vlaue it is using, though it appears to be relative to speed, but shorter.

The firmware maintains a dimmer variable which stores its value even when the device is turned off.

wakeup - turn on and fade to current dimmer value
WakeupDuration - transition duration in seconds (like speed but for turning on)
Sleep - sleeps controller, which causes choppyness in led fading, set to 0 (off)

Note: that Speed is not referring to wall clock time. If your controller sleeps for 250ms each cycle, then a 1s sleep setting will actually result in a “speed” of 4 seconds.

So the firmware does support smooth fading. Now to find a way to integrate it into Home Assistant.

2 Likes

In case you’re still looking to solve that.
At least in Tasmota 0.9 which I installed for a LED installment today, speed is a value between 0…20. This makes a very nice fade in/out. Happy with it!! :slight_smile:

1 Like

Would you mind sharing your configuration and an example automation you have to turn on and transition your tasmota lights? Thanks!

Hi. can you please share your code with us? I am looking for the same effect.

I’m not 100% if I use that code anymore, but it should be straight forward:

Fade 0 = do not use fade (default)
1 = use fade
See also SetOption91

and:

Speed 1..40 = set fade speed from fast 1 to very slow 40
+ = increase speed
- = decrease speed
The Speed value represents the time in 0.5s to fade from 0 to 100% (or the reverse). Example: Speed 4 takes 2.0s to fade from full brightness to black, or 0.5s to move from 75% to 100%.

That’s all needed.

EDIT: Yes. Just tested it. Set FADE 1 and SPEED 4 and it fades in/out for 2s.

Thank you very much. This helps and it worked. :slight_smile:

1 Like