From 3c1c8aaed54f1b23911deb36d507120b3300c403 Mon Sep 17 00:00:00 2001 From: DylanSpeiser-BMD Date: Tue, 9 Jul 2024 09:48:27 -0700 Subject: [PATCH] wss --- BMDevice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BMDevice.js b/BMDevice.js index e83b415..ffaaac9 100644 --- a/BMDevice.js +++ b/BMDevice.js @@ -52,7 +52,7 @@ class BMDevice { this.name = this.hostname.replace(".local","").replaceAll("-"," "); // Initialize WebSocket - this.ws = new WebSocket("ws://"+hostname+"/control/api/v1/event/websocket"); + this.ws = new WebSocket((this.useHTTPS ? "wss://" : "ws://")+hostname+"/control/api/v1/event/websocket"); // Get a self object for accessing within callback fns var self = this;