Ejemplo n.º 1
0
def aligenieRelativeColorTemp(colorTemp):
    ''' '''

    BLINKER_LOG('need set relative colorTemperature: ', colorTemp)

    BlinkerAliGenie.colorTemp(colorTemp)
    BlinkerAliGenie.print()
Ejemplo n.º 2
0
def aligenieQuery(queryCode):
    ''' '''

    BLINKER_LOG('AliGenie Query codes: ', queryCode)

    if queryCode == BLINKER_CMD_QUERY_ALL_NUMBER:
        BLINKER_LOG('AliGenie Query All')
        BlinkerAliGenie.powerState(wsState)
        BlinkerAliGenie.color(getColor())
        BlinkerAliGenie.mode(wsMode)
        BlinkerAliGenie.colorTemp(50)
        BlinkerAliGenie.brightness(100)
        BlinkerAliGenie.print()
    elif queryCode == BLINKER_CMD_QUERY_POWERSTATE_NUMBER:
        BLINKER_LOG('AliGenie Query Power State')
        BlinkerAliGenie.powerState(wsState)
        BlinkerAliGenie.print()
    elif queryCode == BLINKER_CMD_QUERY_COLOR_NUMBER:
        BLINKER_LOG('AliGenie Query Color')
        BlinkerAliGenie.color('red')
        BlinkerAliGenie.print()
    elif queryCode == BLINKER_CMD_QUERY_MODE_NUMBER:
        BLINKER_LOG('AliGenie Query Mode')
        BlinkerAliGenie.mode(wsMode)
        BlinkerAliGenie.print()
    elif queryCode == BLINKER_CMD_QUERY_COLORTEMP_NUMBER:
        BLINKER_LOG('AliGenie Query ColorTemperature')
        BlinkerAliGenie.colorTemp(50)
        BlinkerAliGenie.print()
    elif queryCode == BLINKER_CMD_QUERY_BRIGHTNESS_NUMBER:
        BLINKER_LOG('AliGenie Query Brightness')
        BlinkerAliGenie.brightness(100)
        BlinkerAliGenie.print()
    else:
        BlinkerAliGenie.powerState(wsState)
        BlinkerAliGenie.color('red')
        BlinkerAliGenie.mode(wsMode)
        BlinkerAliGenie.colorTemp(50)
        BlinkerAliGenie.brightness(100)
        BlinkerAliGenie.print()