-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MI Desk Lamp: Erratic led brightness #8120
Comments
Hi, Can you post the complete STATUS 0 Output please? Thanks. |
I understand there are multiple problems here:
Can you please confirm Edit: just after initial configuration, the bulb is set to |
i'm sorry, but i actually did post the full status0 output
I can confirm it does not overload the power supply setting those value. and the light turn off when brightness goes under 28% Thank's for the quick reply ! I didn't expect it ;) |
First issue (overload at init is fixed). I will look at PWM minimal value. |
thank's @s-hadinger i'm compiling your PR right know to confim, Sadly i'm in europe so i won't be able to do much for what is "tonight" here ;) |
Could you also do tests with Also please report if the brightness appears more linear with |
overload at init is fixed by #8121 because it reduce brightness (to what is actually visual similar to an off state), Color still being FFFF mean that touching the colors temp drastically change the light brightness |
hello @ascillato2 and @arendst, This isn't globaly fixed, and the overloading still occure if i crankup the brightness, what @s-hadinger did only avoid the device from bootlooping because it light up to bright after flash. |
@s-hadinger with ledtable at 0, the brightness is enought to turn on the light around 4%, witch is much better, but
|
I hope I solved it. First, keep in mind that by design the sum of both white channels cannot exceed 255. However you can force arbitrary values with the
With #8160 you can use Can you please report if the problem is solved? |
Add ``DimmerRange`` for PWM lights (#8120)
Thank's @s-hadinger for the hard work ! I misunderstood what #8121 did, and right now the colors gradient is still erratic after reset (i can make a quick video if needed) and touching the the colors slider does put it back to normal. So this is still to fix but it Your fix with #8160 work as advertised and i'm pretty happy with being able to chose what range to apply, event programaticaly with rule if i want, Awesome ! When the web slider goes to 0, the light is turned off, but if i use the rotary dial to set is as low as possible, it only turn off one of the pwm channel (the one least dominant it seam) , the other one stay at DimmerRange minimal brightness it seam that the way the colors step are calculated is based on brightness (you have obviously less bits to act on when the brightness is very low) and it seam it still use the 0-100% scale and not the one set by DimmerRange for this. I have no idea if my last point was clear or not ... :( if it wasn't don't hesitate to tell me and i'll try to rework my sentence :)
Once again, thank's a lot ! |
For sliders, it's a web server option whether slider put to minimum turn off the light or not. Setting Can you please explain a simple scenario to test it? On the last statement, indeed at low brightness you can't have precise colors. That's due to the reduced number of bits. |
I looked at Rotary and by design dimmer will never go below 1. Internally it may indeed shut down one channel if its brightness is too low, and keep the other at minimal brightness. Would turning rotary to minimum should turn the light completely off, or do you have a separate way to turn it off?
|
now that you mention it i sound like the 2 "bug" i've encounter are the same indeed !
But i feel like this is a majors change for anyone already using the rotary function and wanted input from other on it.
With default setting on a default theoretical dimmer who light up just enough at 1%, i should have 0 light blend capability. the more i increase brightness, the more blend i can get.
by setting dimmerrange to something like 50 100, we get something who can look like
I realise now (writing this) that it make sens if the idea is that the light won't light up correctly under 50% ( our goal here ) so your fix make 100% sense. This in mind, the only issue i still see is that overloading after reset/flash who still occurs |
before i touche the color wheel:
after i touch the color wheel:
|
Fix wrong setting of free_range after reset or restart (#8120)
* Format code with cpplint Signed-off-by: Mickael Gaillard <[email protected]> * Change PWM implementation to Arduino arendst#7231 * Support for setting the time in the Tuya MCU Switch on with USE_TUYA_TIME * Fix wrong setting of free_range after reset or restart (arendst#8120) * Fix ESP32 SCD30 compile error * USE_TUYA_TIME deactivated by default * Fix ESP32 compile errors * Fix compilation Co-authored-by: Mickael Gaillard <[email protected]> Co-authored-by: Stephan Hadinger <[email protected]> Co-authored-by: Walter Zengel <[email protected]> Co-authored-by: Theo Arends <[email protected]>
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
After Flashing, the initial brightness is way to high, causing flickering and crash if the brightness is increased to much.
As soon as you touch the light color, brightness is way to lower and have weird issue like
no mater what, it's not possible to get back at the initial "way to much" after changing the color without reseting
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:(Please use
weblog 4
for more debug information)TO REPRODUCE
Steps to reproduce the behavior:
I guess just play with the dial on a Mi Desk Lamp with the Mi Desk Lamp Module
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen.
0% brightness should be off, 1% should be the smallest stable value for all colors 100% should be the highest stable value for all colors
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
Youtube video ?
Crash when to bright right after flashing : https://www.youtube.com/watch?v=pyXMDOxBUto
Light take many % before turning on : https://youtu.be/GmKQjHyEu4o?start=0&end=21
Light fliker when to bright until it freeze/crach : https://youtu.be/GmKQjHyEu4o?t21
and on https://youtu.be/6zbgkURWb7I:
t=0 first poweron after flash, turn on with high brighness
t=23 touch the color, brightness become to low to light on, can't set it back like it was
t=31 light is finaly back on after increasing brightness
t=44 decreasing brightness just enough to have flickering led
t=50 while on the same brightness, 100% cold light up just fine, same for 100% warm, but not 50%
t=70+ demonstrating how change in colors define how much brightness is needed to get a light
ADDITIONAL CONTEXT
Add any other context about the problem here.
Because of the risk of frying stuff when brightness is to high, i would recommend setting up a warning on the wiki page if this is confirmed
The device work well with the original firmware from MI
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: