Add missing YoctoLib.cmdline package installation.
This commit is contained in:
parent
3ef6afa2b8
commit
916adf97f2
@ -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/
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user