- Code: Select all
import subprocess
cmd = "php /Users/simon/sureflap_ohne_output/getLockMode.php"
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
output = p.stdout.read()
# Save status in a variable
indigo.variable.updateValue("sureflap", output)
# Write status to log
indigo.server.log(output, "Status sureflap")
if output=="none":
indigo.server.log("Status is none --> do other things...")
Even the status is correctly written to the log as "none" or "out" (without quotationmarks), the
does not work. Nothin happensif output=="none":
Simon