From 916adf97f2ad2cee17b5a31060ad6c668a7b1b2a Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 9 Jun 2024 08:59:13 +0200 Subject: [PATCH] Add missing YoctoLib.cmdline package installation. --- Dockerfile | 2 ++ read_yocto_sensor.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c9683cb..62f6f13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ RUN apt-get update && apt-get -y install gunicorn sqlite3 python3-pip python3-re ENV PIP_BREAK_SYSTEM_PACKAGES 1 RUN pip install teleinfo WORKDIR /root +RUN curl -o YoctoLib.cmdline.24497.tar.gz "https://cloud.scimetis.net/s/y7WengZWJpYnGpr/download" +RUN tar xzvf YoctoLib.cmdline.24497.tar.gz COPY find_ttyUSB.sh /root/ COPY read_one-wire_sensor.py /root/ COPY read_teleinfo.py /root/ diff --git a/read_yocto_sensor.py b/read_yocto_sensor.py index 1e5507f..137b6b8 100755 --- a/read_yocto_sensor.py +++ b/read_yocto_sensor.py @@ -16,7 +16,7 @@ parser.add_argument('sensor', type=str, args = parser.parse_args() try: - returned_output = subprocess.check_output(["/usr/local/YoctoLib.cmdline.24497/Binaries/linux/32bits/"+args.binary, "-r", "localhost", "-f", "[result]", args.sensor, "get_currentValue"]) + returned_output = subprocess.check_output(["/root/YoctoLib.cmdline.24497/Binaries/linux/32bits/"+args.binary, "-r", "localhost", "-f", "[result]", args.sensor, "get_currentValue"]) try: value = round(float(returned_output.decode("utf-8").strip().strip("'")), 1) except ValueError: