HomeSeer Message Board

HomeSeer Message Board (http://board.homeseer.com/index.php)
-   HomeSeer Amazon Echo Connected Home API (http://board.homeseer.com/forumdisplay.php?f=1495)
-   -   Support for lighting colours/colour temperatures (http://board.homeseer.com/showthread.php?t=191055)

mrhappy September 24th, 2017 04:51 AM

Support for lighting colours/colour temperatures
 
Just wondering if there is a possiblity of making requests for the smart home skill, I and I am sure others now have lights which either are coloured or have a adjustable colour temperature (I use Ikea Tradfri bulbs - see here https://forums.homeseer.com/showpost...&postcount=107)

Would it be possible to get a change to the skill (which I know the options are in there as I have seen the SDK both supports colour temperatures and also complete lighting colours) to support these?

Thanks,

Qbus October 8th, 2017 05:15 AM

Aeotec LED Strip
 
I would like to also request this for the Aeotec LED Strip. I have tried the settings to get the r,g,b,ww,cw to be adjustable with a voice command though the echo but it dosnt seem to support them.

emiliosic December 11th, 2017 12:45 AM

RGB lamp
 
Recently added a generic RGB Z-Wave lamp, and HS3 can control it just fine, except that the interface is a hot mess, almost unusable. There are no color integrations on the Alexa skill.
I've seen Wi-Fi and Zigbee lamps that work just fine with Alexa but setting the colors in HS3 is very cumbersome. It's simple enough with a script, but with either the Web interface or HSTouch, it's, let's say, difficult.
Alexa might be able to trigger scenes or virtual devices that change the color, but saying 'Turn the lamp red' won't work.

mrhappy December 11th, 2017 09:49 AM

Quote:

Originally Posted by emiliosic (Post 1338130)
Recently added a generic RGB Z-Wave lamp, and HS3 can control it just fine, except that the interface is a hot mess, almost unusable. There are no color integrations on the Alexa skill.
I've seen Wi-Fi and Zigbee lamps that work just fine with Alexa but setting the colors in HS3 is very cumbersome. It's simple enough with a script, but with either the Web interface or HSTouch, it's, let's say, difficult.
Alexa might be able to trigger scenes or virtual devices that change the color, but saying 'Turn the lamp red' won't work.

Yeah it is quite frustrating and no news on whether or not it will be implemented, same with HSTouch is that there is no natural way to do it. I've been meaning to mess around with a slider with an RGB background that can change the value on a virtual device (which would be a 24 bit value) and then change the colour of a device with CAPI commands but I've not bothered yet.

In terms of Alexa integration then it to would be good, I guess HS might have issue because unless you add a load of control use pairs to a device of what value is red/blue/green etc then you would struggle. I'm sure a workaround such as a config web page to determine what RGB value you wanted as red/blue/green could work just as well.

rjh December 11th, 2017 03:53 PM

We are working on the V3 Alexa API and it does support color control now, we have it working.

Is there a question from plugin authors on how to support this? You need to make sure you set the ControlUse property on your device that accepts the color value. The color value is stored in the ControlString property and its a HEX color code that starts with "#".

If you have your device configured like this, then Alexa and Google home will be able to control it. Google works now as of this post, Alexa will be ready as soon as Amazon approves our changes for the V3 API.

mrhappy December 11th, 2017 04:00 PM

Quote:

Originally Posted by rjh (Post 1338257)
We are working on the V3 Alexa API and it does support color control now, we have it working.

Is there a question from plugin authors on how to support this? You need to make sure you set the ControlUse property on your device that accepts the color value. The color value is stored in the ControlString property and its a HEX color code that starts with "#".

If you have your device configured like this, then Alexa and Google home will be able to control it. Google works now as of this post, Alexa will be ready as soon as Amazon approves our changes for the V3 API.

In the time since writing this first post I have written a plugin that supports RGB bulbs (https://forums.homeseer.com/showthread.php?t=192391) which is why I asked about the SDK support. At present I have a device which has a colour picker.

I guess what I am wondering is if you ask Alexa 'set the bulb to red' then what are you doing - I've looked here https://developer.amazon.com/docs/de...ontroller.html which I am unsure is 'red' passed to HS or is Alexa deciding that red = FF0000 and then sending that to HS (which in turn is controlling the device via CAPI?)

That plugin also supports colour temperature controllable bulbs, again if you set the control use property to colorcontrol and ask alexa 'set the bulb to warm' or whatever then what is the correct way to handle this? I guess I am just struggling to understand what is passed from Alexa to HS.

rjh December 11th, 2017 04:20 PM

Alexa calls us through our JSON interface, and yes, they pass the RGB color like "#FF0000" for RED. We then set that in the CAPI control ControlString property and then call into your plugin.

Quote:

Originally Posted by mrhappy (Post 1338260)
In the time since writing this first post I have written a plugin that supports RGB bulbs (https://forums.homeseer.com/showthread.php?t=192391) which is why I asked about the SDK support. At present I have a device which has a colour picker.

I guess what I am wondering is if you ask Alexa 'set the bulb to red' then what are you doing - I've looked here https://developer.amazon.com/docs/de...ontroller.html which I am unsure is 'red' passed to HS or is Alexa deciding that red = FF0000 and then sending that to HS (which in turn is controlling the device via CAPI?)

That plugin also supports colour temperature controllable bulbs, again if you set the control use property to colorcontrol and ask alexa 'set the bulb to warm' or whatever then what is the correct way to handle this? I guess I am just struggling to understand what is passed from Alexa to HS.


spud December 11th, 2017 07:02 PM

1 Attachment(s)
Quote:

Originally Posted by rjh (Post 1338261)
Alexa calls us through our JSON interface, and yes, they pass the RGB color like "#FF0000" for RED. We then set that in the CAPI control ControlString property and then call into your plugin.

Rich, I can set the ControlUse to _ColorControl from code but when I try to access it from the "Status Graphics" tab it says "Not specified" and "Color Control" does not appear as a possible choice.
Testing with HS3 .391

Attachment 65070

rjh December 12th, 2017 12:01 PM

If you set it, then you are ok. The UI in HS3 needs to be updated to include the ColorControl value, I see its not there. Will have it in the next update. We just recently added that.

Quote:

Originally Posted by spud (Post 1338280)
Rich, I can set the ControlUse to _ColorControl from code but when I try to access it from the "Status Graphics" tab it says "Not specified" and "Color Control" does not appear as a possible choice.
Testing with HS3 .391

Attachment 65070


mrhappy December 12th, 2017 03:30 PM

Quote:

Originally Posted by rjh (Post 1338261)
Alexa calls us through our JSON interface, and yes, they pass the RGB color like "#FF0000" for RED. We then set that in the CAPI control ControlString property and then call into your plugin.

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.

Code:

                    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?

rjh December 12th, 2017 03:39 PM

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.

Quote:

Originally Posted by mrhappy (Post 1338453)
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.

Code:

                    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?


mrhappy December 12th, 2017 03:50 PM

Quote:

Originally Posted by rjh (Post 1338455)
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.

Right OK I think I read a bit quickly up there that you had it working meant that it was working in HS but see that you have said in the same post that you are waiting on Amazons approval for change. I shall sit patiently awaiting the approval..

spud December 12th, 2017 04:05 PM

Quote:

Originally Posted by rjh (Post 1338455)
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.

Do color bulbs work with Google Home?

rjh December 12th, 2017 04:08 PM

Yes, that is working now.

Quote:

Originally Posted by spud (Post 1338463)
Do color bulbs work with Google Home?


spud December 13th, 2017 10:38 AM

Quote:

Originally Posted by rjh (Post 1338465)
Yes, that is working now.

The RGB light is successfully discovered by GH, but I found a bug. If you try to set the color to red it correctly sends "ff0000" as the ControlString, but if you try to set it to green the ControlString is passed as "ff00" instead of "00ff00" and if you set it to blue, ControlString is "ff" instead of "0000ff".

rjh December 13th, 2017 12:59 PM

This is fixed on the server, so you should see the full hex value now. Our plugin handled this ok, but I could see other plugins getting confused.

Quote:

Originally Posted by spud (Post 1338564)
The RGB light is successfully discovered by GH, but I found a bug. If you try to set the color to red it correctly sends "ff0000" as the ControlString, but if you try to set it to green the ControlString is passed as "ff00" instead of "00ff00" and if you set it to blue, ControlString is "ff" instead of "0000ff".



All times are GMT -4. The time now is 04:10 AM.


Copyright HomeSeer Technologies, LLC