Hello All,
runtimeInfo:
version: 3.1.0
buildString: Release Build
locale: default
systemInfo:
configFolder: /etc/openhab
userdataFolder: /var/lib/openhab
logFolder: /var/log/openhab
javaVersion: 11.0.12
javaVendor: Azul Systems, Inc.
javaVendorVersion: Zulu11.50+19-CA
osName: Linux
osVersion: 5.10.60-sunxi
osArchitecture: arm
availableProcessors: 4
freeMemory: 68282840
totalMemory: 253845504
bindings:
- serial
clientInfo:
device:
ios: false
android: false
androidChrome: false
desktop: true
iphone: false
ipod: false
ipad: false
edge: false
ie: false
firefox: false
macos: false
windows: true
cordova: false
phonegap: false
electron: false
nwjs: false
webView: false
webview: false
standalone: false
os: windows
pixelRatio: 0.800000011920929
prefersColorScheme: light
isSecureContext: false
locationbarVisible: true
menubarVisible: true
navigator:
cookieEnabled: true
deviceMemory: N/A
hardwareConcurrency: 4
language: en-US
languages:
- en-US
- en
- tr
onLine: true
platform: Win32
screen:
width: 1920
height: 1080
colorDepth: 24
support:
touch: false
pointerEvents: true
observer: true
passiveListener: true
gestures: false
intersectionObserver: true
themeOptions:
dark: dark
filled: true
pageTransitionAnimation: default
bars: light
homeNavbar: default
homeBackground: standard
expandableCardAnimation: default
userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/94.0.4606.61 Safari/537.36
timestamp: 2021-09-24T08:15:43.999Z
i am trying the ColorPicker application on OH3.
i am created an RGB thing and a Dimmer channel and an RGB channel (Pictures and Thing Code are below)

UID: serial:serialDevice:SB1:RGB1
label: RGB1
thingTypeUID: serial:serialDevice
configuration:
patternMatch: v
bridgeUID: serial:serialBridge:SB1
channels:
- id: RGB1_DIMMER
channelTypeUID: serial:dimmer
label: DIMMER 1
description: ""
configuration:
onValue: O2_2104*254#%d10
offValue: O2_2104*0#
commandFormat: O2_2104*%d#
- id: RGB1_C1_String
channelTypeUID: serial:string
label: RGB1_C1_String
description: ""
configuration: {}
Dimmer channel working very well but the RGB don’t.
and RGB Rules is below
var Number red
var Number green
var Number blue
rule "RGB"
when
Item RGB1_RGB1C1String received command
then
// if (RGB1_Power.state === NULL) RGB1_Power.sendCommand(OFF)
if (!(receivedCommand instanceof HSBType))
return
logInfo("Color Command received", receivedCommand)
red = (receivedCommand as HSBType).red
green = (receivedCommand as HSBType).green
blue = (receivedCommand as HSBType).blue
RGB1_RGB1C1String.sendCommand(red)
RGB1_RGB1C1String.sendCommand(green)
RGB1_RGB1C1String.sendCommand(blue)
logInfo("LED Color changed", "R" + red + "G" + green + "B" + blue)
if (receivedCommand == ON){
RGB1_RGB1C1String.sendCommand("O2_2111","R"+red+"B"+blue+"G"+green)
}
else if (receivedCommand == OFF){
RGB1_RGB1C1String.sendCommand("O2_2111","R"+0+"B"+0+"G"+0) // Fade-out lights very slowly. Implemented in the device code
}
end
and log file
2021-09-24 10:14:30.957 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'RGB1_RGB1C1String' received command 13,47,89
2021-09-24 10:14:30.962 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RGB1_RGB1C1String' predicted to become 13,47,89
2021-09-24 10:14:30.974 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGB1_RGB1C1String' changed from 192,47,89 to 13,47,89
2021-09-24 10:14:30.988 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'RGB1_RGB1C1String' received command 89
==> /var/log/openhab/openhab.log <==
2021-09-24 10:14:30.997 [INFO ] [.core.model.script.LED Color changed] - R89G56.233166668061B47.17
==> /var/log/openhab/events.log <==
2021-09-24 10:14:30.999 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'RGB1_RGB1C1String' received command 56.233166668061
2021-09-24 10:14:31.003 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RGB1_RGB1C1String' predicted to become 89
==> /var/log/openhab/openhab.log <==
2021-09-24 10:14:31.015 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'RGB-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.Log.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null in RGB
==> /var/log/openhab/events.log <==
2021-09-24 10:14:31.027 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'RGB1_RGB1C1String' received command 47.17
==> /var/log/openhab/openhab.log <==
2021-09-24 10:14:31.029 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'RGB-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.Log.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null in RGB
==> /var/log/openhab/events.log <==
2021-09-24 10:14:31.031 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RGB1_RGB1C1String' predicted to become 56.233166668061
==> /var/log/openhab/openhab.log <==
2021-09-24 10:14:31.042 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'RGB-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.Log.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null in RGB
==> /var/log/openhab/events.log <==
2021-09-24 10:14:31.051 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RGB1_RGB1C1String' predicted to become 47.17
2021-09-24 10:14:31.062 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGB1_RGB1C1String' changed from 13,47,89 to 13,47,56.233166668061
2021-09-24 10:14:31.067 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RGB1_RGB1C1String' changed from 13,47,56.233166668061 to 13,47,47.17
btw, I don’t want HUE, SAT, etc. I need just Red Green and Blue data for sending to my physical device by Serial Binding.
where am i doing wrong?