From e8f22b395f64e72f3aa63e3dea16f9f181305fe2 Mon Sep 17 00:00:00 2001 From: DewGew Date: Thu, 27 Jul 2023 10:55:51 +0200 Subject: [PATCH] Fix for chromecast notification when using ssl #335 --- smarthome.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smarthome.py b/smarthome.py index 43bb497..dc2ba9f 100644 --- a/smarthome.py +++ b/smarthome.py @@ -1197,8 +1197,11 @@ def play(self, s): #command "/play?soundfile.mp3@volume filename = scomm mp3_filename = FILE_DIR + "/sound/" + filename mp3 = Path(mp3_filename) + uses_ssl = ('use_ssl' in configuration and configuration['use_ssl'] is True) if mp3.is_file(): mp3_url = "http://" + IP_Address + ":" + IP_Port + "/sound?" + filename + if uses_ssl: + mp3_url = mp3_url.replace("http", "https") #make a query request for Get /sound rstatus, rmessage = SmartHomeReqHandler.playmedia(mp3_url,'audio/mp3','IDLE', 20) else: