I’ve tried these individual commands as switchs, ie mqtt to frodo topic broadlink/tv/samsung/hdmi1 when the mapping hdmi1 is received, and post “replay” to the topic.
21:10:32.172 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at 'items/samsung_source' with an invalid status value 'TV'.
21:10:38.978 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at 'items/samsung_source' with an invalid status value 'tv'.
21:10:43.020 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at 'items/samsung_source' with an invalid status value 'hdmi1'.
rule "TV Input Control"
when
Item TV_Input_Control received command
then
switch(receivedCommand) {
case 1 : TV_Input_Command.sendCommand("hdmi1")
case 2 : TV_Input_Command.sendCommand("hdmi2")
case 3 : TV_Input_Command.sendCommand("hdmi3")
case 4 : TV_Input_Command.sendCommand("tv")
}
end
This example setup will publish a payload of hdmi1 to the topic broadlink/tv/samsung if you select “Apple TV” (option 1) in the sitemap. If you like it, adapt it to your exact setup
Ps: If you need to use 4 different topics, you could setup your String item like you have done in the first post.