I try to read my Raspberry PI CPU temperature in Ignition. I use following command in terminal:
I can read temperature by using os.system in Python3 but in ignition the os.system() function always return 1 and system.util.execute only execute command and doesn’t return anything.
Can someone tell me how to read Raspberry PI CPU temperature in Ignition environment?
I also try to copy gpiozero library into /usr/local/ignition/user-lib/pylib folder of ignition and use following script(which is tested in python3) to get CPU temperature but getting error which I think is because python 2.7.
from gpiozero import CPUTemperature
cpu = CPUTemperature()
Traceback (most recent call last): File "<event:actionPerformed>", line 2, in <module> File "C:\Users\User\.ignition\cache\gw192.168.3.69_8088\C1\pylib\gpiozero\__init__.py", line 97, in <module> from .output_devices import ( File "C:\Users\User\.ignition\cache\gw192.168.3.69_8088\C1\pylib\gpiozero\output_devices.py", line 45, in <module> from colorzero import Color ImportError: No module named colorzero Ignition v8.0.0 (b2019040718) Java: Azul Systems, Inc. 11.0.2