Sky+ IP Control

Posted on
Sun Aug 24, 2014 2:31 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Sky+ IP Control

Hi,

Although I have an iTach IR blaster, I started wondering yesterday if it's possible to control Sky+ over IP, given that there's official Sky apps for iOS that do just that.

Lo and behold, I found these threads:

https://gladdy.uk/blog/2012/08/21/the-s ... -protocol/

http://forum.micasaverde.com/index.php?topic=11540.0

The first one contains a link to a Python GitHub project.

Is anyone here able to turn this into an Indigo plugin? I might start playing with it myself purely as Python script actions but I don't have the time to maintain it as a working plugin.

I know RogueProeliator does a lot of TV-based plugins, but it would be great if anyone could take this on?

Peter

Posted on
Sun Aug 24, 2014 6:10 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Sky+ IP Control

I was hoping to do something like this one day, but alas i’ve not really had the time to learn python to a sufficient level to tackle it yet. I’d love it if someone else did bring out a plugin though.. particularly if it could also read the data sent by the RS232 port so we could get live program, channel, etc info too.

Computer says no.

Posted on
Sun Aug 24, 2014 7:31 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Sky+ IP Control

I think the challenge here is to find someone with the programming skills AND a SkyTV receiver. Given the upfront hardware installation costs, and the monthly fees (necessary to maintain the plugin), I doubt if anyone is going to do this just for fun... But, ya never know.

Posted on
Sun Aug 24, 2014 7:40 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sky+ IP Control

berkinet wrote:
Given the upfront hardware installation costs, and the monthly fees (necessary to maintain the plugin), I doubt if anyone is going to do this just for fun...

Awww, go on... ;-)

Posted on
Sun Aug 24, 2014 8:00 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sky+ IP Control

durosity wrote:
...particularly if it could also read the data sent by the RS232 port so we could get live program, channel, etc info too.

Have you any links about this - I've not come across anything other than Sky Gnome and Sky Talker which use this port, neither of which are related to our needs.

Peter

Posted on
Sun Aug 24, 2014 11:01 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Sky+ IP Control

I don't have the link handy, but I do have one that detailed all the info provided via the port. Remember though that it's just one way so you can't use it to send info to the box. I did have a wee script I created that parsed some of this info into variables, but I've managed to lose it, so hopefully some day I'll sit down and get it done again.


Sent from my iPad using Tapatalk

Computer says no.

Posted on
Sun Aug 24, 2014 4:20 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Sky+ IP Control

Ah here it is:

http://www.dusky-control.com/gnome-protocol.shtml

As you mentioned before it’s really just designed for the gnome but even although that project is long dead the port remains even on the latest boxes (i’ve just hooked up mine to a serial port and can confirm the data is still in the exact format as described on the page above).

Computer says no.

Posted on
Sun Aug 24, 2014 4:56 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sky+ IP Control

Ah, cool.

Combine the IP control and RS232 feedback for a great plugin!

Posted on
Sun Aug 24, 2014 5:02 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Sky+ IP Control

That was eventually my plan. Of course i’d be quite happy if someone else were to do it instead… i’m a procrastinator.. :D

Computer says no.

Posted on
Mon Aug 25, 2014 1:01 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sky+ IP Control

I'd quite happily start it this morning and spend all week on it, but I think my family would have something to say about it as we have visitors arriving mid-week and you can't currently see the carpet in the guest bedroom.

There just ain't enough hours in the day for fun stuff. :-(

Posted on
Mon Aug 25, 2014 1:05 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Sky+ IP Control

I was really tempted... But, after I checked into the costs of getting a Sky box here in southern France, and the monthly fees, I abandoned the project before it ever got started.

However, I would be glad to help someone else in any way I can, if that would help.

Posted on
Mon Aug 25, 2014 1:21 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sky+ IP Control

berkinet wrote:
However, I would be glad to help someone else in any way I can, if that would help.

I might take you up on that.

I started looking at the plugin guide yesterday and most of it makes sense.

I've written several HTML, PHP and VB.net pages, scripts and apps and I'm slowly learning python (both for Indigo and because the school I work at are teaching it to the kids this year), so physically writing the code wouldn't be a problem.

Your experience of the plugin architecture and indigo as a whole would be great, and if you've any knowledge of networking/serial ports/sockets/packets, that's where I'm less versed.

Durosity, how would you envisage connecting Sky's serial port to Indigo in your setting? Onboard serial port (Mac), remote PC/Mac adjacent to Sky box with serial port, or iTach RS232/IP/Wifi box?

One of mine has a PC next to it which would send the data over IP for free; the other would need iTach.

Peter

Posted on
Mon Aug 25, 2014 1:57 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Sky+ IP Control

howartp wrote:
...I might take you up on that...
... if you've any knowledge of networking/serial ports/sockets/packets, that's where I'm less versed...

Sure, I'd be happy to help out. I took a quick look at Liam Gladdy's code on GitHub and it looks like you can use that, intact, as the core of your plugin. Architecturally, I'd suggest trying to use the code verbatim by including it as a module in the plugin. Then you can just call into it as you need. Of course, you might need to edit the code for Python 2.5 compliance and other local issues. You might follow a similar plan with the serial interface as well.

Posted on
Tue Aug 26, 2014 2:46 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sky+ IP Control

Just opened up the code and pasted into Indigo's scripting shell.

There's a tonne of invalid indentations in the original file. I've now sorted all these out and the whole code is now executing correctly. (I say correctly.... see next comment)

However the last statement block in the code is:
Code: Select all
if __name__ == "__main__":
    try:
        main(len(sys.argv),sys.argv)
    except Exception, e:
        print 'Caught main exception:',e
        sys.exit(1)

When that executes, the exception is caught and printed thus:

Caught main exception: 'module' object has no attribute 'argv'

This is where I get stuck. Is this because I'm trying to execute code from a module/class directly in the indigo shell, when it is designed to be called by other functions, or something else?

Google has plenty of answers suggesting the following function is the answer, but I'm in at the deep end here.

Code: Select all
PySys_SetArgv(int argc, char **argv)

Am I on totally the wrong track? :)

(Tidied, Indigo-compatible copy of code attached. I also had to strip out all blank lines within code blocks as they caused invalid indent errors - is there a way of leaving the blank lines in as it was much easier to read before I removed them! )

Peter
Attachments
skyRemote.txt
(65.21 KiB) Downloaded 217 times

Posted on
Tue Aug 26, 2014 2:54 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Sky+ IP Control

The code is expecting to be called from the command line with some argument or arguments. Try calling it using the Indigo command line IOM call... Sorry I dont recall it exactly, but look around, it's well documented. Something like indigohost -some-option...

Who is online

Users browsing this forum: No registered users and 7 guests