[mythtv-users] MythTV box setting its input source on a Samsung TV over IP

Stephen Worthington stephen_agent at jsw.gen.nz
Wed May 19 18:04:06 UTC 2021

On Wed, 19 May 2021 18:45:44 +0100, you wrote:

>On 19/05/2021 18:23, Stephen Worthington wrote:
>> On Wed, 19 May 2021 17:41:56 +0100, you wrote:
>>> Has anyone here tried using the Samsung IP interface to control their
>>> Samsung TV over the network?
>>> My MythTV hardware doesn't support CEC but I'd quite like to be able to
>>> turn the TV on and set it to the correct input for MythTV using my MythTV
>>> remote - I don't want to have to pick up two remotes.
>>> I know I could use a programmable or a 4-in-1 universal remote.  I have an
>>> old Harmony (525) but I don't really get on with it. It chews through
>>> batteries and uses soft-keys on a small LCD screen which I can't read very
>>> well.  So I use an old Media Centre Edition remote which I've got to quite
>>> like and I'd rather not buy another for what is really just a 'nice to
>>> have' feature.
>>> I've learned how to bind remote key presses to scripts on my MythTV box and
>>> I can turn the Television on by pressing a button which triggers a script
>>> to send the TV a Wake-on-LAN packet.
>>> The problem comes in setting the TV to the HDMI1 input.  It can't be done
>>> directly using the original Samsung remote.  You have to press the 'Source'
>>> key and then use the arrow keys to navigate around an array of buttons
>>> representing the various input sources. Samsung make this harder by
>>> re-arranging the buttons each time depending on history.
>>> However it can be done directly using my Harmony remote.  There are HDMI1,
>>> HDMI2 etc soft keys on the little LCD which take the TV directly to the
>>> specified input source.  So I was hopeful that I'd be able to do the same
>>> thing using the IP interface.  I've installed the python based samsungctl
>>> application on my MythTV box and got it working.  I can send KEY_VOLUP to
>>> turn the volume up, and KEY_SOURCE to bring up the array of source buttons
>>> on the TV and lots of other fun stuff.
>>> Sadly though, the key commands KEY_HDMI1, KEY_HDMI2 which are listed in the
>>> documentation don't seem to do anything.  I can send KEY_HDMI, which steps
>>> around the available HDMI ports and I guess I should be happy with that,
>>> but I just believe Samsung must have provided an HDMIn command, if only I
>>> knew what it was.
>>> Any ideas?
>> If the Harmony can do it, it may be that the code it sends via IR will
>> also work over the IP interface.  So is it possible to get the source
>> code of the table the Harmony uses for your TV?
>As I recall, programming the Harmony remotes (I have a 525, no longer in use) involves replicating 
>keystrokes as though you are using the TV's remote; and everything being in known states.
>For your source, have you tried just hitting 'source' more than once? For my use that also stepped 
>through the different sources just as your HDMI button does. Of course that relies on your source 
>list being static and being in a known position at the start. Harmony knows that as it did the 
>previous source selection and so on.
>For your setup I think that, unless you can find the HDMIn codes, you are SOL.

This looks to be the table of IR codes for Samsung TVs:


More information about the mythtv-users mailing list