Beispiel #1
0
def setupHue():
    hue = Hue(HUE_IP)
    # Get Hue username
    hue.loadUsername()
    if (hue.username == ""):
        print("Waiting for Hue authorization...")
        hue.authorize()
        print("---> Hue Authorization complete!")
    # Get Hue lights
    hue.getLights()
    # Set all lights to red
    hue.setAllLights(65000)
    return hue
Beispiel #2
0
from hue import HueLight
from hue import Hue

hue = Hue()
hue.getState()
#hue.setLightState(light=1, on=True, bri=254, sat=254, hue=10000)
hue.getLights()
hue.rgbtocie(255,0,0)
hue.rgbtocie(0,255,0)
hue.rgbtocie(0,0,255)
hue.setLightState(light=1, on=True, xy=hue.rgbtocie(0,0,255))