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: