Jan-15-2018, 05:58 PM
My bad, was missing some of the script.
It actually looks like this:
It actually looks like this:
import requests import time time.sleep(1) headers = { 'Accept': 'application/json', } data = '{"on":true,"bri":255,"sat":255,"hue":46920,"effect":"colorloop"}' requests.put('http://192.168.1.47/api/XXXXXXXXXXXXXXXXXXXXXXXXX/lights/1/state', headers=headers, data=data)