RGB Led

import java.awt.Color

rule "Luminium Color Item"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      val red = receivedCommand.red * 2.55
      val green = receivedCommand.green * 2.55
      val blue = receivedCommand.blue * 2.55

      val newColor = new Color(red.intValue, green.intValue, blue.intValue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

Why log gives me

[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Led’: An error occurred during the script execution: Could not invoke constructor: org.eclipse.smarthome.core.library.types.HSBType.HSBType(java.lang.String)

Try:

rule "Luminium Color Item"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      val red = (Bedroom_Color.state as HSBType).red * 255
      val green = (Bedroom_Color.state as HSBType).green * 255
      val blue = (Bedroom_Color.state as HSBType).blue * 255
      val newColor = new Color(red.intValue, green.intValue, blue.intValue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Luminiu...': Color parameter outside of expected range: Red Green Blue

Try putting RED, GREEN, BLUE in all caps. According to this the fields are all caps.

“Rule ‘Luminiu
’: Color parameter outside of expected range: Red Green Blue”
maybe needs 2.55 rather than 255?

Anyway, I use:

import org.eclipse.smarthome.core.library.types.DecimalType
import org.eclipse.smarthome.core.library.types.HSBType

rule "Set HSB value of item RGBLed to RGB color value"
when
	Item RGBLed changed
then
	val hsbValue = RGBLed.state as HSBType

	val brightness = hsbValue.brightness.intValue 
	val redValue = ((((hsbValue.red.intValue * 255) / 100) *brightness) /100).toString
	val greenValue = ((((hsbValue.green.intValue * 255) / 100) *brightness) /100).toString
	val blueValue = ((((hsbValue.blue.intValue * 255) / 100) *brightness) /100).toString

	val color = redValue + "," + greenValue + "," + blueValue

	sendCommand( RGBLedColor, color)
end

[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Set HSB value of item RGBLed to RGB color value': Value must be between 0 and 100

odd, works for me

Yes. That works for me too


1 Like

Ok i will clarify my situation.

  • I have this LED Wifi Controller
  • I am on Ubuntu 17.10 (GNU/Linux 4.13.0-43-generic x86_64)
  • I am on openHAB 2.2.0 Release Build
  • Paper UI recognize the controller as wifiled:wifiled:6001949113D8 and the driver used is CLASSIC and protocol used is LD382A

My items/wifiled.items is:

Switch          Bedroom_Light_2      "Led"              <light>            (Bedroom, gLight)           {channel="wifiled:wifiled:6001949113D8:power"}
Color           Bedroom_Color        "Color"            <colorlight>       (Bedroom, gLight)           {channel="wifiled:wifiled:6001949113D8:color"}

With this rules/wifiled.rules:

rule "Wifi led"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      val red = (Bedroom_Color.state as HSBType).red * 255
      val green = (Bedroom_Color.state as HSBType).green * 255
      val blue = (Bedroom_Color.state as HSBType).blue * 255
      val newColor = new Color(red.intValue, green.intValue, blue.intValue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

My log is:

2018-05-25 12:58:07.015 [ome.event.ItemCommandEvent] - Item ‘Bedroom_Color’ received command 312,70,100
2018-05-25 12:58:07.020 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Wifi led’: An error occurred during the script execution: null
2018-05-25 12:58:07.023 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 52,98,100 to 312,70,100
2018-05-25 12:58:07.128 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9’: 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.(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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]

With this rules/wifiled.rules:

rule "Wifi led"
  when
    Item Bedroom_Color received command
  then
    if (receivedCommand instanceof HSBType) {
      val red = (Bedroom_Color.state as HSBType).red * 2.55
      val green = (Bedroom_Color.state as HSBType).green * 2.55
      val blue = (Bedroom_Color.state as HSBType).blue * 2.55
      val newColor = new Color(red.intValue, green.intValue, blue.intValue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

My log is:

2018-05-25 13:01:00.632 [ome.event.ItemCommandEvent] - Item ‘Bedroom_Color’ received command 59,97,100
2018-05-25 13:01:00.638 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 92,89,100 to 59,97,100
2018-05-25 13:01:00.640 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Wifi led’: An error occurred during the script execution: null
2018-05-25 13:01:00.748 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9’: 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.(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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]
2018-05-25 13:01:00.939 [ome.event.ItemCommandEvent] - Item ‘Bedroom_Color’ received command 70,94,100
2018-05-25 13:01:00.941 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 59,97,100 to 70,94,100
2018-05-25 13:01:00.942 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Wifi led’: An error occurred during the script execution: null
2018-05-25 13:01:01.092 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9’: 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.(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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]
2018-05-25 13:01:01.236 [ome.event.ItemCommandEvent] - Item ‘Bedroom_Color’ received command 75,96,100
2018-05-25 13:01:01.238 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 70,94,100 to 75,96,100
2018-05-25 13:01:01.245 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Wifi led’: An error occurred during the script execution: null
2018-05-25 13:01:01.345 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9’: 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.(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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]

What’s wrong? Thanks

Try that one:

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
      var red = ((Bedroom_Color.state as HSBType).getGreen * 255 / 100).intValue
      var red = ((Bedroom_Color.state as HSBType).getBlue * 255 / 100).intValue
      val newColor = new Color(red, green, blue)
      Bedroom_Color_2.sendCommand(new HSBType(newColor))
    }
end

2018-05-25 14:09:52.960 [ome.event.ItemCommandEvent] - Item ‘Bedroom_Color’ received command 359,77,100
2018-05-25 14:09:52.980 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 75,96,100 to 359,77,100
2018-05-25 14:09:53.015 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Wifi led’: An error occurred during the script execution: Cannot create a duplicate value ‘red’.
2018-05-25 14:09:53.078 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9’: 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.(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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]

I made a typo. Change the second one to blue and the third one to green.

2018-05-25 15:15:35.391 [ome.event.ItemCommandEvent] - Item 'Bedroom_Color' received command 357,82,100
2018-05-25 15:15:35.393 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 8,78,100 to 357,82,100
2018-05-25 15:15:35.395 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Wifi led': An error occurred during the script execution: null
2018-05-25 15:15:35.520 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9': 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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]
2018-05-25 15:15:35.688 [ome.event.ItemCommandEvent] - Item 'Bedroom_Color' received command 351,89,100
2018-05-25 15:15:35.690 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Wifi led': An error occurred during the script execution: null
2018-05-25 15:15:35.692 [vent.ItemStateChangedEvent] - Bedroom_Color changed from 357,82,100 to 351,89,100
2018-05-25 15:15:35.796 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.wifiled.handler.WiFiLEDHandler@6f0a35b9': 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.GeneratedMethodAccessor58.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) [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.GeneratedMethodAccessor57.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) [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) [?:?]

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