2014-01-09, 16:58
If it has to be in Python than this did work for me, (calling a external program from Phyton and execute it using the subprocess):
Code:
import subprocess
proc = subprocess.Popen(["E:\Curl\curl", "-XPUT", 'http://<IP HUE>/api/<KEY>/lights/8/state', '-d', '{\"on\": false}'], stdout=subprocess.PIPE)
(out, err) = proc.communicate()
print out