My code is pretty short:
from gpiozero import CPUTemperature from gpiozero.pins.pigpio import PiGPIOFactory from time import sleep factory = PiGPIOFactory(host='192.168.1.103') myRes = CPUTemperature(min_temp=30, max_temp=90,pin_factory=factory) print('Initial Raspberry Pi temperature: ' + str(myRes.temperature)) print('READY and waiting 10s') sleep(2)
The error I receive is
[Errno 2] No such file or directory: '/sys/class/thermal/thermal_zone0/temp'
However, on the RasPi itself, I can see the mentioned device (and temperature):
pi@raspberrypi:~ $ cat /sys/class/thermal/thermal_zone0/temp 50464
What do I do wrong? How can I fix that issue? Does GPIO maybe require some additional parameter?