Views:
5,181β
Votes: 4β
Tags:
software-recommendation
samsung
remote
smart-tv
yad
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1148133
Title:
GUI application for controlling Samsung Smart TV connected to the same LAN of ubuntu desktop
ID:
/2019/06/02/GUI-application-for-controlling-Samsung-Smart-TV-connected-to-the-same-LAN-of-ubuntu-desktop
Created:
June 2, 2019
Edited: June 4, 2019
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
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