diff --git a/Dockerfile b/Dockerfile index d7c8725..48f47d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ FROM python:3.11-slim-bullseye AS builder -RUN apt-get update; apt-get -y upgrade; apt-get clean; apt-get install binutils -y +RUN apt-get update; apt-get -y upgrade; apt-get clean; apt-get install binutils git -y # Default port ENV PORT=9333 -RUN pip3 install --no-cache-dir PyInstaller loguru prometheus_client PyP100 click pyyaml +RUN pip3 install --no-cache-dir PyInstaller loguru prometheus_client click pyyaml +RUN pip3 install git+https://github.com/almottier/TapoP100.git@main + COPY . /app WORKDIR /app diff --git a/collector.py b/collector.py index 29cc31c..f4335ea 100644 --- a/collector.py +++ b/collector.py @@ -143,7 +143,7 @@ def collect(self): }) try: - data = self.get_device_data(device, ip_addr, room)['result'] + data = self.get_device_data(device, ip_addr, room) labels = [ip_addr, room] metrics[MetricType.TODAY_RUNTIME].add_metric(labels, data['today_runtime'])