Page 1 of 1

Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Monday 10 December 2018 17:48
by DarkG
I proudly present my first script for Domoticz.

Its a bash command tool for remote control your TV over lan. You can use this for different TV Brands with Vestel Chassis.
Akai Crown Daewoo Dual Emerson Ferguson Funai Goranje Hitachi Horizon Hyundai ITT JVC Linsar Medion Tevion Lifetec
Nordmende Orion Palladium Panasonic CX Philips 32PFL3008 Polaroid RCA Saba Sanyo Toshiba Univerum
Start bash script with an argument like ./toshiba.sh on

Install:

Copy to your Folder an give rights.
chmod +x toshiba.sh

edit toshiba.sh with your IP of TV

get start.

Commands which you can use are in the script. Its the Remote Control like.

Code: Select all

#!/bin/bash 

# Script zum ausführen von Kommandos über Ethnernet zu einem Toshiba LCD Fernseher (Vestel Chassis)
# Script to execute commands over Ethernet to Toshiba LCD Television (Vestel Chassis)
# Version 0.1 10.12.2018 Cihan Sahin Germany

#IP dem Fernseher anpassen 
#Change IP to your TV



#Variablen
ip="http://192.168.0.108:56789/apps/SmartCenter" #Ziel Adresse des TV Targethost TV


#Programmstart
echo "Toshiba Lan Remote Control V0.01"
echo "$ip"

#Zielhostabfrage
if [ -n $ip ]
  then
    echo "Verbindung zu $ip wird hergestellt"
  else
    echo "Bitte zuerst die IP des TV eintragen."
fi

#Keycodes senden
case "$1" in
        0) curl -X POST -d '<remote><key code=1000/></remote>' $ip
            ;;
        1) curl -X POST -d '<remote><key code=1001/></remote>' $ip
            ;;
        2) curl -X POST -d '<remote><key code=1002/></remote>' $ip
            ;;
        3) curl -X POST -d '<remote><key code=1003/></remote>' $ip
            ;;
        4) curl -X POST -d '<remote><key code=1004/></remote>' $ip
            ;;
		5) curl -X POST -d '<remote><key code=1005/></remote>' $ip
            ;;
        6) curl -X POST -d '<remote><key code=1006/></remote>' $ip
            ;;
        7) curl -X POST -d '<remote><key code=1007/></remote>' $ip
            ;;
        8) curl -X POST -d '<remote><key code=1008/></remote>' $ip
            ;;
        9) curl -X POST -d '<remote><key code=1009/></remote>' $ip
		    ;;
		back) curl -X POST -d '<remote><key code=1010/></remote>' $ip
            ;;
        ratio) curl -X POST -d '<remote><key code=1011/></remote>' $ip
            ;;
        on) curl -X POST -d '<remote><key code=1012/></remote>' $ip
		    echo "Kommando On wird gesendet"
            ;;
        mute) curl -X POST -d '<remote><key code=1013/></remote>' $ip
            ;;
        lang) curl -X POST -d '<remote><key code=1015/></remote>' $ip
            ;;
		volup) curl -X POST -d '<remote><key code=1016/></remote>' $ip
            ;;
        voldown) curl -X POST -d '<remote><key code=1017/></remote>' $ip
            ;;
        info) curl -X POST -d '<remote><key code=1018/></remote>' $ip
            ;;
        down) curl -X POST -d '<remote><key code=1019/></remote>' $ip
            ;;
        up) curl -X POST -d '<remote><key code=1020/></remote>' $ip
		    ;;
		left) curl -X POST -d '<remote><key code=1021/></remote>' $ip
            ;;
        right) curl -X POST -d '<remote><key code=1022/></remote>' $ip
            ;;
        stop) curl -X POST -d '<remote><key code=1024/></remote>' $ip
            ;;
        play) curl -X POST -d '<remote><key code=1025/></remote>' $ip
            ;;
        rewind) curl -X POST -d '<remote><key code=1027/></remote>' $ip
            ;;
		forward) curl -X POST -d '<remote><key code=1028/></remote>' $ip
            ;;
        sub) curl -X POST -d '<remote><key code=1031/></remote>' $ip
            ;;
        close) curl -X POST -d '<remote><key code=1037/></remote>' $ip
            ;;
        fav) curl -X POST -d '<remote><key code=1040/></remote>' $ip
            ;;
        timer) curl -X POST -d '<remote><key code=1042/></remote>' $ip
		    ;;
		quick) curl -X POST -d '<remote><key code=1043/></remote>' $ip
            ;;
        app) curl -X POST -d '<remote><key code=1046/></remote>' $ip
            ;;
        epg) curl -X POST -d '<remote><key code=1047/></remote>' $ip
            ;;
        menu) curl -X POST -d '<remote><key code=1048/></remote>' $ip
            ;;
        pause) curl -X POST -d '<remote><key code=1049/></remote>' $ip
            ;;
		yellow) curl -X POST -d '<remote><key code=1050/></remote>' $ip
            ;;
        rec) curl -X POST -d '<remote><key code=1051/></remote>' $ip
            ;;
        blue) curl -X POST -d '<remote><key code=1052/></remote>' $ip
            ;;
        ok) curl -X POST -d '<remote><key code=1053/></remote>' $ip
            ;;
        green) curl -X POST -d '<remote><key code=1054/></remote>' $ip
		    ;;
		red) curl -X POST -d '<remote><key code=1055/></remote>' $ip
            ;;
        input) curl -X POST -d '<remote><key code=1056/></remote>' $ip
            ;;
        mediabrowser) curl -X POST -d '<remote><key code=1057/></remote>' $ip
            ;;
        text) curl -X POST -d '<remote><key code=1255/></remote>' $ip
            ;;
        presets) curl -X POST -d '<remote><key code=1014/></remote>' $ip
            ;;
		progup) curl -X POST -d '<remote><key code=1032/></remote>' $ip
            ;;
        progdown) curl -X POST -d '<remote><key code=1033/></remote>' $ip
            ;;
        swap) curl -X POST -d '<remote><key code=1034/></remote>' $ip
            ;;
        channel) curl -X POST -d '<remote><key code=1045/></remote>' $ip
            ;;
        
