[mythtv-users] New Sky+ App - control Sky box via tcp/ip network
Dave Pearson
lists at the-pearsons.co.uk
Fri Dec 14 21:17:37 UTC 2012
-----Original message-----
From:Dave Pearson <lists at the-pearsons.co.uk>
Sent:Fri 14-12-2012 21:14
Subject:Re: [mythtv-users] New Sky+ App - control Sky box via tcp/ip network
Attachment:sky_channel_guide.txt, skychange1.py
To:mythtv-users at mythtv.org;
-----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.
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
I forgot to mention - I modified the script so that the ip address of the Sky+HD Box is hardcoded - it just makes it easier when calling it from mythtv.
Dave.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121214/c14ba263/attachment.html>
More information about the mythtv-users
mailing list