executeCommandline with recieved Command?

Hi folks,

Trying to remote control my new Philips TV, I sufferings some problems.

Switching it On and Off works like charm, but now i’m trying to switch the Ambilight and it doesn’t work.

This is my Setup:


Selection item=Philips_Ambi_FollowVideo mappings=["COMFORT"="Komfort","RELAX"="Relax","IMMERSIVE"="Intensiv","NATURAL"="Natürlich","STANDARD"="Standard","GAME"="Spiel","VIVID"="Lebhaft","OFF"="Aus"]


String Philips_Ambi_FollowVideo "Ambilight [%s]"


rule "Philips_TV Ambilight Follow Video"

when Item Philips_Ambi_FollowVideo recieved command


executeCommandLine("sudo /etc/openhab2/scripts/philips.py --host --command set_followvideo --value " + receivedCommand)


How the f*** can i pass the recieved command? In the event.log all status changes and recieved commands seem to be right. But the execution of the script doesn’t work.

Somebody any idea?

Greetings Michael

As recievedCommand isn’t necessarily a string for all Item types, maybe it needs a .toString

Thank you for the solution, but after some tests and your suggestion, i figured out, the rule is never triggered!

Changed it to this and now everything works fine:

rule "Philips_TV Ambilight Follow Video"

when Item Philips_Ambi_FollowVideo changed


executeCommandLine("sudo /etc/openhab2/scripts/philips.py --host --command set_followvideo --value " + Philips_Ambi_FollowVideo.state)


.state did the trick :wink:

Greetings Michael