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
Clear UART read buffer before sending next command #6200
Conversation
Clear UART read buffer before sending next command, this fixes issue when all fingers became authorized after first AuraLed command is used on some sensors.
Hey there @OnFreund, @loongyh, mind taking a look at this pull request as it has been labeled with an integration ( |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6200 +/- ##
========================================
+ Coverage 0 53.71% +53.71%
========================================
Files 0 50 +50
Lines 0 9404 +9404
Branches 0 1653 +1653
========================================
+ Hits 0 5051 +5051
- Misses 0 4055 +4055
- Partials 0 298 +298 ☔ View full report in Codecov by Sentry. |
I updated to last esphome (02.2024) and now my fingerprint sensor doesnt work. |
@paolo1983 could you please provide more information what exactly sensor you are using, what ESP board you are using, how sensor is connected to the ESP. Are you using WAKEUP (pin5) Finger Detection Signal in your setup? |
@fototakas thanks for the reply. I'm using a R503 on a wemos D1 mini. I dont remember exactly how i wired the sensor to ESP but this Is my code, i'm using a sensing_pin (D2) so i suppose that i wired the wakeup (pin5) to D2. It worked for a year and now, by downgrading to 12.2023 It Is working...
|
@paolo1983 I see that D2 is defined as touch sensing pin in your configuration. Please check that D2 pin from wemos is securely connected to R503 pin 5. |
@fototakas thanks for the reply. I confirm that r503 pin5 Is connected to d2 PIN on wemos |
@paolo1983 I have a R503S sensor and are ussing it with ESP32-C3, but as before making this PR I tested it and with 8266 (nodemcu) Surpraisingly to me, my sensor works correctly with ESPhome 2024.2.0 - with UART buffer clearing enabled, and it works without this fix, but after first auraled light-up all fingers are authorised :( Now to ruleout if my fix broken your sensors setup, could you please add this to your ESPhome configuration, recompile and upload it to the wemos board. This is the link to my github fork, I disabled this fix.
|
@fototakas It works! |
@fototakas |
@paolo1983 OK, thanks for testing, It looks we found the culprit :), fix for somebody - troubles for others. Again sorry for issues. Actually I'm a bit confused now, it would be nice to know if my fix also couse issues and on ESP32 or it is only for ESP8266 with software UART. @jesserockz I think we need to rollback this commit. For those who might get such a buggy sensor, I will leave custom component on my github. |
@fototakas thanks! So i have to keep your external_components? |
@paolo1983 If you want to stay on 2024.2.0, you should keep external component. Or you can revert to 2023.12. @jesserockz #6271 created, please add it to next bug fix release (2024.2.1) And gain sorry for troubles! |
@fototakas ok, at the moment i keep the external component. |
@paolo1983 Ok, good finding. Did you found this after modified yaml with my custom component or before? |
@fototakas i already tried without your external component and with pin6 Wired but It did not work . |
Hi @paolo1983 , next time you have an issue, open an issue report, do not comment in a PR otherwise it is hard for us to track and fix. |
Clear UART read buffer before sending next command, this fixes issue when all fingers became authorized after first AuraLed command is used on some sensors.
Discussions about this issue can be found here: esphome/issues#2542
What does this implement/fix?
Types of changes
Related issue or feature (if applicable): fixes esphome/issues#2542
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#
Test Environment
Checklist:
tests/
folder).