arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.08k stars 4.78k forks source link

PWM Dimmer Fade out works, but Fade in too fast (almost instant power on) #12229

Closed Tobias007 closed 3 years ago

Tobias007 commented 3 years ago

PROBLEM DESCRIPTION

PWM Fade/Speed option only works for fade out, but not fade in.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [x] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
23:52:47.253 MQT: stat/livingroom/dim3/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":135,"Free":376,"Rules":"on Switch1#state=1 do Backlog Publish stat/%topic%/PIR1 ON; RuleTimer1 30 endon on Rules#Timer=1 do Publish stat/%topic%/PIR1 OFF endon"}}
23:52:47.461 MQT: stat/livingroom/dim3/RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
23:52:47.666 MQT: stat/livingroom/dim3/RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
23:56:24.076 MQT: stat/livingroom/dim3/RESULT = {"WebLog":4}
23:56:24.726 CFG: Saved to flash at F5, Count 2964, Bytes 4096
23:56:26.181 HTP: Main Menu
23:56:28.153 SRC: WebGui from 192.168.14.142
23:56:28.160 MQT: stat/livingroom/dim3/RESULT = {"POWER":"OFF"}
23:56:28.165 MQT: stat/livingroom/dim3/POWER = OFF
23:56:30.683 SRC: WebGui from 192.168.14.142
23:56:30.689 MQT: stat/livingroom/dim3/RESULT = {"POWER":"ON"}
23:56:30.693 MQT: stat/livingroom/dim3/POWER = ON
23:56:32.594 HTP: Console
23:56:36.374 CMD: weblog 2

TO REPRODUCE

Steps to reproduce the behavior: Config: 23:59:19.576 CMD: fade 23:59:19.584 MQT: stat/livingroom/dim3/RESULT = {"Fade":"ON"} 23:59:23.480 CMD: speed 23:59:23.488 MQT: stat/livingroom/dim3/RESULT = {"Speed":6}

Via WebGui: Dimmer is in state off: Press Toggle button -> light goes on quickly (within 0.5sec, very slight fade in visible) Press Toggle button again -> light goes softly off (fade out within few seconds

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. Fade in and out in same speed. (6 sec)

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

s-hadinger commented 3 years ago

What is your value for LedTable?

Tobias007 commented 3 years ago

I tried both - first with LedTable = 1. (same behavior, very quick fade in, slow fade out). With LedTable = 0, similar behavior, anyhow the transitions a bit smother, but still by far too fast fade in.

I also tried different LEDs, as I assumed it has something to do with the LED in the MR12 bulbs. Even removed the driver and replaced it with a simple resistor (as I have a clean, stable 12V DC power source).

s-hadinger commented 3 years ago

Did you try SetOption117 1?

Tobias007 commented 3 years ago

Yes, tried it. But still same. Ramp up very very fast. Fade out perfectly slow. When I dim manually with the slider, I could create a slow ramp up :) .. so it doesn't seem to be a hardware issue ..

Tobias007 commented 3 years ago

I tried as well another device and LED, just to be sure it's not the hardware ...

s-hadinger commented 3 years ago

I won't have time to look at it for some days. In the meantime can you share a short video?

Tobias007 commented 3 years ago

Thanks for the amazing quick support and response.

Attached the video:

https://user-images.githubusercontent.com/37033298/120128296-45133600-c1f4-11eb-9013-74647ecfea37.mov

Interestingly in the video the ramp up is visible, but the difference of ramp up and down is obvious. In reality it looks even quicker/nearly instant light up. I assume a much longer delay time for the first few dim steps is required (instead of the table an exponential formula might be useful?).

sfromis commented 3 years ago

Testing Fade 1; Speed 10 with a bulb, I do see how power on fade-in is faster than power off fade-out. This is a good fit for my psychological expectation when hitting a switch, seeing some quick action instead of it initially barely visible. OTOH, when turning off, a slower slide to dark is preferable to me. The difference I see is the lower part of fade-in being fast-forwarded. Makes sense to me.

Tobias007 commented 3 years ago

yes, when using a switch I agree it is beneficial if there is a faster ramp up. However when using light scenes a slower ramp up would be preferable. Excellent would be a setting to enforce a slow ramp up.

ascillato2 commented 3 years ago

However when using light scenes a slower ramp up would be preferable.

Ok, moving this issue to a Feature Request in Discussions.