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

updated link: Commands - Tasmota

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.

1 Like

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

Just tried this and nothing seems to change, does this still work? Have tasmota 9.2 on some magic homes

Thanks

EDIT it does work, just not very reliably on my newer ZJ-WFMN-A v1.1 and not at all on the older ESP-IR-B v2.3

:frowning:

Has anyone tried this with ESP home?

Hhmmm. Works perfectly fine with Tasmota here for several month now on a Wemos D1.

For some reason, the Sonoff B1 RGB bulb fades twice. It looks like it fades the two white leds (warm and cool) separately and subsequently. Both for on and off. There is only a single MQTT command, I checked. So it must be in the Tasmota firmware, I conclude.