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.
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
- 105,762
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"'

