Announcement

Collapse
No announcement yet.

Support for lighting colours/colour temperatures

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

    #16
    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.

    Originally posted by spud View Post
    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".
    website | buy now | support | youtube

    Comment


      #17
      rjh
      Originally posted by rjh View Post
      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 know this is an old thread but what JSON API call to set the RGB color?

      Alexa is calling the JSON API to select the color and then using a CAPI control to set the respective value to match the selected color. I also tested the behaviour in the HS Mobile app and this is how this also commands but for the life of me I cant establish in all the threads and documents what the json syntax for the first call should be. I require this to set the Fibar/Aeotec LED/Lights directly from an iOS app using a color wheel.

      Comment


        #18
        Setting color is one of the few devices that use the string value rather than the double value for control. Use the json command "controldevicebyindex" and set the string to the RGB value. The index will always be 0 for this as color control pairs normally only have one control pair. But you can get the index from "getcontrol"

        Originally posted by brientim View Post
        rjh

        I know this is an old thread but what JSON API call to set the RGB color?

        Alexa is calling the JSON API to select the color and then using a CAPI control to set the respective value to match the selected color. I also tested the behaviour in the HS Mobile app and this is how this also commands but for the life of me I cant establish in all the threads and documents what the json syntax for the first call should be. I require this to set the Fibar/Aeotec LED/Lights directly from an iOS app using a color wheel.
        website | buy now | support | youtube

        Comment


          #19
          Hi Rich,

          Thank you for the response and I can’t find any documentation on controldevicebyindex and therefore do you have an example of the syntax setting #ff0000 and is this available via ASCII?

          Thanks in advance, the support is greatly appreciated

          Comment


            #20
            Originally posted by brientim View Post
            Hi Rich,

            Thank you for the response and I can’t find any documentation on controldevicebyindex and therefore do you have an example of the syntax setting #ff0000 and is this available via ASCII?

            Thanks in advance, the support is greatly appreciated
            I worked it out and for the sake of closing my question:

            Code:
            http://HS_IP_ADDRESS/JSON?request=controldevicebyindex&ref=DEVICE_ID&String=COLOR _HEX_VALUE&ccindex=0&value=0
            Code:
            http://192.168.100.100/JSON?request=controldevicebyindex&ref=1234&String=0000FF&ccindex=0&value=0

            Comment


              #21
              What you have is correct, I will get the docs updated.

              Originally posted by brientim View Post
              I worked it out and for the sake of closing my question:

              Code:
              http://HS_IP_ADDRESS/JSON?request=controldevicebyindex&ref=DEVICE_ID&String=COLOR _HEX_VALUE&ccindex=0&value=0
              Code:
              http://192.168.100.100/JSON?request=controldevicebyindex&ref=1234&String=0000FF&ccindex=0&value=0
              website | buy now | support | youtube

              Comment

              Working...
              X