-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Rotary dial on Xiaomi desk lamp is unreliable #9399
Comments
I did some testing too and see no big issues. It's good to know that the dimmer only changes after TWO clicks of the dial simply because only after two clicks a rotation cycle is completed. This is a change from the initial implemtation and on purpose to fix possible direction and mis-interpretations. This also allows more stable rotation for other uses. My log below:
follows exactly what I did with the dial where every two clicks increase/decrease dimmer by 10. For completeness here's my status 0:
|
Thank for trying.
I wouldn't mind this if i couldn't stop the rotation in the middle of those 2 click. I rarely set it by counting the number of step, i am more likely to turn it 10% to 30% without looking and going down the other way around if i overshoot. But the main issue is that i have issue when i come to direction. As you might be able to see in the video, going up some time bring the brightness down and vice versa. Also when i turn the dial quickly like 50-60% at a time, it will sometime not do anything, or light up then down... could you send me your bin.gz as a sanity check ? also i didn't find doc about the rule trigger with the SetOption98, would you have those on hand so i can make rule that debug print what the dial detected in the console ? |
My binary was the current dev version as available from the dev download site. See readme. |
sorry i had no idea enabling the rotary flag at build time weren't required anymore https://youtu.be/TfHPvFWXLkk https://youtu.be/zv6-Q0GWUwU This is running the last github release with only module 66 loaded, no other change |
Same Problem here. |
- Fix rotary interrupt use of global vars (#9399) - Decrease direction change timout from 50 to 25 mSecs
Try latest dev. If your experience continues try to play with:
in file |
Tried latest dev version; |
Sorry, Can't help. Mine functions as it should. Remember, it's not that you can turn the dial quickly left and quickly right. It just cannot detect the pulses that fast as it has a hysterisis for correct direction detection. Anyway, if I do it "normally" I don't see any dimming issue. |
So, i found better performance with these values: const uint8_t ROTARY_TIMEOUT = 18; // 5 * RotaryHandler() call which is usually 5 * 0.05 seconds |
Thank's for trying, i have started to try to put back the old code who worked way better in my memory, but i don't have the energy to put in this after work for now :(
By performance you mean the higher accepted rotation speed ? or a lower number of error ? |
Lower number of error. |
I didn't do much at all, just started removing some stuff and understanding how to put the old stuff back |
Updated rotary driver with experimental optional code selections. Currently set to legacy MiDesk lamp - define ROTARY_OPTION1 (#9399)
Gents. the latest dev version contains different rotary code. The current active code (ROTARY_OPTION1) resembles closely the original MiDesk rotary driver. It is less useful on other rotary devices as it's steps are to coarse. Pls give it a try on your MiDesks and report your experiences. |
Just tried. Seems to work better than previous version, but sometimes, if i rotate clockwise the encoder after reaching full intensity, it seems to fade out and in ramdoly. |
This new mode is really smooth and work pretty well ! |
Thx. That's useful information. |
Rotary driver adjusted accordingly if Mi Desk Lamp module is selected (#9399)
something odd have happened yesterday. I am sorry i cannot explain this change in behavior. |
Same issue here. It appears randomly |
And another version to try... |
Just Tried. It seems to work better then other version. The only issue i find, is when i rotate clockwise there is a little decrease of intensity, and then all works fine. The same happens when i rotate counterclockwise (a little increase and then works fine). |
For now I have 0 issue with the last one, but let's wait for the planet to move again ok ;) |
As the planet is not yet under my control I suggest you to close this issue. |
Sorry Arendst, it was supposed to be humorous but apparently didn't come out well. @tastopesato since you've helped and have the device, i feel that it's fair for me to ask if you're ok with me closing this issue ? |
No offence taken. My request was also a bit of humorous. |
Hi @poofyteddy PoofyTeddy, in my opinion the issues encountered are so minimum that you can close the issue. |
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
after the rework on the rotary dial (and the closure of #8263), i now have tried to update my Xiaomi desk lamp.
Sadly the rotary dial isn't reliable anymore.
It will not register, or register in the wrong rotation, not change rotation when i do...
i'm thinking about the new debounce and timeout but i am not sure.
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:
Compile with rotary enable, play with the dial
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen.
each step should have an effect, and in the right direction
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
See video HERE
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: