diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html
index 3e10c49c..84b97e32 100644
--- a/data/interfaces/default/settings.html
+++ b/data/interfaces/default/settings.html
@@ -490,7 +490,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
Use Websocket (requires restart) [experimental]
Instead of polling the server at regular intervals let the server tell us when something happens.
- This is currently experimental. Encrypted websocket is not currently supported.
+ This is currently experimental.
diff --git a/plexpy/web_socket.py b/plexpy/web_socket.py
index dc2a3f29..0d4fc88a 100644
--- a/plexpy/web_socket.py
+++ b/plexpy/web_socket.py
@@ -37,10 +37,13 @@ def start_thread():
def run():
from websocket import create_connection
- uri = 'ws://%s:%s/:/websockets/notifications' % (
- plexpy.CONFIG.PMS_IP,
- plexpy.CONFIG.PMS_PORT
- )
+ if plexpy.CONFIG.PMS_SSL and plexpy.CONFIG.PMS_URL[:5] == 'https':
+ uri = plexpy.CONFIG.PMS_URL.replace('https://', 'wss://') + '/:/websockets/notifications'
+ else:
+ uri = 'ws://%s:%s/:/websockets/notifications' % (
+ plexpy.CONFIG.PMS_IP,
+ plexpy.CONFIG.PMS_PORT
+ )
# Set authentication token (if one is available)
if plexpy.CONFIG.PMS_TOKEN: