OH2 - Samsung TV Binding - HDMI1 Source issue

I’m using the Samsung TV binding in OH2. I can switch between all HDMI sources except HDMI 1.
Everytime I choose HDMI1, i see this in the event log:
2016-12-17 16:09:39.421 [ItemStateChangedEvent ] - LRTV_Source changed from HDMI3 to HDMI1
2016-12-17 16:09:39.514 [ItemStateChangedEvent ] - LRTV_Source changed from HDMI1 to HDMI3

Basically it never switches because it always goes back to the original source.
I can switch between every other source(antenna, hdmi2/3/4) Only switching to HDMI1 causes an issue.
Any ideas?

Item:
String LRTV_Source “Source” {channel=“samsungtv:tv:f6a331f7_e98a_ece9_6278_c9157ab147a3:sourceName”}

Sitemap:
Switch item=LRTV_Source label=“LRTV Source” mappings=[TV=‘TV’,HDMI1=‘Android’, HDMI2=‘Roku’, HDMI3=‘Antenna’, HDMI4=‘XBOX’] icon=“none”

I tried isolating it:

Created a single site map entry…same issue.
Then i found something interesting. Apparently the label is HDMI/DVI; I changed the sitemap and it still doesnt work. Also, now the button just says “%label%” instead of “Android”

Switch item=LRTV_Source label=“LRTV Source” mappings=[HDMI1/DVI=‘Android’] icon=“none”

I’m guessing i need to escape the forward slash in the mapping somehow at this juncture.

Here is the answer:

	Switch item=LRTV_Source label="LRTV Source" mappings=["HDMI1/DVI"='Android']

You need to wrap it with double quotes.

1 Like

and how about the other sources in the mapping

all work…if you look at the first post i had the list there.
basically i had to append the " around the source with the /

thanks :slight_smile:

Dear Colleaguies,

it didn’t work for me. I think sourceName is only read? Did you guys tried to KEY_code?

Not quite sure what the ask is here. Only thing i ever used key code for was sendCommand(TV_KeyCode, “KEY_VOLUP”)

Keep in mind:

  1. My openhab version and plugins are 3 years old; i have never updated
  2. My TV is now 3 years old at least; so perhaps samsung changed something

Thanks, I got it solved for source using the key code feature…