-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Bug]: Many Errors #213
Comments
I think this already been handled in master. |
I'm not sure. The buffer:
looks like a valid 55AA message without a tail. Its length is 0xe8=232, then retcode=0. The trailing bytes are not 9966, as they would be if it was a tail of 6699 message ('a'=0x61). My point of view that this is the example that messages may come fragmented! To work it out, another check should be implemented in header = parse_header(self.buffer, logger=self)
if header.total_length < len(self.buffer):
break # waiting for the tail of the message
hmac_key = self.local_key if self.version >= 3.4 else None "Header claims the packet size is over" exceptions were results of the wrong parser, which is already fixed. |
This a a CMD 16 with the total length The check should be the opposite right? header = parse_header(self.buffer, logger=self)
if len(self.buffer) < header.total_length:
break # waiting for the tail of the message
hmac_key = self.local_key if self.version >= 3.4 else None |
My bad 😞 You are right! |
LocalTuya Version
No response
Home Assistant Version
2024.5.0b1
Environment
What happened?
A bug happened!
Steps to reproduce.
Relevant log output
Diagnostics information.
No response
The text was updated successfully, but these errors were encountered: