Announcement

Collapse
No announcement yet.

Setting RGBW value directly with a script?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jgreenberg01
    replied
    I too hve been trying to create a color picker in HSTouch for a while also. I've temporarily given up in favor of mimicking the HS3 screen with only 72 color options:

    Click image for larger version

Name:	Color Picker Screen.PNG
Views:	83
Size:	6.7 KB
ID:	1362187

    When HSTouch sends the chosen hex code to the script:

    Code:
    'HS3 Script 2020-02-12  JG
    Sub Main(ByVal parm As Object)
    
        Dim HexColor = parm(0).ToString ' Get Hex color from HSTouch
    
        Dim i, Length, Value, Temp, Result
    
        Length = len(HexColor)
        for i = 0 to Length - 1
            'get the characters one at a time (right to left)
            Value = mid(HexColor, Length - i, 1)
    
            if (Value >= "0") and (Value <= "9") then
            Temp = cInt(Value)
            elseif (Value >= "A") and (Value <= "F") then
            Temp = cInt(Asc(value) - 55)
            elseif (Value >= "a") and (Value <= "f") then
                Temp = cInt(Asc(Value) - 87)
            else
                ' if we get here then an illegal value was passed in
                Result = -1
                exit for
            end if
            Result = Result + Temp * 16^i
        next
    
        Dim BulbREF = hs.GetDeviceRefByName("Custom RGB")
        hs.SetDeviceValueByRef(BulbREF, Result, True)
    
        hs.writelog("BulbColor",CStr("Color changed to: " & HexColor & " (Hex), " & Result & " (Decimal)"))
    
        Dim cc as HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(BulbREF, True, "Custom Color(value)", False, False)
        cc.ControlValue = Result
        Dim cr as HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
    End Sub
    Regardless of whether I use hs.SetDeviceValueByRef or CapiControl (or in the case above - both methods... because I'm annoyed!), HS3 changes the color in the device screen as expected, but does not change the bulb color:

    Click image for larger version

Name:	HS3 Bulb Device.PNG
Views:	93
Size:	50.5 KB
ID:	1362189

    I still have to go into the color picker screen and hit OK before the bulb will actually change:

    Click image for larger version

Name:	Color Confirm.PNG
Views:	86
Size:	40.1 KB
ID:	1362188

    I've tried having the script send the OFF, ON, and LAST commands after the color change, but still no joy. In all cases, manually hitting that OK button in HS3's device screen is required to get the bulb to change to the desired color.

    I'm using a Monoprice Z-Wave Plus RGB Smart Bulb.

    Any idea what step I'm missing?

    Leave a comment:


  • Dekirts
    replied
    I am apparently a total noob on the scripting portion. I have a color selector for my qubino RGBW controller.
    I'm not following these scripts. I was just hoping to setup a virtual device and have a dozen preset colors for my controllers. Then I could just have a script that when I called for Red it would change the color selector to ff0000.
    Anyone know the best way to do that?
    I'm tried to copy and past those codes into a script but I feel like I am missing some parameters I need somewhere or some portions of the code.
    Thanks,

    Ok I wasn't able to figure out how to use the color selector but I did make a script that uses the Red blue and green selectors individually.
    I will include it here for those who need it. I have it setup with a slider, but you could do a drop down bar.
    This uses 5 parameters. one for the virtual device slider. One for the Light off (set as the 0) then one for each red green and blue slider levels. Click image for larger version

Name:	rgb slider.png
Views:	175
Size:	11.0 KB
ID:	1260421

    Code:
    Imports System.Text.RegularExpressions
    
    'The script requires 3 parameters to be passed to it separated by commas:  Slider Controller, Light Off Switch, Red, Green, Blue.
        '    - Red is the red level value.
        '    - Green is the green level value.
        '    - Blue is the Blue level value.
    
        Public Sub Main(ByVal Parms As Object)
    Dim ParmArray() As String = Parms.tostring.split(",")        'split parameter into an array
        Dim Control As Integer = CInt(ParmArray(0))    
            Dim Turnoff As Integer = CInt(ParmArray(1))
            Dim Red As Integer = CInt(ParmArray(2))
            Dim Green As Integer = CInt(ParmArray(3))
            Dim Blue As Integer = CInt(ParmArray(4))
            Dim Color As Integer= hs.CAPIGetStatus(Control).Status
    If Color = 1
            Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 255
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 255
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 255
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 2 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 255
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 0
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 0
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 3 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 255
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 86
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 170
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 4 
          Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 212
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 170
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 255
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 5 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 212
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 0
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 255
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 6 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 86
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 170
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 255
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 7 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 0
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 0
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 255
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 8 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 0
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 255
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 0
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 9 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 255
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 255
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Blue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 0
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 10 
     Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Red, True, "Red Level (value)", False, False)
            cc.ControlValue = 255
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(Green, True, "Green Level (value)", False, False)
            cd.ControlValue = 127
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(BLue, True, "Blue Level (value)", False, False)
            ce.ControlValue = 0
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
    
    Elseif Color = 0
           Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIControlHandler(hs.CAPIGetSingleControl(Turnoff,True,"Off",False,False))
        End If
        End Sub
    Last edited by Dekirts; November 18, 2018, 06:16 PM.

    Leave a comment:


  • Moskus
    replied
    Okay, my script doesn't work any more.

    Code:
    Sub Main(ByVal params As String)
            Dim input() As String = params.Split(",")
            Dim customRef As Integer = input(0)
            Dim generator As New Random
    
            Dim color(2) As Integer
            For i As Integer = 0 To color.GetLength(0) - 1
                color(i) = generator.Next(0, 255)
            Next
    
            Dim colorString = "#" & color(0).ToString("X2") & color(1).ToString("X2") & color(2).ToString("X2")
            Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(customRef, True, "Custom Color(value)", False, False)
            cc.ControlString = colorString
            Dim ret = hs.CAPIControlHandler(cc)
            hs.Writelog("Random Color", ret.ToString)
        End Sub
    As far as I can tell it stopped working after updating the Z-wave plugin to version .190, but I can't figure out why it's not working.

    EDIT: It's funny. Right after posting this, I found the solution. Set the color string to this:
    Code:
    Dim colorString = color(0).ToString("X2") & color(1).ToString("X2") & color(2).ToString("X2")
    ... and it works again.

    Leave a comment:


  • Moskus
    replied
    Originally posted by Tomgru View Post
    No script experience... so pardon the ignorance.

    Could you use this to create a custom animation that moved between 2 (or more) colors?
    Yes you can!
    At least... sort of.

    HomeSeer is not made to be a DMX-controller, so you have to do a bit of cheating. I would set the fade time of the Z-wave node to a looong interval, and then add a recurring event that triggers every "interval" seconds to the new color.

    Leave a comment:


  • Tomgru
    replied
    No script experience... so pardon the ignorance.

    Could you use this to create a custom animation that moved between 2 (or more) colors?

    Leave a comment:


  • Moskus
    replied
    Originally posted by skg View Post
    Figured it out. There is a special property to use for setting custom color values, it is ControlString instead of ControlValue. It takes the hex string.

    Here is a method I use in C# - same way you were doing it, just with the new property:

    Code:
    public void SetRgbColor(int device, string color) 
    {	
    
    	HomeSeerAPI.CAPI.CAPIControl capiControl;
    
    	capiControl = hs.CAPIGetSingleControl(
    		device, 
    		true, 
    		"Custom Color(value)", 
    		false, 
    		false);
    
        capiControl.ControlString = color;
        hs.CAPIControlHandler(capiControl);       
    }
    The values you set are hex strings in the format #ff9000.

    Fantastic! Thank you!

    Leave a comment:


  • skg
    replied
    Figured it out. There is a special property to use for setting custom color values, it is ControlString instead of ControlValue. It takes the hex string.

    Here is a method I use in C# - same way you were doing it, just with the new property:

    Code:
    public void SetRgbColor(int device, string color) 
    {	
    
    	HomeSeerAPI.CAPI.CAPIControl capiControl;
    
    	capiControl = hs.CAPIGetSingleControl(
    		device, 
    		true, 
    		"Custom Color(value)", 
    		false, 
    		false);
    
        capiControl.ControlString = color;
        hs.CAPIControlHandler(capiControl);       
    }
    The values you set are hex strings in the format #ff9000.

    Leave a comment:


  • AshaiRey
    replied
    I use the FastLED library on the Arduino and i use snippets found on the net (source not known anymore)
    I hope i got everything together her for you. I had to piece it together out of a larger chunck i made.

    Global variables
    Code:
     
    // PULSE Variables
    uint8_t hueA;
    uint8_t satA;
    float valueMin;
     uint8_t hueB;
    uint8_t satB;
    float valueMax;
     
    uint8_t hue;
    uint8_t sat;
    float val;
    uint8_t hueDelta;
    static float delta;
     static float PulseSpeed;
    
    CHSV objHSVStart;  
    CHSV objHSVEnd;  
      
     CRGB colorRGBStart;
    CRGB colorRGBEnd;
    Methode configuration. Need to do this only once
    Code:
     void SetupEffect()
    {
          colorRGBStart.r = R;
         colorRGBStart.g = G;
         colorRGBStart.b = B;
      
          colorRGBEnd.r = R;
         colorRGBEnd.g = G;
         colorRGBEnd.b = B;
      
       objHSVStrat = rgb2hsv_approximate(colorRGBStart);
      objHSVEnd = rgb2hsv_approximate(colorRGBEnd);
      
       hueA     = objHSVStart.h;
      satA     = objHSVStart.s; 
      valueMin = objHSVStart.v
       hueB     = objHSVEnd.h;
      satB     = objHSVEnd.s;
      valueMax = objHSVEnd.v;
      if((valueMin + 20) > valueMax) {
        valueMax = valueMin + 20;
        if(valueMax > 255) valueMax = 255;
      }
       hue = hueA; 
      sat = satA; 
      val = valueMin;
      hueDelta = hueA - hueB; 
      delta = (valueMax - valueMin) / 2.35040238;  // Do Not Edit 
     }
    And call this methode each time in main()
    Code:
     
    void DoEffect(){  
       float dV = ((exp(sin(PulseSpeed * millis()/2000.0*PI)) -0.36787944) * delta); 
       val = valueMin + dV; 
       hue = map(val, valueMin, valueMax, hueA, hueB);  // Map hue based on current val 
       sat = map(val, valueMin, valueMax, satA, satB);  // Map sat based on current val 
        leds0[0] = CHSV(hue, sat, val); // This controles the LEDstring but you have to convert HSV back to RGB here end send that value to the device
    }
    VBscript code voor RGB to HSV to RGB conversie

    http://stackoverflow.com/questions/3...b-color-to-hsv

    Or

    http://www.xtremevbtalk.com/tech-dis...b-hsv-rgb.html

    Or

    http://stackoverflow.com/questions/4...b-color-values
    Last edited by AshaiRey; October 6, 2016, 03:19 AM. Reason: Update

    Leave a comment:


  • Moskus
    replied
    Originally posted by AshaiRey View Post
    If you want smooth transitions then you will have a hard time using RGB. Using HSV is much better for this because it takes brightness also in account.
    RGB example:
    Red is 100% ON and you want to go to 100% green then you have to lower red a x amount. The red LED gives 100% light and then the green led will add to this brightness. But the scale isn't lineair. Steps in brightness are larger at the lowest end then the upper end. Also you have to take in account the added brightness of the other LED(s) of the RGB spot. So using HSV is the way to go in this case. However it isn't possible to convert all RGB directly to HSV values. Some averages values will be taken in account for this. Anyway, that is not a real problem.

    I have some code for the Arduino that does just that. It may be helpful as an example?
    "Smooth transitions" is perhaps the wrong phrase. I want it "smoother than using three separate devices that are updated sequentially".


    But code is always fun!

    Leave a comment:


  • AshaiRey
    replied
    If you want smooth transitions then you will have a hard time using RGB. Using HSV is much better for this because it takes brightness also in account.
    RGB example:
    Red is 100% ON and you want to go to 100% green then you have to lower red a x amount. The red LED gives 100% light and then the green led will add to this brightness. But the scale isn't lineair. Steps in brightness are larger at the lowest end then the upper end. Also you have to take in account the added brightness of the other LED(s) of the RGB spot. So using HSV is the way to go in this case. However it isn't possible to convert all RGB directly to HSV values. Some averages values will be taken in account for this. Anyway, that is not a real problem.

    I have some code for the Arduino that does just that. It may be helpful as an example?

    Leave a comment:


  • Moskus
    replied
    Originally posted by billt View Post
    I've just been playing around with tenscripting and tenscriptaid and found that you can set a custom colour by setting the R,G, and B values independently, which is all that the custom colour dialogue does, but in one action.

    This script works for me

    Code:
    Imports System.Text.RegularExpressions
    
    
        Public Sub Main(ByVal Parms As Object)
    
            Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1069, True, "Red Level (value)", False, False)
            cc.ControlValue = 144
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1070, True, "Green Level (value)", False, False)
            cd.ControlValue = 247
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1071, True, "Blue Level (value)", False, False)
            ce.ControlValue = 10
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
        End Sub
    Obviously you set the R,G and B ControlValues to give the colour that you want.

    (Trying to use CustomColour from TenScriptAid locks it up.)
    This is very similar to what I do now. Sadly, you'll just set three different colors, so the different colors will flash.

    First it will set the red, turning the room red, then yellow (because of green) and then whiter (because of blue).

    I want smooth transittions, and that can be achieved with the Color Picker, but I can't control it with a script.

    Leave a comment:


  • billt
    replied
    AIUI the custom colour value is just the three sequential bytes of the three colour controls, the first byte is red, second byte green and third blue. Each colour value has a range of 0-255.

    Hence full red would be FF0000, green would be 00FF00, etc.

    Using the capi control for each individual colour you can either use Switch Mulilevel and use a dim value of 1-98%, or use Color Control with a value between 1 and 254, just different ways of doing the same thing.

    Leave a comment:


  • AshaiRey
    replied
    A little educated guess here but when you convert the hex value to a decimal value and enter that as value into the device will it work?
    My guess will be a value for RED will be 16711680, Green = 65280 and Blue 255

    Leave a comment:


  • billt
    replied
    I've just been playing around with tenscripting and tenscriptaid and found that you can set a custom colour by setting the R,G, and B values independently, which is all that the custom colour dialogue does, but in one action.

    This script works for me

    Code:
    Imports System.Text.RegularExpressions
    
    
        Public Sub Main(ByVal Parms As Object)
    
            Dim cc As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1069, True, "Red Level (value)", False, False)
            cc.ControlValue = 144
            Dim cr As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc)
    
            Dim cd As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1070, True, "Green Level (value)", False, False)
            cd.ControlValue = 247
            Dim cs As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cd)
    
            Dim ce As HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(1071, True, "Blue Level (value)", False, False)
            ce.ControlValue = 10
            Dim ct As HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(ce)
        End Sub
    Obviously you set the R,G and B ControlValues to give the colour that you want.

    (Trying to use CustomColour from TenScriptAid locks it up.)

    Leave a comment:


  • Moskus
    replied
    I've tried that too, but not lately. Will try again tonight.

    Here's the values:

    Leave a comment:

Working...
X