esac

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Saturday 30 March 2019 16:45
by leecollings
So, which folder does this need to be placed in to have it load up with Domoticz?

I want to be able to create virtual switches for different commands, or selector switches for source, can this be done?

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Saturday 30 March 2019 16:49
by leecollings
And just how is this used then? How can I run the script and press the source button, followed by a number button? What URL would be used, or command line prompt?

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Saturday 30 March 2019 16:59
by leecollings
So in terminal (this is from my Mac, but I'm SSHd into my Pi), I'm in the directory the script is saved in, and I'm using the command:

Code: Select all

./toshiba.sh info
I'm expecting the TV to show the info panel, but I don't get anything. However, the terminal window does show this:

Code: Select all

pi@domoticz:~/domoticz/scripts $ ./toshiba.sh info
Toshiba Lan Remote Control V0.01
http://10.0.0.119:56789/apps/SmartCenter
Verbindung zu http://10.0.0.119:56789/apps/SmartCenter wird hergestellt
So it seems the script is running, and I'm assuming the last line is saying a connection has been made, but then there's just a blank line, as if the script is waiting for something else. What do you think I'm doing wrong?

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Wednesday 03 April 2019 17:48
by leecollings
Hmm I've just thought, it could be that my TV (Techwood) although seems to be one of the brands Vestel manufacture, may not be included in this list, as it's not in the list you've posted above.

Where did you get this list of brands from?

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Tuesday 03 September 2019 22:12
by freakyman88
When i try to run the commands manualy to my Hitachi television it is giving the error code: curl: (52) Empty reply from server
When trying with a different portnumber nothing happens.

Is is possible the link which the script is using is not working on all televisions from these brands?

Can you please eleborate how you came to understanding which link you should be using, so i can try to figure this out for my own Hitachi tv?

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Saturday 07 September 2019 9:56
by DarkG
Hello. I used the android app for my tv with a packet sniffer on smartphone to locate the needed port.
It was always try and error method.

Most Information I get here

https://thomaskekeisen.de/de/blog/telef ... mart-home/
https://www.av-comparatives.org/wp-cont ... 201802.pdf

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Saturday 07 September 2019 10:05
by DarkG
I copied the script to /home/pi/domoticz/bash
Use like this

pi@raspberrypi:~/domoticz/bash $ /home/pi/domoticz/bash/toshiba.sh volup
Toshiba Lan Remote Control V0.01
http://192.168.0.111:56789/apps/SmartCenter
Verbindung zu http://192.168.0.111:56789/apps/SmartCenter wird hergestellt

Re: Toshiba/Medion/Telefunken TV Control Script Ver 0.1

Posted: Sunday 15 December 2019 21:21
by freakyman88
DarkG wrote: Saturday 07 September 2019 9:56 Hello. I used the android app for my tv with a packet sniffer on smartphone to locate the needed port.
It was always try and error method.

Most Information I get here

https://thomaskekeisen.de/de/blog/telef ... mart-home/
https://www.av-comparatives.org/wp-cont ... 201802.pdf
Thanks a bunch. With the german website and google translate i managed to retrieve te correct link and port for my Hitachi TV.

If anybody would like to try:
port: 56791
Link: http://yourip:56791/apps/vr/remote

If you still have issues try the application charles as descripted in the link given by DarkG.