Script to get active tv channel
Script to get active tv channel
Hey guys..
i currently own a ue40d8005 and im looking for some kind of solution to get info about which active tv channel is being shown on the tv atm.
is this possible? i was thinking some kind of.. perl? script "asking" the tv for the info.. i only need an ID, name or something unique to that single channel..
something like this perhaps: viewtopic.php?f=12&t=1792 but the other way around?
Cheers! Smilykoch
i currently own a ue40d8005 and im looking for some kind of solution to get info about which active tv channel is being shown on the tv atm.
is this possible? i was thinking some kind of.. perl? script "asking" the tv for the info.. i only need an ID, name or something unique to that single channel..
something like this perhaps: viewtopic.php?f=12&t=1792 but the other way around?
Cheers! Smilykoch
Re: Script to get active tv channel
No-one with knowledge of ANY way to get the active tv channel brought to a computer in some way?
really?
really?
- erdem_ua
- SamyGO Admin
- Posts: 3125
- Joined: Thu Oct 01, 2009 6:02 am
- Location: Istanbul, Turkey
- Contact:
Re: Script to get active tv channel
I remember that I already asked this question at somewhere...
Do you look at "Debug Menu?" You can find what channel is actually available from here.
But don't know what is http way to do that.
Do you look at "Debug Menu?" You can find what channel is actually available from here.
But don't know what is http way to do that.
Re: Script to get active tv channel
Okay.. so i the "debug menu" the currently active channel is showing.. but no current way of bringing this to the PC? either through HTTP, HDMI-CEC or ex-link?
Re: Script to get active tv channel
Where exact have you got this in top debug menu?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
- erdem_ua
- SamyGO Admin
- Posts: 3125
- Joined: Thu Oct 01, 2009 6:02 am
- Location: Istanbul, Turkey
- Contact:
Re: Script to get active tv channel
juuso, I don't know where it is but I remember see such an info while playing...
This info at Debug menu, which is only available by ExLink port.
For bridging this info to TV, you can use USB to RS232 based converter...Put USB converter to TV USB port.
Than write a program to detect actual channel on TV (using serial connection to ExLink ) and put it into network (HTTP)..
This info at Debug menu, which is only available by ExLink port.
For bridging this info to TV, you can use USB to RS232 based converter...Put USB converter to TV USB port.
Than write a program to detect actual channel on TV (using serial connection to ExLink ) and put it into network (HTTP)..
Re: Script to get active tv channel
What? Debug menu? LOL!
To get the active channel you can simply use UPNP!
GetCurrentMainTVChannel
You can also use:
GetWatchingInformation
To get the current airing program name (fetched from epg).
Or
GetCurrentProgramInformationURL
Which will return an URL from which you download an XML with cached EPG.
To get the active channel you can simply use UPNP!
GetCurrentMainTVChannel
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><Channel><ChType>DTV</ChType><MajorCh>8</MajorCh><MinorCh>65534</MinorCh><PTC>48</PTC><ProgNum>614</ProgNum></Channel>
GetWatchingInformation
Code: Select all
Only Hits on MTV (03:30AM~05:45AM)
Or
GetCurrentProgramInformationURL
Which will return an URL from which you download an XML with cached EPG.
Re: Script to get active tv channel
Plz do explain a little more or give some links to some more info on this
i could really use this
i could really use this
Re: Script to get active tv channel
TVAgent you can get from http://<ip tv>:52235/MainTVServer2/MainTVAgent2.xml
An example:
An example:
Code: Select all
#!/usr/bin/perl
# upnp_tv_agent.pl
use warnings;
use strict;
use Net::UPnP::ControlPoint;
my $upnp = Net::UPnP::ControlPoint->new();
my @devs = $upnp->search();
my $tv;
foreach my $dev ( @devs )
{
foreach my $serv ( $dev->getservicelist() )
{
if ( $serv->getservicetype() =~ /TVAgent/ )
{
$tv = $serv;
last;
}
}
}
die "TVAgent not found\n" unless $tv;
my $res = action( 'GetCurrentMainTVChannel' );
print "[*] $res->{CurrentChannel}\n";
$res = action( 'GetWatchingInformation' );
print "[*] $res->{TVMode}\n";
print "[*] $res->{WatchingInformation}\n";
exit 0;
# -----------------------------------------------------------------------------
sub action
{
my ( $act, $args ) = @_;
my $r = $tv->postaction( $act, $args );
unless ( 200 == $r->getstatuscode() )
{
die "Error $act: ". $r->getstatuscode()."\n";
}
my $res = $r->getargumentlist();
unless ( 'OK' eq $res->{Result} )
{
die "Error $act response $res->{Result}\n";
}
return $res;
}
# -----------------------------------------------------------------------------
__END__
Code: Select all
$ ./upnp_tv_agent.pl
[*] <?xml version="1.0" encoding="UTF-8"?><Channel><ChType>DTV</ChType><MajorCh>1</MajorCh><MinorCh>65534</MinorCh><PTC>58</PTC><ProgNum>530</ProgNum></Channel>
[*] Tuner
[*] Tenis - Atp 1000 Roma on La 1 (03:59PM~06:16PM)
Eduardo
Re: Script to get active tv channel
Cool.. Really! WOW thx!
i can access the XML file through my browser on: http://<ip tv>:52235/MainTVServer2/MainTVAgent2.xml
But it seems kinda empty? it looks like this: http://pastebin.com/jhSzuVSp
I really would like having a script to get it.. but i am not that good at Perl. could you explain your example script?
and would it be possible for me to create it in PHP as i currently have all my other scripts in PHP and i am fairly good at it
Cheers
Mathias Koch
i can access the XML file through my browser on: http://<ip tv>:52235/MainTVServer2/MainTVAgent2.xml
But it seems kinda empty? it looks like this: http://pastebin.com/jhSzuVSp
I really would like having a script to get it.. but i am not that good at Perl. could you explain your example script?
and would it be possible for me to create it in PHP as i currently have all my other scripts in PHP and i am fairly good at it
Cheers
Mathias Koch