[mythtv-users] New Sky+ App - control Sky box via tcp/ip network

Dave Pearson lists at the-pearsons.co.uk
Fri Dec 14 21:14:01 UTC 2012


-----Original message-----
From:Michael Watson <michael at thewatsonfamily.id.au>
Sent:Fri 14-12-2012 20:49
Subject:Re: [mythtv-users] New Sky+ App - control Sky box via tcp/ip network
To:mythtv-users at mythtv.org; 
Not a Problem, happy to assist.   I am by no means an expert in python 
either, but if you need help with the error handling and checking of 
current channel, let me know. I will need an example of the data 
returned after a successful channel change, and after a change when its 
already on that channel.  I found the code to query the current channel. 
but it looks a bit vague.

Current playing or current channel is returned by:
SkyControl SkyPlay GetMediaInfo
Set InstanceID value to: 0

CurrentURI : xsi://17FC
This indicates channel ITV1 Meridian South or
CurrentURI : file://pvr/29004438
in the case of a recording.

Yes, I've managed to amend the script now so that it first checks (using GetMediaInfo) to see what is showing on the Sky box, if the CurrentURI line contains a match for the hex code of the channel we're changing to, the script exits. I had to write the response.read() data into a file before I could search for the value - I'm sure there's probably a more efficient way of achieving this, but hey - it works!

 
I've attached the scipt and the channel data file (which I now store in /etc/mythtv/sky_channel_guide.txt) just in case anyone else might find it useful. It's not particularly neat and tidy (unlike your original), so hopefully people won't look too closely at it and give me a hard time.

 
Thanks again for all your help.

 
Regards,

Dave.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121214/6a7a493c/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sky_channel_guide.txt
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121214/6a7a493c/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skychange1.py
Type: text/x-python
Size: 2667 bytes
Desc: not available
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121214/6a7a493c/attachment.py>


More information about the mythtv-users mailing list