diff --git a/TODO b/TODO index 6193d50..b5e9b10 100644 --- a/TODO +++ b/TODO @@ -10,3 +10,4 @@ - Write docs: - Startup sentinel + - Need to symlink /opt/devtimer/temp_probe to actual probe device diff --git a/devtimer.py b/devtimer.py index db88f27..1bf61dc 100755 --- a/devtimer.py +++ b/devtimer.py @@ -134,21 +134,18 @@ ls -l /sys/bus/w1/devices - You'll see the ID of your device there. That needs to - be set in the line below for this code to work with - your device. + You have to symblolically link that to: + + /opt/devtimer/temp_probe ''' -DS18B20_ID = "28-0416840ac6ff" - - # Read the current temp returned by the probe def read_probe(): global CURRENT_TEMP - probe = open("/sys/bus/w1/devices/%s/w1_slave" % DS18B20_ID) + probe = open("/opt/devtimer/temp_probe/w1_slave") temp = float(probe.readlines()[-1].split()[-1].split("=")[-1])/1000 # Parse probe output temp = int(round((temp * 9/5) +32)) # Convert C-F and round into an integer