That has already worked. The script seems to work. However, the rule does not seem to work yet. If I change the color in the Basic UI, it will not change. Do I have to convert the rule to another format as well? I work with a Mac and Visual Studio code. Thank you very much for your efforts.
###############################################################################
################# openHABianPi ################################################
###############################################################################
## Ip = 192.168.100.35
## Release = Raspbian GNU/Linux 9 (stretch)
## Kernel = Linux 4.9.59-v7+
## Platform = Raspberry Pi 3 Model B Rev 1.2
## Uptime = 0 day(s). 23:4:29
## CPU Usage = 1 % avg over 4 cpu(s) (4 core(s) x 1 socket(s))
## CPU Load = 1m: 0.00, 5m: 0.02, 15m: 0.05
## Memory = Free: 0.29GB (31%), Used: 0.65GB (69%), Total: 0.95GB
## Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
## Root = Free: 11.66GB (86%), Used: 1.87GB (14%), Total: 14.14GB
## Updates = 14 apt updates available.
## Sessions = 1 sessions
## Processes = 137 running processes of 32768 maximum processes
###############################################################################
Welcome to __ _____ ____ _
____ ____ ___ ____ / / / / | / __ )(_)___ _____
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ / / __ `/ __ \
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ / / /_/ / / / /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/_/\__,_/_/ /_/
/_/
openHAB 2.2.0-1 (Release Build)
Looking for a place to get started? Check out 'sudo openhabian-config' and the
documentation at http://docs.openhab.org/installation/openhabian.html
The openHAB dashboard can be reached at http://openHABianPi:8080
To interact with openHAB on the command line, execute: 'openhab-cli --help'
[20:42:57] Snop007@openHABianPi:~$ bash /etc/openhab2/scripts/hue_tradfri_color.sh 6 Schl_Bambus_bu_brightness 1
[{"success":{"/lights/6/state/on":true}},{"success":{"/lights/6/state/xy":[0.3812,0.3385]}}][20:43:40] Snop007@openHABianPi:~$ bash -x /etc/openhab2/scripts/hueor.sh 6 Schl_Bambus_bu_brightness 1
+ openhab_ip=192.168.100.35
+ hue_brigde_ip=192.168.100.20
+ hue_bridge_user=mO9LfyqD0SFDzznPWnKaQYodK0JiOGPEnix-LPrM
+ case $3 in
+ curl -s -H 'Accept: application/json' -X PUT --data '{"on": true,"xy": [0.3812,0.3385]}' http://192.168.100.20/api/mO9LfyqD0SFDzznPWnKaQYodK0JiOGPEnix-LPrM/lights/6/state
[{"success":{"/lights/6/state/on":true}},{"success":{"/lights/6/state/xy":[0.3812,0.3385]}}]+ sleep 1
+ curl -X POST --header 'Content-Type: text/plain' --header 'Accept: application/json' -d 50 http://192.168.100.35:8080/rest/items/Schl_Bambus_bu_brightness
[20:43:53] Snop007@openHABianPi:~$
[20:43:53] Snop007@openHABianPi:~$ file /etc/openhab2/scripts/hue_tradfri_color.sh
/etc/openhab2/scripts/hue_tradfri_color.sh: ASCII text
[20:45:14] Snop007@openHABianPi:~$
Hier meine rules.rules
// RGB Workaround Schlafzimmer Kugel
rule "RGB Workaround Schlafzimmer Kugel"
when
Item Schl_Bambus_bu_colorpicker changed
then
executeCommandLine("/etc/openhab2/scripts/hue_tradfri_color.sh 6 Schl_Bambus_bu_brightness " + Schl_Bambus_bu_colorpicker.state)
end