Have created a little executable and posted the file on my dropbox, .... see new download for zip file
following/using: https://github.com/lavoiesl/osx-cpu-temp
./osx-cpu-temp
temp:36.2--rpm:1300.0:1220.0
-rwxr-xr-x 1 karlwachs staff 13876 Jul 7 10:34 osx-cpu-temp
-rw-r--r-- 1 karlwachs staff 3009 Jul 7 10:37 osx-cpu-temp.zip
import subprocess
data = (subprocess.Popen("pathToFile/osx-cpu-temp",shell=True,stdout=subprocess.PIPE).communicate()[0].strip("\n")).split("--rpm")
temp = data[0].split(":")[1] # temp is is C,
#to convert to F: temp = "%.1f"%(float(temp) *9/5. +32)
indigo.variable.updateValue("cpuTemp", temp) # variable cpuTemp must already exist,
if len(data) > 1:
fanSpeeds = data[1].strip(":")
indigo.variable.updateValue("fanSpeeds", fanSpeeds) # variable fanSpeeds must already exist
./osx-temp-fan
temp_AMBIENT_AIR_0:27.1
temp_AMBIENT_AIR_1:-99.0
temp_CPU_0_DIE:-99.0
temp_CPU_0_DIODE:46.9
temp_CPU_0_HEATSINK:-99.0
temp_CPU_0_PROXIMITY:43.6
temp_ENCLOSURE_BASE_0:-99.0
temp_ENCLOSURE_BASE_1:-99.0
temp_ENCLOSURE_BASE_2:-99.0
temp_ENCLOSURE_BASE_3:-99.0
temp_GPU_0_DIODE:-99.0
temp_GPU_0_HEATSINK:-99.0
temp_GPU_0_PROXIMITY:-99.0
temp_HDD_PROXIMITY:31.6
temp_HEATSINK_0:-99.0
temp_HEATSINK_1:-99.0
temp_HEATSINK_2:-99.0
temp_LCD_PROXIMITY:-99.0
temp_MEM_SLOT_0:64.0
temp_MEM_SLOTS_PROXIMITY:49.0
temp_MISC_PROXIMITY:-99.0
temp_NORTHBRIDGE:48.0
temp_NORTHBRIDGE_DIODE:63.5
temp_NORTHBRIDGE_PROXIMITY:-99.0
temp_ODD_PROXIMITY:-99.0
temp_PALM_REST:-99.0
temp_PWR_SUPPLY_PROXIMITY:-99.0
temp_THUNDERBOLT_0:-99.0
temp_THUNDERBOLT_1:-99.0
fan0Speed:856.5
fan1Speed:799.8
fan2Speed:956.5
fan3Speed:689.2
import subprocess
### change the path to the path where the executable is located
data = (subprocess.Popen("/users/karlwachs/indigo//osx-temp-fan",shell=True,stdout=subprocess.PIPE).communicate()[0].strip("\n")).split("\n")
tUnit ="C"
t_format = "%.1f"
for line in data:
ll = line.split(":")
if len(ll) < 2: continue
if ll[0].find("temp") > -1:
t = float(ll[1])
if t < 0: continue
if tUnit == "F":
t = t*9./5/+32
try: indigo.variables[ll[0]]
except: indigo.variable.create(ll[0])
indigo.variable.updateValue(ll[0], t_format%t)
else:
try: indigo.variables[ll[0]]
except: indigo.variable.create(ll[0])
indigo.variable.updateValue(ll[0], ll[1])
Users browsing this forum: No registered users and 0 guests