diff --git a/plugins/wyze/.vscode/settings.json b/plugins/wyze/.vscode/settings.json index b6769e77cb..64c6e46ba0 100644 --- a/plugins/wyze/.vscode/settings.json +++ b/plugins/wyze/.vscode/settings.json @@ -1,6 +1,6 @@ { - "scrypted.debugHost": "scrypted-nvr", + "scrypted.debugHost": "127.0.0.1", "python.analysis.extraPaths": [ "./node_modules/@scrypted/sdk/types/scrypted_python" diff --git a/plugins/wyze/package-lock.json b/plugins/wyze/package-lock.json index 6953e439e7..b258d3961c 100644 --- a/plugins/wyze/package-lock.json +++ b/plugins/wyze/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/wyze", - "version": "0.0.55", + "version": "0.0.56", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/wyze", - "version": "0.0.55", + "version": "0.0.56", "devDependencies": { "@scrypted/sdk": "file:../../sdk" } diff --git a/plugins/wyze/package.json b/plugins/wyze/package.json index 11786583e5..2a6d1775eb 100644 --- a/plugins/wyze/package.json +++ b/plugins/wyze/package.json @@ -38,5 +38,5 @@ "devDependencies": { "@scrypted/sdk": "file:../../sdk" }, - "version": "0.0.55" + "version": "0.0.56" } diff --git a/plugins/wyze/src/main.py b/plugins/wyze/src/main.py index fb71aceedc..b40ec39ff3 100644 --- a/plugins/wyze/src/main.py +++ b/plugins/wyze/src/main.py @@ -305,11 +305,12 @@ def kill(): pkill(aprocess) async def ensureServer(self, cb) -> int: - server = await asyncio.start_server(cb, "127.0.0.1", 0) + host = os.environ.get("SCRYPTED_CLUSTER_ADDRESS", None) or "127.0.0.1" + server = await asyncio.start_server(cb, host, 0) sock = server.sockets[0] host, port = sock.getsockname() asyncio.ensure_future(server.serve_forever()) - return port + return host, port async def probeCodec(self, substream: bool): sps: bytes = None @@ -414,7 +415,7 @@ async def getVideoStream( print_exception(self.print, e) raise - rfcPort = await self.rfcSubServer if substream else await self.rfcServer + rfcHost, rfcPort = await self.rfcSubServer if substream else await self.rfcServer msos = self.getVideoStreamOptionsInternal() mso = msos[1] if substream else msos[0] @@ -441,7 +442,7 @@ async def getVideoStream( a=rtpmap:97 {audioCodecName}/{info.audioSampleRate}/1 """ rfc = { - "url": f"tcp://127.0.0.1:{rfcPort}", + "url": f"tcp://{rfcHost}:{rfcPort}", "sdp": sdp, "mediaStreamOptions": mso, }