Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances the scanner's ability to detect and identify Tuya devices running protocol versions 3.4 and 3.5, particularly when devices are unresponsive. The changes improve user feedback by clarifying that devices could be either v3.4 or v3.5 until a response is received, and refine the protocol detection sequence to prioritize v3.5 identification.
Changes:
- Enhanced error messages and debug output to indicate that unresponsive devices are "likely v3.4 or v3.5" rather than assuming v3.4
- Deferred version confirmation until actual device response is received, rather than marking v3.4 as confirmed immediately
- Reordered protocol prefix detection to check for v3.5 before v3.4, improving v3.5 device detection reliability
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the handling and messaging for devices running Tuya protocol versions 3.4 and 3.5 in the
tinytuya/scanner.pyfile. The changes clarify version detection logic, enhance user feedback with more accurate hints about possible device versions, and refine the protocol detection sequence to better distinguish between v3.4 and v3.5 devices.Improvements to device version detection and messaging:
Refinement of protocol detection logic:
Closes #671