Colorpicker widget not displaying anything

I’m having issues with all of the colorpicker widgets. They are not displaying anything in pages. Doesn’t matter which colorpicker modules I include, they show nothing.

I’ve created a dummy item, which is of a color type to test. I’ve also attempted attaching to an actual item/channel that is a HSB color.

I’ve also tried copying a sample colorpicker code into a custom widget, with same result.

Issue is replicated in Firefox, Chrome and Edge.

YAML:

config:
  label: ColorTest
  sidebar: true
  layoutType: responsive
blocks:
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: oh-colorpicker-card
                      config:
                        item: zzzTestHSB2
                        modules:
                          - hsb-sliders
              - component: oh-grid-col
                config: {}
                slots:
                  default: []
        - component: oh-grid-cells
          config: {}
          slots:
            default:
              - component: oh-colorpicker-cell
                config:
                  item: GenioLEDStrip2_GenLED2HSB
                  modules:
                    - wheel
                    - hsb-sliders
masonry: null
grid: []
  • Platform information:
    • Hardware: Raspberry Pi 4 4GB
    • OS: Openhabian
    • openHAB version: 3.1

Am quite stumped, so would appreciate any help.

Colorpicker widget doesn’t show anything if there is nothing to show i.e. your Item state is NULL. Check your Item state.

EDIT - it would be “nice” if the widget worked for NULL/UNDEF states, because you’re in a catch-22 here. Cannot issue commands to get a new valid state because the state is not yet valid.

Awesome.

That was exactly the bind i found myself in. I was able to create a script that sent some HSB values, and now have a functioning widget. Thanks @rossko57

Now for the fun task of translating the values from the Genio LED strips, which send a 12 character hex representation of HSB.

@Duncan_Pullen I was wondering if you could share how you did this? I’m running into a similar problem defining a new widget, and I’m not entirely sure how to send values to the widget.

You might be going at it the wrong way; you don’t send values to a widget, you update the state of the associated Item.
You can use API Explorer to update an Item with an initial value by hand, to get started.

I had a similar problem setting up a few Hue lights, I rebooted openhabian and then tried to create the colorpicker again and it worked fine.

Good information. I’ve never used the API explorer before. This helped expose some features to me of which I was not yet aware. So thank you for that.

Regarding using it, I just did a get against the Phillips Hue color item (which is a collective color item for 3 Hue bulbs), and it returned that the HSB state has values set.

“state”: “46,56,100”,

So the state doesn’t appear to be the problem. Admittedly I’m new to widget design. I’m no stranger to YAML, but I may not have a solid understanding of how the elements work with one another. I was finally able to get it to work, but, embarrasingly, I think it was because I misspelled the property name I was assigning to the colorpicker item.

Either way, I’m grateful for the information. This helped get me moving in the right direction.

Cheers!

Thanks George. While it didn’t solve my problem, the reboot did reveal other problems with my configurations.