I noted that there are no questions about this, and it's sounding very strange. Anyway, I know the gemote project has been abandoned, so I'm wondering if anything similar has been developed. In brief, I would like to have a remote controller app in my Ubuntu PC to control my Samsung Smart TV connected to the same local network.
-
I found [samsung-remote](https://github.com/natalan/samsung-remote) (nodeJS module) and [samsungctl](https://github.com/Ape/samsungctl) (python application), not sure how well they work with modern TVs, though. – danzel May 29 '19 at 13:03
-
I'm searching something with a GUI... Could you imagine a command line client while you're watching the TV? :) – jasmines May 29 '19 at 13:44
-
2@jasmines then please mention that in your question. We can't help if you don't specify what your requirements are. – terdon May 29 '19 at 14:00
-
@jasmines I couldn't imagine using a GUI on a computer either. I'd probably use my smartphone for that purpose. Or maybe a gamepad connected to a computer, which is where the python library could be useful. As terdon said, please [edit] your question and be more specific about your requirements and the intended use case. – danzel May 29 '19 at 14:11
-
@jasmines could you edit your question to specify which functions of TV you want to control and why you to use computer instead of smartphone or classic remote control? – NicolasSmith Jun 03 '19 at 05:47
2 Answers
You can use YAD to create GUI front end to CLI commands.
As a comment points out there is a CLI controller for the Samsung Smart TV:
You just need to install Yad with sudo apt install yad and create a GUI window like this:
Using this command:
yad --title "Remote Control" --text "Samsung Smart TV" --width 250 --height 400 --form --columns 2 --field "Power:FBTN" --field "Vol +:FBTN" --field "Vol -:FBTN" --field "Input:FBTN" --field "Chan +:FBTN" --field "Chan -:FBTN"
Additional code is required to link each button to the Samsung Control program:
samsungctl --host <host> [options] <key> [key ...]
If I had a Samsung Smart TV I would enjoy writing the full script. However my Smart TVs are Sony and Toshiba. I will try to write a remote control GUI script soon for those TVs.
Seeing it in action
I created a little demo where instead of calling the Samsung Smart TV commands are echoed to the screen.
The one-liner code is a little longer now:
yad --title "Remote Control" --text "Samsung Smart TV" --width 250 --height 400 --form --columns 2 --field "Power:FBTN" 'bash -c "echo Power"' --field "Vol +:FBTN" 'bash -c "echo Volume Up"' --field "Vol -":FBTN 'bash -c "echo Volume Down"' --field "Input:FBTN" "bash -c 'echo "Input"'" --field "Chan +:FBTN" 'echo "Channel up"' --field "Chan -:FBTN" 'bash -c "echo Channel Down"'
As mentioned in comments if you have a Samsung TV newer than 2016 you will also need to download the websocket-client
- 99,709
- 34
- 237
- 401
-
please, provide an example with a working link binding... I tried --field "Power:FBTN:samsungctl --host 192.168.1.117 KEY_POWEROFF" --field "Power:FBTN" samsungctl --host 192.168.1.117 KEY_POWEROFF nothing works... – jasmines Jun 03 '19 at 09:05
-
samsungctl is not a valid option, it seems newer TVs are not supported... – jasmines Jun 04 '19 at 19:18
-
@jasmines I've added new code with button links and information on newer Samsung TVs – WinEunuuchs2Unix Jun 04 '19 at 23:17
yad --title "Remote Control" --text "Samsung Smart TV" --width 250 --height 400 --form --columns 2
--field "Vol+:FBTN" 'bash -c "echo volume UP && samsungctl --host 192.168.1.5 KEY_VOLUP "'
--field "Vol -":FBTN 'bash -c "echo Volume Down && samsungctl --host 192.168.1.5 KEY_VOLDOWN"'
--field "Chan +:FBTN" 'bash -c "echo Channel UP && samsungctl --host 192.168.1.5 KEY_CHUP"'
--field "Chan -:FBTN" 'bash -c "echo Channel Down && samsungctl --host 192.168.1.5 KEY_CHDOWN"'
--field "ListCH -:FBTN" 'bash -c "echo List Channel && samsungctl --host 192.168.1.5 KEY_CH_LIST"'
--field "Ret -:FBTN" 'bash -c "echo Exit && samsungctl --host 192.168.1.5 KEY_EXIT"'

