Results 11 to 14 of 14
SkyHD multiroom box and wifi?
This is a discussion on SkyHD multiroom box and wifi? within the Sky & Sky+ TV forums, part of the Other Sky help and support category; Thanks for that info. Never played with DNLA at all so I will go off and learn... ( several years ...
- 19-10-15, 03:26 PM #11
Re: SkyHD multiroom box and wifi?
Thanks for that info. Never played with DNLA at all so I will go off and learn... ( several years later... )
--------------------------------------------------------
Artificial Intelligence is no match for Natural Stupidity.
--------------------------------------------------------
Advertisement- 19-10-15, 04:01 PM #12
Re: SkyHD multiroom box and wifi?
Craig Heffner's Miranda Python script is useful for exploring the Sky boxes DNLA capabilities but requires the following patch to be applied.
https://code.google.com/p/miranda-up...ar.gz&can=2&q=Code:diff -u miranda/miranda.py bin/miranda_py.bak --- miranda/miranda.py 2012-12-23 10:14:08.000000000 +0000 +++ bin/miranda_py.bak 2015-02-18 22:41:29.000000000 +0000 @@ -329,7 +329,7 @@ # 1. This is a new host # 2. We've already seen this host, but the uniq hosts setting is disabled for hostID,hostInfo in self.ENUM_HOSTS.iteritems(): - if hostInfo['name'] == host: + if hostInfo['name'] == host and hostInfo['xmlFile'] == xmlFile: hostFound = True if self.UNIQ: return False @@ -369,7 +369,8 @@ def getXML(self,url): headers = { - 'USER-AGENT':'uPNP/'+self.UPNP_VERSION, + #'USER-AGENT':'uPNP/'+self.UPNP_VERSION, + 'USER-AGENT':'SKY_skyplus', 'CONTENT-TYPE':'text/xml; charset="utf-8"' }
- 22-01-16, 01:34 AM #13
- 07-10-17, 10:36 PM #14
Re: SkyHD multiroom box and wifi?
First my apologies for resurrecting an old thread. I've recently completed an online course in Python and thought I'd attempt to convert this programme to Python.
Code:import socket HOST = '192.168.0.12' # The Sky HD box IP address. PORT = 49160 data = '' print 'Type channel number or return to exit.' print '0 = Power on/Standby: 2 = Back up.' while 1: chan = raw_input('Sky> ') if (chan == ''): raise SystemExit() for char in chan: var = 2 mess = bytearray([4,1,0,0,0,0,227,0]) if (len(chan) == 1): mess[6] = 224 mess[7] = ord(char[0]) - 48 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) while (var != 0): data = s.recv(1024) if len(data) > 20: var = 0 else: sdata = bytearray([data[0]]) s.sendall(data) if (var == 2) else s.sendall(sdata) var = 1 s.sendall(mess) mess[1] = 0 s.sendall(mess) s.close()
NB: This will not control Sky Q boxes.
There are a few undocumented functions such as ch+ and ch- but I'll leave finding them as an exercise for the reader. Capital A gives an interesting result, totally useless but none the less interesting.
It is written for Python version 2.7 but should work on version 3 with minor changes to the print and input lines. I've tried it on Windows 7 and Linux and if anyone has a Mac I'd be interested to know if it works on Os X.
The programmers amongst you may question the lack of error checking and comments but as Python is an interpreted language the worst that can happen is that you will be left back at the command prompt. Any way what do you expect for thirty lines of code?