[mythtv-users] New Sky+ App - control Sky box via tcp/ip network
Michael Watson
michael at thewatsonfamily.id.au
Sat Dec 15 11:21:15 UTC 2012
Give this version a try. If it works, can you send me the
/tmp/skychange.txt file it creates. I just want to add a check that it
has changed the channel successfully.
On 15/12/2012 8:14 AM, Dave Pearson wrote:
> RE: [mythtv-users] New Sky+ App - control Sky box via tcp/ip network
>
> -----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 --------------
A non-text attachment was scrubbed...
Name: skychange.py
Type: text/x-python
Size: 3469 bytes
Desc: not available
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20121215/b80b56ad/attachment.py>
More information about the mythtv-users
mailing list