Looking for a little help with the script below,
The script below will not run the two Indigo lines, I do not get an error in the log. If I replace them with a print command, the script runs fine in Python. Can you tell me why and if it can be changed to run from Indigo?
- Code: Select all
import os
import subprocess
# get digitemp outputs
cmd = './digitemp_DS9097U -q -a -o "%R %.4C"'
for outline in os.popen(cmd).readlines():
outline = outline[:-1].split()
if outline[0] == '28F4F525030000D1':
temp = outline[1]
indigo.variable.updateValue('1wireLR_', str(temp))
indigo.server.log('digitemp', type = 'notice')