Wifi Led binding color change not working

I’m going crazy with this. I have the following thing defined

`Thing wifiled:wifiled:DC4F22876739 [ ip="[ip removed]", port=5577, pollingPeriod=30, protocol=“LD382”, driver=“CLASSIC”, fadeDurationInMs=1000, fadeSteps=100 ] // Kitchen

and the following items:

Switch   GF_Kitchen_AboveCabinets_Switch  "Power"                <light>       (gKitchen_AboveCabinet_Light) ["Lighting", "Switchable"] {channel="wifiled:wifiled:DC4F22876739:power"}
Dimmer   GF_Kitchen_AboveCabinets_Dimmer  "Dimmer"               <slider>      (gKitchen_AboveCabinet_Light) ["Lighting"]               {channel="wifiled:wifiled:DC4F22876739:white"}
Color    GF_Kitchen_AboveCabinets_Color   "Color"                <colorpicker> (gKitchen_AboveCabinet_Light) ["Lighting"]               {channel="wifiled:wifiled:DC4F22876739:color"}

I have the following test rule:

rule "Kitchen Test"
when
    Item Echo_Office_LastVoiceCommand changed to "kitchen test"
then
    GF_Kitchen_AboveCabinets_Color.sendCommand("255,0,0") //new HSBType("12.5,90.2.90.4"))
end

When this rule runs (regardless of using RGB or HSBType, I get the following:

2020-01-17 08:07:35.792 [vent.ItemStateChangedEvent] - GF_Kitchen_AboveCabinets_Color changed from 147.61363506317138671875000,100,69.019609689712524414062500 to 255,0,0

2020-01-17 08:07:50.155 [vent.ItemStateChangedEvent] - GF_Kitchen_AboveCabinets_Color changed from 255,0,0 to 147.61363506317138671875000,100,69.019609689712524414062500

Why does it change to what I set it to and then 10 seconds later change back to the previous value (which is the color the app is showing).

Any suggestions are more than welcome!!!

are you talking about the Magic Home leds?

if yes, i found it more easy adding them in paper UI
too many channels …

I can give that a try.

Except discovery gets an exceptoin:

2020-01-17 08:23:44.714 [ERROR] [nternal.DiscoveryServiceRegistryImpl] - Cannot trigger scan for thing types '[wifiled:wifiled]' on 'WiFiLEDDiscoveryService'!

java.lang.ArrayIndexOutOfBoundsException: 1

	at org.openhab.binding.wifiled.internal.discovery.WiFiLEDDiscoveryService.discover(WiFiLEDDiscoveryService.java:107) ~[?:?]

	at org.openhab.binding.wifiled.internal.discovery.WiFiLEDDiscoveryService.startScan(WiFiLEDDiscoveryService.java:70) ~[?:?]

	at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.startScan(AbstractDiscoveryService.java:209) ~[bundleFile:?]

	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:382) [bundleFile:?]

	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScans(DiscoveryServiceRegistryImpl.java:367) [bundleFile:?]

	at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:216) [bundleFile:?]

	at org.eclipse.smarthome.io.rest.core.internal.discovery.DiscoveryResource.scan(DiscoveryResource.java:97) [bundleFile:?]

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

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

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

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

	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [bundleFile:?]

	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [bundleFile:?]

	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [bundleFile:?]

	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [bundleFile:?]

	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [bundleFile:?]

	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [bundleFile:?]

	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [bundleFile:?]

	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [bundleFile:?]

	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [bundleFile:?]

	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [bundleFile:?]

	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [bundleFile:?]

	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [bundleFile:?]

	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [bundleFile:?]

	at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [bundleFile:?]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [bundleFile:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.Server.handle(Server.java:494) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

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

I went in a manually added the items in the PaperUI and then tried my script – same result only faster:

2020-01-17 08:31:13.282 [vent.ItemStateChangedEvent] - GF_Kitchen_AboveCabinets_Color changed from 147.61363506317138671875000,100,69.019609689712524414062500 to 255,0,0

2020-01-17 08:31:13.773 [vent.ItemStateChangedEvent] - GF_Kitchen_AboveCabinets_Color changed from 255,0,0 to 147.61363506317138671875000,100,69.019609689712524414062500

Instead of 10 seconds, it is less that half a second

** EDIT: I don’t even know where the value 147.61363506317138671875000,100,69.019609689712524414062500 is coming from. I went into the app and set it to a different color (pure blue). I don’t see the update in the log, yet, the value that “sticks” is the same.

What hardware are you using and are you sure that it is compatible with the protocol you have selected?

@5iver No, I’m not (how do I know which protocol goes with which hardware?). I have tried all three options documented in the docs and none seem to work. There are no markings on the control to indicate anything useful.

** EDIT **
This is the controller and the picture show is all the information there is on the unit:

My Controller

That looks to be an Arilux LC03. I use something very similar (LC02) and successfully use LD382A.

In case you can’t get it going, there are also a few alternative firmwares available for these which can be used with the MQTT binding. I haven’t tried this yet myself, but plan to when I can find the time.

When I recreated it using the PaperUI (see above) it automatically set it to LD382A; so, guess it’s not compatible. Is your LC02 is working fine using the WiFi Led Binding? How do I tell them apart?

Yes, mine are working fine on OH 2.5.1-2. Check the link in my previous post for details on the different models. Yours is the same thing but with an IR sensor and should work fine with LD382A.

After I switched to OH2.5.0 (and docker) I had some issues with the wifiled binding too. I couldn’t control and/or add my “ufo”-led controllers anymore.
However I didn’t test if my problems were OH or docker related. (I took this as an occasion to switch to Shelly RGBW2 :grinning:)

Do i have to make any changes in the phone app for this to work? Something is obviously immediately changing the color value back to something (?). What is doing it??? I’ve checked all my rules and I am not referring to that control anywhere else.I’m wondering if the app is doing it. Neither power or color are working.