jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
937 stars 167 forks source link

scan for tcp connection #232

Closed beachbumbob closed 1 year ago

beachbumbob commented 1 year ago

I have 4 smart plugs with name SH-P01. Then have have only have open tcp ports open, according to NMap. I would love to be able to find my plugs. This is a feature request, not a bug. Not sure how to add lables otherwise I would have marked it a feature request.

Sincerely Beach Bum Bob

uzlonewolf commented 1 year ago

When Tuya devices are fully configured, they should start sending out broadcast packets every few seconds announcing their device id and what protocol version they're using. If your devices are not doing this then I would look into why. If you cannot receive the broadcast packets then the only way to figure out the device id and protocol version is brute force - you start trying known ids and versions until you get the device to respond. I've started on adding this to the scanner in #177 but it needs some clean-up still.