Google Home - OpenHab - LEDs - MQTT

Hi there,
i got a little Problem with the Google Home integration,
i got some WallPlugs in google Home / OpenHab - working
Some dimmers - also working
But i also got some RGB Lights, changin color works, but when i try to dim the colors, i got the following Log entry:

2018-12-03 16:12:53.400 [nt.ItemStatePredictedEvent] - RGB_AZ predicted to become 24

2018-12-03 16:12:53.432 [vent.ItemStateChangedEvent] - RGB_AZ changed from 0,0,72 to 0,0,24

==> /var/log/openhab2/openhab.log <==

2018-12-03 16:12:53.424 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.eclipse.smarthome.binding.mqtt.generic.internal.handler.GenericThingHandler@17af632': Didn't recognise the color value 24

java.lang.IllegalArgumentException: Didn't recognise the color value 24

	at org.eclipse.smarthome.binding.mqtt.generic.internal.values.ColorValue.update(ColorValue.java:114) ~[?:?]

	at org.eclipse.smarthome.binding.mqtt.generic.internal.generic.ChannelState.setValue(ChannelState.java:272) ~[?:?]

	at org.eclipse.smarthome.binding.mqtt.generic.internal.handler.AbstractMQTTThingHandler.handleCommand(AbstractMQTTThingHandler.java:119) ~[?:?]

	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.201811281422]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [101:org.eclipse.smarthome.core:0.10.0.201811281422]

	at com.sun.proxy.$Proxy143.handleCommand(Unknown Source) [227:org.eclipse.smarthome.binding.mqtt.generic:0.10.0.201811281422]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [108:org.eclipse.smarthome.core.thing:0.10.0.201811281422]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [108:org.eclipse.smarthome.core.thing:0.10.0.201811281422]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.201811281422]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.201811281422]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Anyone knows how to get the Dimm Values to MQTT?

Thanks in advance

Jeckyllhavok

Witch MQTT binding do you use? V1 or V2.4?

From the shown log I deduct @jeckyllhavok is using MQTT v2.
But in an ancient version (at least 2 weeks old!! :wink: )

You should know that MQTTv2 is a new feature for the not yet released OH 2.4
and the last fix commit is just 8 hours old (color channels were broken before that change)
and the last feature commit which added MQTT actions support for rules is just 2 hours old.

If you are using such a fast moving target, you need to stay up to date with your
OH version or use MQTT version 1 in the mean time instead.

Cheers, David

Hi,
thanks for the replies, yes David is right i use the MQTT v2 binding.
Yesterday i did an upgrade of Openhab and now i get the following Log entry:

The funny thing ist that Color and Saturation works, only brightness won’t

2018-12-13 11:42:29.509 [ome.event.ItemCommandEvent] - Item 'MQTT_RGB_Bad' received command 35

2018-12-13 11:42:29.516 [nt.ItemStatePredictedEvent] - MQTT_RGB_Bad predicted to become 35

2018-12-13 11:42:29.524 [vent.ItemStateChangedEvent] - MQTT_RGB_Bad changed from 145,0,53 to 145,0,35

==> /var/log/openhab2/openhab.log <==

2018-12-13 11:42:29.518 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.eclipse.smarthome.binding.mqtt.generic.internal.handler.GenericThingHandler@11f9b30': 35 is not a valid HSBType syntax

java.lang.IllegalArgumentException: 35 is not a valid HSBType syntax

	at org.eclipse.smarthome.core.library.types.HSBType.<init>(HSBType.java:100) ~[102:org.eclipse.smarthome.core:0.10.0.201812121521]

	at org.eclipse.smarthome.binding.mqtt.generic.internal.values.ColorValue.update(ColorValue.java:92) ~[?:?]

	at org.eclipse.smarthome.binding.mqtt.generic.internal.generic.ChannelState.publishValue(ChannelState.java:302) ~[?:?]

	at org.eclipse.smarthome.binding.mqtt.generic.internal.handler.AbstractMQTTThingHandler.handleCommand(AbstractMQTTThingHandler.java:119) ~[?:?]

	at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.201812121521]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.201812121521]

	at com.sun.proxy.$Proxy156.handleCommand(Unknown Source) [240:org.eclipse.smarthome.binding.mqtt.generic:0.10.0.201812121521]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [109:org.eclipse.smarthome.core.thing:0.10.0.201812121521]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.201812121521]

	at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.201812121521]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.201812121521]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Hm, I have to admit that I have tested the color channel only with ON/OFF and a full color value, not with a brightness string value only. There is also no test case for this usage. @Kai this might require a hot fix with a test case.

@jeckyllhavok Just to be sure we are on the same side: You have a dimmer item linked to the MQTT color channel?

Ok, go ahead!

Here’s what i did:(completly through Paper UI)

Create a new “MQTT Thing Binding” -->“Add manually” --> “Generic MQTT Thing” and select the right Broker

In Thing properties: “add channel” --> “Channel Type : Color value(Hue,Saturation,Brightness” add the topics and set as “is command”

Now link an Item to the channel which has “color” as type.

Open the Log Viewer, click on controll, set RGB–>works, set Saturation–>works set brightness–> message from my last post

I also tried with Channel Type “Color RGB” but with the same result, except that in Log File “is not a valid RGB syntax”

Thanks,
JeckyllHavok