Support executing more than one instruction for Samsung TV bidning

Currently, Samsung TV binding can only map one openHAB command per one Samsung TV instruction or key press. There are some cases that I need to execute more than one instruction. Something like the following will be helpful:

Switch    Roku    "Roku"    <roku>    (FF_Living_TV, Media_Center)    {samsungtv="ON:Livingroom:[KEY_TV, KEY_SOURCE, KEY_DOWN, KEY_DOWN], OFF:Livingroom:KEY_TV}

Since I don’t have the keys KEY_HDMIx I need to navigate the TV UI menu in order to select the correct HDMI (multiple instructions or key press events).

Create Items for each button on you can press (e.g. one for KEY_TV, one for KEY_SOURCE, one for KEY_DOWN, etc.). Remove the binding from “Roku” and make it be just what I’ve seen called a “virtual switch” (I don’t like that name but don’t have a better one). Then write a rule that triggers each key in sequence, adding in any timing delays you may need between the presses.

@rlkoshak Do you have an example of a openHAB “virtual switch” I couldn’t find any on the documentation. Perhaps by a virtual switch you mean a switch without a binding?

The idea it’s ok. However, i feel that this functionality should be OOTB for this components and not just a workaround.

Just make a switch without any binding.

Switch Roku "Roku" <roku> (FF_Living_TV, Media_Center)

IMHO, this “work around” is the proper way to implement something like this. It is the only way you can control the timing of the button presses.

@rlkoshak I see your point. Thanks for the guidance.

@rlkoshak How can i create a rule that sends the equivalent command:

{samsungtv="ON:Livingroom:KEY_TV}

To a virtual switch in a rule:

Switch Roku "Roku" <roku> (FF_Living_TV, Media_Center)

  1. Like I said, create a separate Switch Item for each key you will send to the TV (e.g. Switch LR_KEY_TV {samsungtv="ON:Livingroom:KEY_TV})
  2. Create a rule that triggers when Roku receives a command
  3. In the rule you send commands to the key switches (e.g. LR_KEY_TV.sendCommand(ON))

@rlkoshak i see, now i understand. Thank you so much for your help.