MQTT Generic RGB no enum constant

Hello together,

i have an issue and i can’t find any solution for it.

OH3.1.0 is in use.

Error:

2021-10-17 17:17:24.746 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel configuration error
java.lang.IllegalArgumentException: No enum constant org.openhab.binding.mqtt.generic.mapping.ColorMode.
	at java.lang.Enum.valueOf(Enum.java:240) ~[?:?]
	at org.openhab.binding.mqtt.generic.mapping.ColorMode.valueOf(ColorMode.java:1) ~[bundleFile:?]
	at org.openhab.binding.mqtt.generic.values.ValueFactory.createValueState(ValueFactory.java:62) ~[bundleFile:?]
	at org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler.initialize(GenericMQTTThingHandler.java:164) [bundleFile:?]
	at org.openhab.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:152) [bundleFile:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
2021-10-17 17:17:24.781 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel configuration error
java.lang.IllegalArgumentException: No enum constant org.openhab.binding.mqtt.generic.mapping.ColorMode.
	at java.lang.Enum.valueOf(Enum.java:240) ~[?:?]
	at org.openhab.binding.mqtt.generic.mapping.ColorMode.valueOf(ColorMode.java:1) ~[bundleFile:?]
	at org.openhab.binding.mqtt.generic.values.ValueFactory.createValueState(ValueFactory.java:62) ~[bundleFile:?]
	at org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler.initialize(GenericMQTTThingHandler.java:164) [bundleFile:?]
	at org.openhab.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:152) [bundleFile:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]

Config:

  • id: KugelFarbe
    channelTypeUID: mqtt:color
    label: KugelFarbe
    description: “”
    configuration: {}

I don’t add a topic. I create only the channel and get this error immediately.

And the thing stops working:

Thanks

Swen

I suppose you could look in the bindings docs for color type channel

It says

  • color_mode: A required string that defines the color representation: “hsb”, “rgb” or “xyY” (x,y,brightness).

so I think you are required to give that.

That was a good hint, but there must be an issue with gui setup:

After create i get this error. I switch color to RGB that works fine. After that i switch over to HSB and that work also without error. Now yaml looks like this:

  - id: KugelFarbe
    channelTypeUID: mqtt:color
    label: KugelFarbe
    description: ""
    configuration:
      colorMode: HSB

On first create of channel no colorMode will be set… Can somebody reproduce this?