View Single Post
Old December 12th, 2017, 03:39 PM
rjh's Avatar
rjh rjh is offline
HomeSeer Technologies
Join Date: Jan 2001
Location: Bedford, NH, USA
Posts: 8,659
Color bulb support was added in the V3 Alexa API. We are currently testing it and hope to submit it for review this week. So right now color bulbs are not supported.

Originally Posted by mrhappy View Post
I have a plugin which has a root device and a number of children, one child is a control device (on / off / dim) and another child is the RGB colour picker currently - this is the code I use for the colour picker device.

                    Case 5

                        Pair = New VSPair(ePairStatusControl.Control)
                        Pair.PairType = VSVGPairType.SingleValue
                        Pair.Render = Enums.CAPIControlType.Color_Picker
                        Pair.ControlUse = ePairControlUse._ColorControl
                        hs.DeviceVSP_AddPair(ref, Pair)

                        Dim gpair As VGPair

                        gpair = New VGPair
                        gpair.PairType = VSVGPairType.Range
                        gpair.RangeStart = Integer.MinValue
                        gpair.RangeEnd = Integer.MaxValue
                        gpair.Graphic = "/images/HomeSeer/contemporary/custom-color.png"
                        hs.DeviceVGP_AddPair(ref, gpair)

                        hs.SetDeviceString(ref, CreateType.RGBValue.ToString("X"), False)
                        hs.SetDeviceValueByRef(ref, CreateType.RGBValue, False)
The device works OK to control the colour in HS and my bulb changes.

However Alexa only recognises the control device in the discovery so I can only turn it on/off from the app and cannot control the colour - can you advise please am I just not understanding this right or can the device that Alexa is controlling for colour not have a render type as the colour picker?

website | products | support | youtube
Reply With Quote