-
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
Fix TUYA state machine (in TUYA v1) #20110
Conversation
@blakadder The original reporter of the issue has validated the change but it would be great if you could also do some tests on real hardware as I only tested against simulator or anyone having Tuya devices... |
Hi @barbudor I tried the current development branch, with an additional LOG in the TuyaSerialInput if 0x55 is received and the state machine is reseted. I set a datapoint value to 0x55. After restarting the tuya device this data point (with 0x55) value couldn't be decoded. You can see it in the following LOG. Between the datapoint 148 and 149, the device sends another datapoint which couldn't be decoded, because this is the datapoint for which I changed the value to 0x55
Test again with the build of your branch. The LOG output looks good! The datapoint with id 37 will be decoded now (you can see the 0x55 in one of the first payload data!
|
Thanks a lot @benjaminnestler for testing and reviewing @arendst Unless we find another tester, that sounds good Thanks |
Thx both. |
* rework state machine * some comments * wip * looks good now * little updates
Description:
Related issue (if applicable): fixes #20086
The TuyaSerialInput reception was resetting the state machine with any incoming 0x55 byte even in the data.
This PR rework the state machine with a simpler and more robust one.
The original issue reporter has validated the PR but it would be great to get more testers
I only tested against simulator
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass