Announcement

Collapse
No announcement yet.

Color Picker control type

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

    Color Picker control type

    I am unclear what the color picket control type is for. Whenever I set the control type for a device to "color picker" from the dropdown list of control types, it does nothing. When I go back into the screen, it is set back to slider. I've tried different ranges 0-65535 0-16777215, 1-65535, 1-16777215, etc...

    I have searched the web and the documentation. I have not ever seen an image where the color picker appears on the device management display.

    #2
    Originally posted by FreezePlanet View Post
    I am unclear what the color picket control type is for. Whenever I set the control type for a device to "color picker" from the dropdown list of control types, it does nothing. When I go back into the screen, it is set back to slider. I've tried different ranges 0-65535 0-16777215, 1-65535, 1-16777215, etc...

    I have searched the web and the documentation. I have not ever seen an image where the color picker appears on the device management display.
    It's only used for plugins, if you have a plugin that you want the colour picker to be used for it then makes a call into the plugin and passes the RGB value into the plugin. It has no use for anything else, the Z-Wave plugin at least if you have an RGB device will create a device and use it.

    Comment


      #3
      Plugin

      Ok, perfect as i have a plugin that I wrote that controls rgb lights. Currently i am using the slider to get and set the hue, but i want to allow the user to pick a color instead. Is there some hidden attribute of the device class that allows the color picker to be selected?

      Comment


        #4
        Originally posted by FreezePlanet View Post
        Ok, perfect as i have a plugin that I wrote that controls rgb lights. Currently i am using the slider to get and set the hue, but i want to allow the user to pick a color instead. Is there some hidden attribute of the device class that allows the color picker to be selected?
        Once you have added a value pair and selected the colour picker then if you check the ControlString in the SetIOMulti it should pass the colour data back (from memory) so you can then set your device. I then set the device string at this point to the hex value.

        Comment


          #5
          Getting warmer

          I think we are getting closer to the issue. Thank you for responding so quickly!

          My issue is not how to receive the value in the SetIOMulti (which is what I think you were addressing - I suspect that would have been my next question if we ever get to that point), my issue is that I am not able to choose the "Color Picker" option. When I read your response (you mentioned a value pair) I began to think I need to change my device from a range to a single value.

          I did try that but when I do the "Color Picker" isn't even shown. So I set it back to a range instead.

          So it's still doing the same thing:
          1) I set the control type back to "Color Picker" from the drop down list and save it
          2) The "device management page " still displays a slider bar.
          3) When I return to the "Status Graphics" setup page, homeseer has changed the control type back to a slider.

          A little voice in my head is telling me there must be something in the device class which allows this device to allow Color picker as an option.

          Comment


            #6
            Originally posted by FreezePlanet View Post
            I think we are getting closer to the issue. Thank you for responding so quickly!

            My issue is not how to receive the value in the SetIOMulti (which is what I think you were addressing - I suspect that would have been my next question if we ever get to that point), my issue is that I am not able to choose the "Color Picker" option. When I read your response (you mentioned a value pair) I began to think I need to change my device from a range to a single value.

            I did try that but when I do the "Color Picker" isn't even shown. So I set it back to a range instead.

            So it's still doing the same thing:
            1) I set the control type back to "Color Picker" from the drop down list and save it
            2) The "device management page " still displays a slider bar.
            3) When I return to the "Status Graphics" setup page, homeseer has changed the control type back to a slider.

            A little voice in my head is telling me there must be something in the device class which allows this device to allow Color picker as an option.
            This is how I do it;

            Code:
            Pair = New VSPair(ePairStatusControl.Both)
            Pair.PairType = VSVGPairType.Range
            Pair.RangeStart = 1
            Pair.RangeEnd = 254
            Pair.Render = Enums.CAPIControlType.Color_Picker
            hs.DeviceVSP_AddPair(ref, Pair)
            I think the Range/Single value is arbitrary as once you specify a colour picker it does not matter what value the device is as you will instead likely be setting the device to a string.

            If you are creating devices in a plugin I wouldn't be trying to change it in the device web UI, I'm not even sure why it allows you to pick the colour picker there as end users could mess with it - I would try and create the value pair through the device creation code and then see if it passes the colour string to your plugin.

            Comment


              #7
              Working

              I finally figured it out.

              I guess the dropdown list to select the device type either does not really work for that option.

              I decided to delete the device and let my plugin recreate it.

              When I set the type in the plugin code during the device creation, it finally worked!!

              Comment

              Working...
              X