diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2025-11-30 18:25:50 +0000 |
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-11-30 18:25:50 +0000 |
| commit | 2b291699debd7fbcd0abd4e68359f9d839dd3a89 (patch) | |
| tree | d3897f339147aa525324a09e6257c27703bb24ad | |
| parent | 7143ff0243487745868f41fcd0d97cfe2d9c5771 (diff) | |
| download | power.eda.gay-master.tar.gz power.eda.gay-master.zip | |
| -rw-r--r-- | mqtt-client/Dockerfile | 8 | ||||
| -rw-r--r-- | mqtt-client/mqtt-client.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/mqtt-client/Dockerfile b/mqtt-client/Dockerfile index 12c8a53..be304a1 100644 --- a/mqtt-client/Dockerfile +++ b/mqtt-client/Dockerfile @@ -1,12 +1,12 @@ -FROM debian:11-slim +FROM debian:12-slim ENV TZ=Europe/London RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update -y RUN apt-get install -y python3-pip iputils-ping COPY . /app WORKDIR /app -RUN pip3 install -r requirements.txt -RUN pip3 install docker -RUN pip3 install -r TasmotaCLI/requirements.txt +RUN pip3 install --break-system-packages -r requirements.txt +RUN pip3 install --break-system-packages docker +RUN pip3 install --break-system-packages -r TasmotaCLI/requirements.txt ENTRYPOINT ["python3"] CMD ["mqtt-client.py"] diff --git a/mqtt-client/mqtt-client.py b/mqtt-client/mqtt-client.py index d4279e9..6940df2 100644 --- a/mqtt-client/mqtt-client.py +++ b/mqtt-client/mqtt-client.py @@ -90,10 +90,10 @@ class MQTTClient: def handle_zigbee(self, msg_j): def toggle_firestick(): print("Starting thread...") - tasmotaMQTTClient.MQTTClient(MQTT_HOST, "TasmotaFirestick", os.environ["MQTT_USER"], os.environ["MQTT_PASSWD"], "TOGGLE") - #print("Waiting...") - #time.sleep(8) - #tasmotaMQTTClient.MQTTClient(MQTT_HOST, "TasmotaFirestick", os.environ["MQTT_USER"], os.environ["MQTT_PASSWD"], "ON") + tasmotaMQTTClient.MQTTClient(MQTT_HOST, "TasmotaFirestick", os.environ["MQTT_USER"], os.environ["MQTT_PASSWD"], "OFF") + print("Waiting...") + time.sleep(8) + tasmotaMQTTClient.MQTTClient(MQTT_HOST, "TasmotaFirestick", os.environ["MQTT_USER"], os.environ["MQTT_PASSWD"], "ON") print("Toggled firestick.") zigbee_id = list(msg_j["ZbReceived"].keys())[0] |
