RGB Led

I think that is not a rules problem. Tried to delete it and same error log. I think that is related to this issue.

I don’t think so
Let’s debug

rule "Wifi led"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      var red = ((Bedroom_Color.state as HSBType).getRed * 255 / 100).intValue
      logInfo("TEST", "red: " + red.toString)
      var blue = ((Bedroom_Color.state as HSBType).getGreen * 255 / 100).intValue
      logInfo("TEST", "blue: " + blue.toString)
      var green = ((Bedroom_Color.state as HSBType).getBlue * 255 / 100).intValue
      logInfo("TEST", "green: " + green.toString)
      val newColor = new Color(red, green, blue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end
2018-05-25 16:05:07.083 [ome.event.ItemCommandEvent] - Item 'Bedroom_Color' received command 328,98,100
2018-05-25 16:05:07.097 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 337,85,100 to 328,98,100
2018-05-25 16:05:07.140 [INFO ] [.eclipse.smarthome.model.script.TEST] - red: 255
2018-05-25 16:05:07.143 [INFO ] [.eclipse.smarthome.model.script.TEST] - blue: 5
2018-05-25 16:05:07.144 [INFO ] [.eclipse.smarthome.model.script.TEST] - green: 138
2018-05-25 16:05:07.146 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Wifi led': An error occurred during the script execution: Could not invoke constructor: org.eclipse.smarthome.core.library.types.HSBType.HSBType(java.lang.String)
2018-05-25 16:05:07.598 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.wifiled.handler.WiFiLEDHandler@2e63c59b': Value must be between 0 and 100
java.lang.IllegalArgumentException: Value must be between 0 and 100
        at org.eclipse.smarthome.core.library.types.PercentType.validateValue(PercentType.java:55) [109:org.eclipse.smarthome.core:0.10.0.b1]
        at org.eclipse.smarthome.core.library.types.PercentType.<init>(PercentType.java:40) [109:org.eclipse.smarthome.core:0.10.0.b1]
        at org.openhab.binding.wifiled.handler.LEDStateDTO.valueOf(LEDStateDTO.java:84) [241:org.openhab.binding.wifiled:2.2.0]
        at org.openhab.binding.wifiled.handler.ClassicWiFiLEDDriver.getLEDStateDTO(ClassicWiFiLEDDriver.java:47) [241:org.openhab.binding.wifiled:2.2.0]
        at org.openhab.binding.wifiled.handler.ClassicWiFiLEDDriver.setColor(ClassicWiFiLEDDriver.java:54) [241:org.openhab.binding.wifiled:2.2.0]
        at org.openhab.binding.wifiled.handler.WiFiLEDHandler.handleColorCommand(WiFiLEDHandler.java:128) [241:org.openhab.binding.wifiled:2.2.0]
        at org.openhab.binding.wifiled.handler.WiFiLEDHandler.handleCommand(WiFiLEDHandler.java:110) [241:org.openhab.binding.wifiled:2.2.0]
        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) [109:org.eclipse.smarthome.core:0.10.0.b1]
        at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [109:org.eclipse.smarthome.core:0.10.0.b1]
        at com.sun.proxy.$Proxy139.handleCommand(Unknown Source) [241:org.openhab.binding.wifiled:2.2.0]
        at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:72) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
        at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
        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) [109:org.eclipse.smarthome.core:0.10.0.b1]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
        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) [?:?]

That should do the trick

rule "Wifi led"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      var red = ((Bedroom_Color.state as HSBType).getRed * 100 / 255).intValue
      logInfo("TEST", "red: " + red.toString)
      var blue = ((Bedroom_Color.state as HSBType).getGreen * 100 / 255).intValue
      logInfo("TEST", "blue: " + blue.toString)
      var green = ((Bedroom_Color.state as HSBType).getBlue * 100 / 255).intValue
      logInfo("TEST", "green: " + green.toString)
      val newColor = new Color(red, green, blue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

2018-05-25 16:39:45.975 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Wifi led': An error occurred during the script execution: Could not invoke constructor: org.eclipse.smarthome.core.library.types.HSBType.HSBType(java.lang.String)

Progress. If I change driver to FADING and protocol to LD686, i can change, with PAPER UI, color. But
the effect is not very accurate (blues is red!)

rule "Wifi led"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      var red = ((Bedroom_Color.state as HSBType).getRed * 100 / 255).intValue
      logInfo("TEST", "red: " + red.toString)
      var blue = ((Bedroom_Color.state as HSBType).getGreen * 100 / 255).intValue
      logInfo("TEST", "blue: " + blue.toString)
      var green = ((Bedroom_Color.state as HSBType).getBlue * 100 / 255).intValue
      logInfo("TEST", "green: " + green.toString)
      val newColor = new Color(red, blue, green)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

That should be better colour wise

It is an error with protocol. I will follow the issue in github

I have those:


How do I know, which LED Type I have and if I have those protocol issues?
I often tried to set the color through a HSB value but nothing works.

What protocol this controller has to control the led?
Mqtt, http,other?

Probably MQTT, theres a ESP8266 in it.
But I’m not sure what the Magic home wifi app or OpenHAB uses in the background to communicate with the controller.

You will need to flash a new firware on it
Tasmota will probably work

Tasmota is great.
I use it on my Basics but there gotta be another way to send a HSB Value.
atm I controll them via a program and set the program speed to > 96, so the Script stops, everything works but that should’nt be the the right way.
Reflashing them would be a bit to much to do with my 4 Controllers atm since I’ve so much other things to implement and do.

You won’t be able to control them without reflashing

Hmm, that’s really sad.
My Solution for now works and I will reflash them when I have the Time.
A 3D printer is rolling in, so I need to save every minute I can. ;d

Same for me? (Different model)

Which one do you have?

What binding are you currently using?

wifiled

I have this one

I think you should put them in capital letters since they are in small . Maybe that could help. Also thisrouterlogin.mobi guide might help you in resloving router issues if any.