Example #1
0
    def clearall(self):
        '''Clear all active priority channels
        '''
        # create the request
        request = HyperionRequest()
        request.command = HyperionRequest.CLEARALL

        # send the message 
        self.__sendMessage(request)
Example #2
0
    def clear(self, priority):
        '''Clear the given priority channel
        - priority : the priority channel to clear
        '''
        # create the request
        request = HyperionRequest()
        request.command = HyperionRequest.CLEAR
        clearRequest = request.Extensions[ClearRequest.clearRequest]
        clearRequest.priority = priority

        # send the message 
        self.__sendMessage(request)
Example #3
0
    def sendColor(self, color, priority, duration = -1):
        '''Send a static color to Hyperion
        - color    : integer value with the color as 0x00RRGGBB
        - priority : the priority channel to use
        - duration : duration the leds should be set
        ''' 
        # create the request
        request = HyperionRequest()
        request.command = HyperionRequest.COLOR
        colorRequest = request.Extensions[ColorRequest.colorRequest]
        colorRequest.rgbColor = color
        colorRequest.priority = priority
        colorRequest.duration = duration

        # send the message 
        self.__sendMessage(request)
Example #4
0
    def sendImage(self, width, height, data, priority, duration = -1):
        '''Send an image to Hyperion
        - width    : width of the image
        - height   : height of the image
        - data     : image data (byte string containing 0xRRGGBB pixel values)
        - priority : the priority channel to use
        - duration : duration the leds should be set
        ''' 
        # create the request
        request = HyperionRequest()
        request.command = HyperionRequest.IMAGE
        imageRequest = request.Extensions[ImageRequest.imageRequest]
        imageRequest.imagewidth = width
        imageRequest.imageheight = height
        imageRequest.imagedata = str(data)
        imageRequest.priority = priority
        imageRequest.duration = duration

        # send the message 
        self.__sendMessage(request)