From 19bdc80f44d54bc12005977825c2cee6e0d56e82 Mon Sep 17 00:00:00 2001 From: kofec <18610805+kofec@users.noreply.github.com> Date: Wed, 10 May 2023 17:52:37 +0200 Subject: [PATCH 1/3] Fix typo and add userAgent info for post sync --- smarthome.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smarthome.py b/smarthome.py index 28bbd75..71f3322 100644 --- a/smarthome.py +++ b/smarthome.py @@ -759,7 +759,7 @@ def syncDevices_post(self, s): raise SmartHomeError(ERR_PROTOCOL_ERROR, 'not authorized access!!') r = self.forceDevicesSync() - s.send_message(200, 'Synchronization request sent, status_code: ' + st(r)) + s.send_message(200, 'Synchronization request sent, status_code: ' + str(r)) def notification_post(self, s): logger.debug(s.headers) @@ -851,7 +851,8 @@ def forceDevicesSync(self): userAgent = self.getUserAgent() enableReport = ReportState.enable_report_state() if userAgent is None: - return 500 # internal error + # return 500 # internal error + userAgent = "1234" data = {"agentUserId": userAgent} if enableReport: From dae78e354b8879446f886fcf8ec85b77bf1ca18a Mon Sep 17 00:00:00 2001 From: kofec <18610805+kofec@users.noreply.github.com> Date: Wed, 10 May 2023 17:59:45 +0200 Subject: [PATCH 2/3] Update Dockerfile - more generic If we use python:3-alpine we can support more architecture and have less maintenance --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a3ec879..179804e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Dockerfile for Domoticz-Google-Assistant # Install minimal Python 3. -FROM jfloff/alpine-python:3.7-slim +FROM python:3-alpine RUN mkdir -p config @@ -9,11 +9,12 @@ COPY *.py / COPY templates/ /templates/ COPY static/ /static/ COPY requirements/pip-requirements.txt /requirements.txt +RUN pip install --no-cache-dir -r /requirements.txt # Create volume VOLUME /config # Configure Services and Port -CMD ["python3 /__main__.py"] +CMD ["python3", "/__main__.py"] EXPOSE 3030 From f6366afdd64ccc0126ce35222d8b5266f053e5d4 Mon Sep 17 00:00:00 2001 From: DewGew Date: Thu, 11 May 2023 20:52:17 +0200 Subject: [PATCH 3/3] Update const.py --- const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/const.py b/const.py index 9e418de..4d1bbbd 100644 --- a/const.py +++ b/const.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Constants for Google Assistant.""" -VERSION = '1.23.6' +VERSION = '1.23.7' PUBLIC_URL = 'https://[your public url]' CONFIGFILE = 'config/config.yaml' LOGFILE = 'dzga.log'