Require pyca/cryptography >= 3.1, and add tools/fake-v35-device.py #424
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.
An interesting use of fake-v35-device.py is setting
bcast_to
to the IP of either a SmartLife-running device or a gateway/hub device and changinggwId
/real_key
to that of one of your devices - doing this will cause said device to send v3.5 commands to this script, which you can then inspect and reverse engineer. This is basically how I got v3.5 support working despite not having any v3.5 devices.ttcorefunc.py is a "known good" copy of tinytuya/core.py (with most of the device stuff stripped out). By forcing it to use PyCryptodome I was able to use fake-v35-device.py to test the pyca/cryptography functions in the real tinytuya/core.py.