I have kernel 95. Maybe its doing the difference?
I have script temp2.py
:
#!/usr/bin/env python2
from w1thermsensor import W1ThermSensor
for sensor in W1ThermSensor.get_available_sensors():
print("Sensor %s has temperature %.2f" % (sensor.id, sensor.get_temperature()))
which, when the sensor is visible in /sys/bus/w1/devices/
, gives:
Traceback (most recent call last):
File "./temp2.py", line 5, in <module>
print("Sensor %s has temperature %.2f" % (sensor.id, sensor.get_temperature()))
File "/usr/local/lib/python2.7/dist-packages/w1thermsensor/core.py", line 255, in get_temperature
return factor(self.raw_sensor_value)
File "/usr/local/lib/python2.7/dist-packages/w1thermsensor/core.py", line 210, in raw_sensor_value
raise SensorNotReadyError(self)
w1thermsensor.errors.SensorNotReadyError: Sensor 01186bce26ff is not yet ready to read temperature
Sensor sometimes appears, sometimes disappears. What can be wrong here?