Skip to content

Commit 2a95d00

Browse files
committed
Update README and improve error messaging in scanner and wizard
- Added troubleshooting notes in README for battery-powered device limitations and polling warnings. - Enhanced scanner output to clarify when no IP is found, indicating potential battery-powered or offline status. - Updated wizard to provide hints for "permission deny" errors, suggesting users check their Tuya IoT subscription. - Bump version to 1.17.7.
1 parent 31adb0b commit 2a95d00

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,8 @@ By default, the scan functions will retry 15 times to find new devices. If you a
637637
## Troubleshooting
638638
639639
* Tuya devices only allow one TCP connection at a time. Make sure you close the TuyaSmart or SmartLife app before using *TinyTuya* to connect.
640+
* **Battery-powered devices** (sensors, door/window contacts, etc.) are asleep most of the time and do not maintain a local network connection. They will not appear in scans and cannot be controlled locally — they only push data to the cloud when triggered. This is expected behaviour, not a TinyTuya bug.
641+
* **Polling too aggressively can cause devices to drop or reset their connection.** Avoid polling faster than once per second for most devices. For energy-monitoring plugs and other data-heavy devices, a 5–10 second interval is safer. Use `set_socketPersistent(True)` with a heartbeat loop rather than opening a new connection on every poll.
640642
* Some devices ship with older firmware that may not work with *TinyTuya*. If you're experiencing issues, please try updating the device's firmware in the official app.
641643
* The LOCAL KEY for Tuya devices will change every time a device is removed and re-added to the TuyaSmart app. If you're getting decrypt errors, try getting the key again as it might have changed.
642644
* Devices running protocol version 3.1 (e.g. below Firmware 1.0.5) do not require a device *Local_Key* to read the status. All devices will require a device *Local_Key* to control the device.

RELEASE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# RELEASE NOTES
22

3+
## v1.17.7 - UX Improvements
4+
5+
* Scanner: Improved messaging for devices with no IP address — now clearly indicates the device may be battery-powered or sleeping and that local control is not supported, instead of the generic "Error: No IP found".
6+
* Wizard: When the Tuya Cloud API returns a "permission deny" error (or error code 1010), the wizard now prints a targeted hint suggesting the user check their IoT Core service subscription at https://iot.tuya.com.
7+
* README: Added troubleshooting notes clarifying battery-powered device limitations and warning against aggressive polling intervals that can cause devices to drop or reset their connection.
8+
39
## v1.17.6 - RFRemoteControlDevice Bug Fixes
410

511
* Contrib: Fix `RFRemoteControlDevice` - three bugs that each independently caused `rfstudy_send` commands to be silently ignored by the device by @kongo09 in https://github.com/jasonacox/tinytuya/pull/684:

tinytuya/core/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
if HAVE_COLORAMA:
102102
init()
103103

104-
version_tuple = (1, 17, 6) # Major, Minor, Patch
104+
version_tuple = (1, 17, 7) # Major, Minor, Patch
105105
version = __version__ = "%d.%d.%d" % version_tuple
106106
__author__ = "jasonacox"
107107

tinytuya/scanner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,8 +1841,8 @@ def _display_status( item, dps, term ):
18411841
name = item['gwId']
18421842
ip = item['ip']
18431843
if not ip:
1844-
print(" %s[%-25.25s] %sError: No IP found%s" %
1845-
(term.subbold, name, term.alert, term.normal))
1844+
print(" %s[%-25.25s] %sNo IP found - Battery-powered or offline%s" %
1845+
(term.subbold, name, term.alertdim, term.normal))
18461846
elif not dps:
18471847
print(" %s[%-25.25s] %s%-18s - %sNo Response" %
18481848
(term.subbold, name, term.dim, ip, term.alert))

tinytuya/wizard.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ def wizard(color=True, retries=None, forcescan=False, nocloud=False, assume_yes=
192192
if cloud.error:
193193
err = cloud.error['Payload'] if 'Payload' in cloud.error else 'Unknown Error'
194194
print('\n\n' + bold + 'Error from Tuya server: ' + dim + err)
195+
if 'permission' in str(err).lower() or '1010' in str(err):
196+
print(bold + 'Hint: ' + dim + 'This may indicate your Tuya IoT subscription has expired.')
197+
print(' Visit https://iot.tuya.com to check and renew your IoT Core service.')
195198
print('Check API Key and Secret')
196199
return
197200

@@ -208,6 +211,9 @@ def wizard(color=True, retries=None, forcescan=False, nocloud=False, assume_yes=
208211
if type(tuyadevices) != list:
209212
err = tuyadevices['Payload'] if 'Payload' in tuyadevices else 'Unknown Error'
210213
print('\n\n' + bold + 'Error from Tuya server: ' + dim + err)
214+
if 'permission' in str(err).lower() or '1010' in str(err):
215+
print(bold + 'Hint: ' + dim + 'This may indicate your Tuya IoT subscription has expired.')
216+
print(' Visit https://iot.tuya.com to check and renew your IoT Core service.')
211217
print('Check DeviceID and Region')
212218
return
213219

0 commit comments

Comments
 (0)