From d8aff07785b75cd041ca69bf9f4e22890e63d429 Mon Sep 17 00:00:00 2001 From: Piotr Maks Date: Sun, 3 May 2020 17:30:31 +0200 Subject: [PATCH] Bind to random UDP port Avoid situation in which port is already in use by some other application. Also allow running simultaneously multiple instances of clients trying to link to some devices. --- lib/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/link.js b/lib/link.js index 1817127..55f2615 100644 --- a/lib/link.js +++ b/lib/link.js @@ -335,7 +335,7 @@ class TuyaLink { this.udpClient.on('listening', function () { this.setBroadcast(true); }); - this.udpClient.bind(63145); + this.udpClient.bind(0); } // 0-filled buffer