Repository navigation
Who should upgrade
Anyone using force-scan (-force or forcescan=True) on v1.20.0 or v1.21.0. Since v1.20.0, force-scan never identified a v3.4 device — even with the right key — because the v3.5 hello overwrote the nonce the v3.4 reply is checked against, and on the pyaes backend (no AES-GCM) it crashed with NotImplementedError at v3.4 key negotiation. Both are fixed here.
This patch release also addresses #581: repeated failed key negotiations were reported to lock devices until power-cycled. A key that failed at an IP is now not retried there for an hour, which reduces the knocks — it doesn't prevent them. A device whose key fails can show Skipped for up to an hour; the key saved with that IP is tried first.
And the scanner output is friendlier: when a device isn't found but another device now answers at its saved IP (the router reassigned the address), the device listing says No Response - saved IP now used by <other device> instead of a bare No Response — connecting to that saved IP fails with a confusing key, version or payload error (914/904) because a different device answers there.
Changes
Bug fixes
- Force-scan identifies v3.4 devices again: since v1.20.0, force-scan's v3.5 hello replaced the nonce the v3.4 reply is checked against, so a v3.4 device was never identified, even with the right key, and every key was retried on every scan. With the pyaes backend (no AES-GCM), force-scan crashed with
NotImplementedErrorwhen it reached v3.4 key negotiation; it now skips the 3.5 hello there. Via #770. - Force-scan no longer repeats failed key negotiations: each v3.4/3.5 key attempt is a new connection and session negotiation, and repeated failures were reported to lock devices until power-cycled. A key that failed at an IP is not tried there again for an hour (within one process), so such a device can show
Skippedfor up to an hour. The key saved with that IP is tried first. A stray print of raw device data on each rejected key now needs debug on. Via #770 for #581. - Scanner output: when a device isn't found but another device now answers at its saved IP, the device listing from
python -m tinytuya devicesand the Wizard now saysNo Response - saved IP now used by <other device>instead of a bareNo Response. Sub-devices are skipped (they share their gateway's IP). Via #769.
No API, parameter or file-format changes.
Install
pip install --upgrade tinytuya==1.21.1
PyPI: https://pypi.org/project/tinytuya/1.21.1/
Note: TinyTuya now requires Python 3.10+. Python 3.7–3.9 users should stay on v1.20.0.
Full changelog: v1.21.0...v1.21.1
Contributors
Thanks to the community members who made this release possible:
- @MarkCupitt — the #581 forensics that pinned the cause on force-scan's key brute force
- @hluhome — reported #581
- @jasonacox — #769, #770, #771