Skip to content

Commit

Permalink
Allow device discovery packets on port 7000
Browse files Browse the repository at this point in the history
  • Loading branch information
uzlonewolf committed Jul 7, 2024
1 parent 51f7653 commit 7d160a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tinytuya/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,13 +1402,19 @@ def tuyaLookup(deviceid):
if ip_force_wants_end:
continue

if sock is clientapp:
if 'from' in result and result['from'] == 'app': #sock is clientapp:
if ip not in broadcasted_apps:
broadcasted_apps[ip] = result
if verbose:
print( term.alertdim + 'New Broadcast from App at ' + str(ip) + term.dim + ' - ' + str(result) + term.normal )
continue

if 'gwId' not in result:
if verbose:
print(term.alertdim + "* Payload missing required 'gwId' - from %r to port %r:%s %r (%r)\n" % (ip, tgt_port, term.normal, result, data))
log.debug("UDP Packet payload missing required 'gwId' - from %r port %r - %r", ip, tgt_port, data)
continue

# check to see if we have seen this device before and add to devices array
#if tinytuya.appenddevice(result, deviceslist) is False:
if ip not in broadcasted_devices:
Expand Down

0 comments on commit 7d160a0

Please sign in to comment.