The Sky+HD Picasso DNLA control server protocol

Tonight, I released my first ever open source code that wasn’t a wordpress plugin, SkyRemote. It’s a python based IP remote control for Sky+HD boxes with the new Picasso EPG. This is currently the DRX980 and the DRX985 boxes.

It’s free as in beer, and licensed under the GPLv3. It’s based on a piece of software called “Miranda” which lets you browse UPnP endpoints.

Full information is on github but I wanted to document the DNLA endpoints available for people to find. That documentation is after the break

So, there are 5 endpoints. 3 exposed by the description0.xml file, 2 by the description2.xml file. SkyRemote only supports any of the first 3 endpoints, because the other 2 are seriously complicated, and I have no idea what format and type the arguments should be.

The full endpoint definitions, and the associated service actions, are available on pastebin: http://pastebin.com/7FkFf2m3


Comments

106 responses to “The Sky+HD Picasso DNLA control server protocol”

  1. Nice work, I’m hacking away at this too !
    I was using “Poster” in firefox and have managed to quickly Pause and resume the live TV.
    Am going to download your tool and have a play.
    Ultimate aim is to integrate this into “iRule” which is a remote control I run on my iPad.
    Have you managed to retrieve currently playing program info?

    1.  @BruH5200 That seems pretty cool! I’m sure it’s possible. This sort of thing could also be put into apps like MythTV to let linux users have their boxes turn over channels automatically.
       
      Currently playing program info is interesting. Yes, you can get it, but in the case of watching TV, channels seem to be returned as a 3 digit HEX code, which doesn’t directly relate to the channel number.
       
      I’ll try and figure this out some more this weekend.

  2. It looks like the bare minimum you can send is…
     
    POST /SkyPlay2 HTTP/1.1
    SOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#Pause”
    Content-Type: text/xml; charset=utf-8Content-Length: 299
     
    <?xml version=”1.0″ encoding=”utf-8″?>
    <s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>
    <s:Body>
    <u:Pause xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″>
    <InstanceID>0</InstanceID>
    </u:Pause>
    </s:Body>
    </s:Envelope>
     
    The User-Agent header is not required.
    Having trouble getting iRule to send that though !!!

  3. Bit of a brain dump as I’m figuring this out………….
     
    SOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#SetAVTransportURI”
    <?xml version=”1.0″ encoding=”utf-8″?><s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”><s:Body><u:SetAVTransportURI xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″><InstanceID>0</InstanceID><CurrentURI>xsi://ff0</CurrentURI><CurrentURIMetaData>NOT_IMPLEMENTED</CurrentURIMetaData></u:SetAVTransportURI></s:Body></s:Envelope>
     
    Switches to channel 113.
     
    Like you I haven’t figured out the relation between channel numbers and xsi values.
     
     
    Also there is a description7.xml
    if you haven’t spotted it.
     
    Hex = Sky Channel (might be subject to regional variation)
     
    656 = 104
    178E = 103
    7D6 = 102
    867 = 101
     
    Notify information is sent to the iPad on port 51000
    this occurs when a channel change occurs and sends the ID of the current channel.
     
     
    The initial “Browse” command when the iPad is trying to get all it’s inital data is:
     
    <s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>    <s:Body>        <u:Browse xmlns:u=”urn:schemas-nds-com:service:SkyBrowse:2″>            <ObjectID>0</ObjectID>            <BrowseFlag>BrowseDirectChildren</BrowseFlag>            <Filter>*</Filter>            <StartingIndex>0</StartingIndex>            <RequestedCount>25</RequestedCount>            <SortCriteria></SortCriteria>        </u:Browse>    </s:Body></s:Envelope>
     
     
    Then the same but with ObjectID = 3 (This seems to return the Sky Planner data, program synopsis included)
    It then repeats the ObjectID=3 but starting at startingindex = 25 to get the rest,
     
    I think the channel guide must be coming from the internet, not from the box and that must include the channel IDs,
     
     
     
     
     
    655 = 974

  4. I’ve found the channel data…
     
    http://tv.sky.com/channel/index
     
    {“init”:{“channels”:[{“c”:[2002,101,12,0],”pt”:”F”,”t”:”BBC 1 London”},{“c”:[2006,102,12,0],”pt”:”F”,”t”:”BBC 2 England”},{“c”:[6000,103,12,0],”pt”:”F”,”t”:”ITV1 London”},{“c”:[1621,104,12,0],”pt”:”F”,”t”:”Channel 4″},{“c”:[1801,105,12,0],”pt”:”F”,”t”:”Channel 5″},{“c”:[4061,106,12,1],”pt”:”P”,”t”:”Sky1 HD”},{“c”:[4066,107,12,1],”pt”:”P”,”t”:”Sky Living HD”},{“c”:[4053,108,12,1],”pt”:”P”,”t”:”Sky Atlantic HD”},{“c”:[3810,109,12,1],”pt”:”P”,”t”:”Watch HD”},{“c”:[2304,110,12,0],”pt”:”P”,”t”:”GOLD”},{“c”:[3809,111,12,1],”pt”:”P”,”t”:”Dave HD”},{“c”:[4056,112,12,1],”pt”:”P”,”t”:”Comedy Cen HD”},{“c”:[4080,113,12,1],”pt”:”P”,”t”:”Universal HD”},{“c”:[4074,114,12,1],”pt”:”P”,”t”:”Syfy HD”},{“c”
     
    so channel 113 from the example below is shown as:
    {“c”:[4080,113,12,1],”pt”:”P”,”t”:”Universal HD”}
     
    4080 Decimal = ff0 hex
    and ff0 is what the iPad sends to change to that channel !!
     
     
     

  5. Channel change is done by sending a channel ID: I’ve found the “hidden” IDs from the sky TV guide website: 
    They are a hex version of the long ID shown on: http://tv.sky.com/channel/index 
     
    I’ve arranged them into a nice table for you… http://pastebin.com/mxJNMHv5 
     
    Channel Change 
    ———————— 
     
    POST /SkyPlay2 HTTP/1.1 SOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#SetAVTransportURI” Content-Type: text/xml; charset=utf-8 Content-Length: xxx <?xml version=”1.0″ encoding=”utf-8″?> <s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encod…” xmlns:s=”http://schemas.xmlsoap.org/soap/envel…; <s:Body> <u:SetAVTransportURI xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″> <InstanceID>0</InstanceID> <CurrentURI>xsi://ff0</CurrentURI> <CurrentURIMetaData>NOT_IMPLEMENTED</CurrentURIMetaData> </u:SetAVTransportURI> </s:Body> </s:Envelope> Switches to channel “ff0” which is actually channel 113 !

  6. NeilWingfield Avatar
    NeilWingfield

    Hi There,
     
    I’m also tinkering about with this. Could someone please let me know the URL that i should be using in  Firefox Poster.
     
    I have tried putting http:// followed by the Sky box IP address, followed by the port :49153. Poster is returning the following in the server field ‘ Linux/2.6.18.8 UPnP/1.0 SKY DLNADOC/1.50’ but I am getting a status ‘401’ Unauthorized’
     
    If someone could please point me in the right direction I would be very grateful.
     
    Thanks,
     
    Neil.

    1. @NeilWingfield
      http://xxx.xxx.xxx.xx:49153/SkyPlay2

      For pause, play etc.

      1. NeilWingfield Avatar
        NeilWingfield

         @BruH5200  @NeilWingfield Thanks, I’ve tried that, but still getting the ‘401 Unauthorized’ error.
        Do I need to complete the ‘USER AUTH’ to allow this to work?

        1.  @NeilWingfield 
           
          using firefox poster….
           
          http://xxx.xxx.xxx.xxx:49153/SkyPlay2
           
          headers:
           
          SOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#Pause”
          Content-Type: text/xml; charset=utf-8Content-Length: 299
           
          body:
           
          <?xml version=”1.0″ encoding=”utf-8″?>
          <s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>
          <s:Body>
          <u:pause xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″>
          <InstanceID>0</InstanceID>
          </u:Pause>
          </s:Body>
          </s:Envelope>
           

        2.  @NeilWingfield ignore the content length bit that shouldn’t have been there.
          Poster will add it.

        3. sea2wright Avatar
          sea2wright

           @NeilWingfield  @BruH5200  Neil. If you are still having problems with Firefox poster try using telnet http://pastebin.com/zgetqZcN and see if that works. Remember to copy from “raw data” at bottom of page.

        4. NeilWingfield Avatar
          NeilWingfield

           @sea2wright  @BruH5200 Thanks guys, it’s working now. Took a while to get the headers correct, but got there in the end.

  7. sea2wright Avatar
    sea2wright

    You need to set your User Agent to “SKY_skyplus” check at: http://whatsmyuseragent.com/ How you do this depends on what web browser you use.

  8. sea2wright Avatar
    sea2wright

    re:  I’ve found the “hidden” IDs from the sky TV guide website:
     
    Whats the (hidden) URL?

    1. @sea2wright
      As shown in th original post:
      http://tv.sky.com/channel/index

      1. sea2wright Avatar
        sea2wright

         @BruH5200  @sea2wright Misunderstood you. I thought you had found a page where channel number was already in HEX

        1. @sea2wright the page has the “hidden ids” but they are decimal.
          If you convert them to hex they are what the iPad sends.

  9. sea2wright Avatar
    sea2wright

    Hi Bruce
    Using poster I can change channel, pause, resume play (at various speeds) & browse my planner.
    What I can’t do is play an item from my planner. Any ideas?
    I have tried to SetAVTransportURI to “file://pvr/290007DC” resulting in ACTION FAILED & “xsi://57A;231” resulting in RESOURCE NOT FOUND.

    1.  @sea2wright  I just did:
      Headers:
      SOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#SetAVTransportURI”
       
      Body:
      <?xml version=”1.0″ encoding=”utf-8″?><s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”><s:Body><u:SetAVTransportURI xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″><InstanceID>0</InstanceID><CurrentURI>file://pvr/290002DC?position=1&speed=30</CurrentURI><CurrentURIMetaData>NOT_IMPLEMENTED</CurrentURIMetaData></u:SetAVTransportURI></s:Body></s:Envelope>
       
       
      and that worked a treat !

      1.  @sea2wright An item from the Sky Planner looks like this…
         
        <item id=”BOOK:687866529″ restricted=”0″ parentID=”3″><upnp:class>object.item.videoItem</upnp:class><dc:title>Hardcore Pawn 5</dc:title><upnp:programID type=”nds.com_URI”>xsi://FFE;11B</upnp:programID><res protocolInfo=”internal:192.168.2.70:*:*” duration=”0:29:13″ size=”571279172″>file://pvr/290002A1</res><vx:X_genre id=”nds.com_internal” extended=”11,2828″>11</vx:X_genre><upnp:rating type=”nds.com_internal”>0</upnp:rating><upnp:scheduledStartTime>2012-08-24T12:04:10Z</upnp:scheduledStartTime><upnp:scheduledEndTime>2012-08-24T12:32:40Z</upnp:scheduledEndTime><upnp:scheduledDuration>P0D00:28:30</upnp:scheduledDuration><dc:description>Final Decision: Les reveals what he plans to do about the new pawn shop. Meanwhile, Ashley gets caught in the crossfire when a fight breaks out in the middle of the store. (S5, ep 2) </dc:description><upnp:channelNr>65535</upnp:channelNr><upnp:channelName>Bio</upnp:channelName><upnp:channelID type=”nds.com_URI”>xsi://FFE</upnp:channelID><vx:X_serviceType>5</vx:X_serviceType><vx:X_cgmsa>0</vx:X_cgmsa><vx:X_audioType>2</vx:X_audioType><vx:X_marketingMsg>Meet the Gold family and their crazy customers; every Friday from 9pm only on Bio.</vx:X_marketingMsg><vx:X_flags hasForeignSubtitles=”0″ hd=”0″ hasAudioDesc=”0″ widescreen=”1″ copyProtected=”0″ isLinked=”0″ allowAnalogTaping=”1″ currentSeries=”0″ ippv=”0″ oppv=”0″/><vx:X_baseType>2</vx:X_baseType><vx:X_bookingTime>2012-08-24T11:28:45Z</vx:X_bookingTime><vx:X_bookingType>2</vx:X_bookingType><vx:X_bookingDiskQuotaName>system</vx:X_bookingDiskQuotaName><vx:X_guardStartDur>0</vx:X_guardStartDur><vx:X_guardEndDur>0</vx:X_guardEndDur><vx:X_bookedAsOPPV>0</vx:X_bookedAsOPPV><vx:X_extensionStartDur>0</vx:X_extensionStartDur><vx:X_bookingActive>1</vx:X_bookingActive><vx:X_bookingKeep>0</vx:X_bookingKeep><vx:X_bookingLock>0</vx:X_bookingLock><upnp:recordedStartDateTime>2012-08-24T12:04:10Z</upnp:recordedStartDateTime><upnp:recordedDuration>P0D00:29:13</upnp:recordedDuration><vx:X_recStatus failed=”0″ contentStatus=”3″ exception=”100″ recState=”7″>5</vx:X_recStatus><vx:X_lastPlaybackPosition>0</vx:X_lastPlaybackPosition><vx:X_isViewed>0</vx:X_isViewed><vx:X_reminderStatus isVcrTimer=”0″>1</vx:X_reminderStatus><vx:X_isSeriesLinked>0</vx:X_isSeriesLinked><vx:X_pdlPlaybackAvailable>0</vx:X_pdlPlaybackAvailable><vx:X_pushPublishTime>2012-08-26T05:29:00Z</vx:X_pushPublishTime><vx:X_pushExpiryStart>2012-08-29T00:00:00Z</vx:X_pushExpiryStart><vx:X_pushExpiryEnd>2012-09-01T00:00:00Z</vx:X_pushExpiryEnd><vx:X_pdlDownloadStatus>0</vx:X_pdlDownloadStatus><upnp:srsRecordTaskID>RT:290002A1</upnp:srsRecordTaskID></item>

  10. The description0.xml file seems to randomly change it’s name.
    Tonight I noticed that the iPad was download description37.xml
     
    It seems that it changes and the relevant XML filesname is broadcast in the SSDP broadcasts the box makes.
    I guess this is normal UPNP behaviour, but I’m not really familiar with it.

    1. sea2wright Avatar
      sea2wright

       @BruH5200 Hadn’t tried description37.xml until now. Just gives a 404 error although did try 0 > 15 on one occasion when description2.xml wasn’t working and found SkyServe:2 in description1.xml. Usually there is only desc0 & desc2 present. It appears to be a feature (bug??) of the Sky box.
       
      Thanks for the SkyPlay info.

  11. My box has just updated to the new guide, and it seems there are differences, SkyPlay is no longer exposed in the descriptionN.xml file. There is only SkyBook2 and SkyBrowse2

  12. @lgladdy  Hi, how are you getting current playing?  Does this also mean you can return what the current channel is?

    1. 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.

    2. Has anyone figured out how we can get the full program name currently being played, along with the info box content for the program?
       
      I’d love to write a way to push playing data to trakt.tv or getglue.

  13. Sky follows UPnP specs quite well, except for the planner items, where they include some fields in the videoItem class, that are specified to be part of it. Mainly I’ve been writing a Mac app to control it, I’ve gotten the basic control and ability to view and start playing planner items. btw:
    The X_recStatus for planner items is whether it’s recored/ing/viewable, it’s inner possible values are:
    0 shows when downloading (possibly/probably other times)
    1 to be recorded
    3 recording 
    5 on PVR

    1. @Jon889 I’ve been doing something similar….  Are you getting the tv guide information from the box?

      1. @Jon889 I think TV Guide info comes from the web, not from the box.  I believe the TV channel mapping information (channel names and numbers and channel IDs) also comes from the web.

        1. @BruH5200  @Jon889 Yes, i thought this was the only route.  I’m trying to write a web interface and currently i’m downloading xmltv and i thought if i could get it from the box directly that this would be better.  Thanks.

  14. I have integrated these commands into iRule in the iPad / iPhone now.
    So I can do channel changes and fast forward rewinds, play pause etc.
    It’s a shame that you can’t do emulation of the entire remote control through this interface.
    Up down left right, select etc.

  15. @BruH5200
    Just about got my head round this…I can change channels ,pause ,but for the life of me can’t work out how to resume after pausing…..could you show me the XML of the play/resume command please…it’s doing my head in!!

    1. Thanks mate….exactly what I was looking for.

  16. @lgladdy  @BruH5200 I’ve had success at using firefox poster to change channels on my Sky+HD Box and would now like to set up a script to change the channels from MythTV, this will, for me, be far more reliable than sending commands via an IR Transmitter through a repeater to another room. Unfortunately I’m having problems getting the channel to change from this command line:
     
    curl –verbose –header “content-type: text/xml; charset=utf-8” –header “SOAPACTION: urn:schemas-nds-com:service:SkyPlay:2#SetAVTransportURI” –data “<?xml version=”1.0″ encoding=”utf-8″?><s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”><s:Body><u:SetAVTransportURI xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″><InstanceID>0</InstanceID><CurrentURI>xsi://9c7</CurrentURI><CurrentURIMetaData>NOT_IMPLEMENTED</CurrentURIMetaData></u:SetAVTransportURI></s:Body></s:Envelope>” POST http://192.168.1.202:49153/SkyPlay2
     
    the response I get is:
     
    <s:Fault>
    <faultcode>s:Client</faultcode>
    <faultstring>UPnPError</faultstring>
    <detail> <UPnPError xmlns=”urn:schemas-upnp-org:control-1-0″>
    <errorCode>-111</errorCode>
    <errorDescription>Invalid Action</errorDescription>
    </UPnPError>

    1. @lgladdy  @BruH5200 Try:
       
      curl –verbose –header “content-type: text/xml; charset=utf-8” –header “SOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#SetAVTransportURI”” –data “<?xml version=”1.0″ encoding=”utf-8″?><s:Envelope xmlns:n=”urn:schemas-nds-com:service:SkyPlay:2″ s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”><s:Body><n:SetAVTransportURI><InstanceID>0</InstanceID><CurrentURI>xsi://9c7</CurrentURI><CurrentURIMetaData>NOT_IMPLEMENTED</CurrentURIMetaData></n:SetAVTransportURI></s:Body></s:Envelope>” POST http://192.168.1.202:49153/SkyPlay2
       
      the response I get is:
       
      < HTTP/1.1 200 OK < CONTENT-LENGTH: 244 < CONTENT-TYPE: text/xml; charset=”utf-8″ < DATE: Sat, 01 Jan 2000 04:34:23 GMT < EXT: < SERVER: Linux/2.6.18.8 UPnP/1.0 SKY DLNADOC/1.50 < X-User-Agent: redsonic < <s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”><s:Body> <u:SetAVTransportURIResponse xmlns:u=”nds-comSkyPlay:2″></u:SetAVTransportURIResponse>

  17. @BruH5200  @NeilWingfield 
    <u:pause should be <u:Pause –   Causes an XML parsing error otherwise

  18. Thanks to the comments on this page, I’ve implemented a quick and dirty web server for controlling a sky box in the browser.
     
    Vid here:
    http://www.youtube.com/watch?v=TjOvBWtoy1M
     
    Project here:
    https://github.com/mwrf/skyplus.js
    Feel free to fork!

    1. @mwrf I’m looking to build a way to push live viewing data to services like trakt.tv, which would need some kind of running server. Do you have any code that gets the currently playing program? (I understand this requires talking to sky’s servers to get, as the upnp data won’t contain the actual program name and info)

      1. @lgladdy 
        I have it figured out, just need to code it!
        I can get the data from the Sky servers for any given channel ID no problem.
         
        E.g for RTE One (Channel ID 1251):
        http://tv.sky.com/programme/channel/1251/2013-01-01/3.json
        You can iterate over a day be requesting 0-4.json
         
        There’s a UNIX timestamp against every entry, so what I’m going to do is:
        — Poll the Sky box for current Channel
        — Pull down the listings for that channel from Sky
        — Look up what is currently scheduled to be on. 
         
        It should be accurate. I won’t be able to work on it until the weekend though.

        1. @mwrf This is great news – I’ve forked and can happily make a start if i get more time than you before the weekend. Finally, I notice your channel list is irish (presumably)? Any idea if we can get the sky box’s region? Or at least a complete list of all the channels.json so we can make it better supported through the UK?

        2. @mwrf So, a quick scan of that data leads to a json string of something along the lines of 
           
          {“d”:”The One With The Worst Best Man Ever: After Joey almost loses Ross’ wedding ring, Ross asks both Joey and Chandler to be his best man. Meanwhile, the girls host a baby shower for Phoebe.”,”m”:[863,1800,1,0,”–“],”rr”:”S”,”s”:1357070400,”sid”:14504,”t”:”Friends”,”url”:”http://sky.tv/pzdjsx”}
           
          We could then use something like thetvdb.com to lookup the show title from the description. In a very similar way to sickbeard works, it’s able to know if a programme is “air by date” (daily things, such as soaps, Eastenders in the case of whats on right now), or if its a series…
           
          We could then write a nice little parser for the description to get the show title and scan through the thetvdb to get that series and episode number and push to the third party service.
           
          Do we have any idea what $data[m] is? Presumably $data[sid] is some kind of show ID internal to sky? (I guess for Series Link?)

        3. @mwrf And a bit more info, you might not even need TheTVDB. If you take the channel number, and the first value of m and build that into the URL:
           
          http://tv.sky.com/programme/detail/3705/863
           
          You get a scrapable html element that’s loaded by AJAX usually which contains the series and episode number 🙂

        4. @lgladdy data[m] is the length of the program in seconds, sid must be Some Show ID like you say.

        5. @mwrf  @lgladdy No need to iterate through the guide… see http://epgservices.sky.com/5.1.1/api/2.0/channel/json/%5Bchannel number]/now/nn/1 and for more detailed current programme info change the last 1 to a 4.

  19. Georgelock Avatar
    Georgelock

    I have a DRX780UK box sitting unused. Can use this with DNLA to interface with my Twonkymedia NAS drives?
     
    Thanks 
     
    George

    1. @Georgelock Unfortunately not.  The Sky box is not a standard UPNP display or player.

  20. Georgelock Avatar
    Georgelock

    Thanks for the response. Can I make my Virgin TIVO box do the job whilst using it to access Virgin Media?

  21. ChrisWest Avatar
    ChrisWest

    Hi,  I don’t know if anyone is still watching this thread but I thought it was worth a try.
    This particular post has been invaluable to me in getting my setup working. So first, thanks.
    This morning however, it seems to have stopped working. My TB Amstrad box received an update in the night and I can only assume Sky have either changed something or blocked me/us. The app still works but all of my commands don’t work. Even the basic Pause command using Poster does nothing.
    I’m not clever enough to work out if it’s a big thing or if something simple has changed. I guess I’m posting in the hope that someone will be able to work it out and get me going again!!
    Thanks

    1. ChrisWest The SkyPlay2 DNLA endpoint has changed to SkyPlay in the newest update.
      You’ll need to update any apps that call /SkyPlay2 to now call /SkyPlay!

      1. ChrisWest Avatar
        ChrisWest

        lgladdy ChrisWest YES!! Thank you!! One little number nearly ruined it all!! Thank you very much – it’s all working again.

        1. ChrisWest lgladdy It’s probably a good lesson that we should parse the description<int>.xml file. Presumably that’s how the Sky apps and some people here haven’t had problems!

        2. brianilland Avatar
          brianilland

          lgladdy ChrisWest Yeh, you need to do an SSDP request to find out the correct description URLs, then parse the xml files and store the URLs. I wrote the app TV Planner Remote in the iOS app store, and had to make this change last week, so as to make sure it would work on both old and new Sky firmwares. Apart from that minor change, everything else I am using works per the previous firmware.

  22. entropic Avatar
    entropic

    Does the iOS app still work?What is the new firmware version?

  23. ringspun Avatar
    ringspun

    Something has definitely changed – I just SSH’d in to my box at home to test. I wrote some code a while ago which still finds the box, but now it craps out trying to get information about whats’ on.
    The code for anyone who’s interested is at https://github.com/dalhundal/sky-plus-hd
    I might get a chance to look at it this week.

    1. entropic Avatar
      entropic

      ringspun I have implemented a similar system, and I am now worried it will stop working. If I can get the update, I can sniff the traffic with Wireshark and hopefully see what has changed.

      1. ringspun Avatar
        ringspun

        @entropicI’ll try to remember to check what the sky version is tonight. I never made a note of what it was previously.I’d imagine the change is probably minor, and no harder to figure out than it was before – they seem to be sticking with the DLNA spec fairly well.

    2. ChrisWest Avatar
      ChrisWest

      ringspun Your code is great! It’s what inspired me to do my current setup.
      Basically I have an android app which I put together to control the tv, sky, xbmc etc. I was using this protocol to get the “now playing” data. It *was* working a dream!
      I can’t speak for iOS but the Android App IS still working. 
      The sky version number is 4f3151. I just phoned sky who confirmed that I and many others got an update last night.

      1. ringspun Avatar
        ringspun

        ChrisWest ringspun Thanks – however, it was the ‘now playing’ part of it that I wasn’t really happy with – and to be honest, was probably what frustrated me enough to make me not look at the code for a while.
        Basically, what I’d thought of as “now playing” is just in fact “what’s being broadcast now”. If you consider that I might be watching Sky time-shifted (paused for half hour, or rewound) then what it thinks I’m watching doesn’t necessarily match what is on screen.  I should not abandon it though, and just accept that that will be an issue.
        I dreamt up some ridiculous solutions, none of which I even attempted to implement. Foremost amongst those was to monitor how long the box is paused, how long it spends in rewind etc to try and figure out how far the box is time shifted from real time – but I don’t have high hopes for that being any where near accurate.

        1. ChrisWest Avatar
          ChrisWest

          ringspun ChrisWest I see exactly what you mean. I hadn’t really ran into that problem as I seldom watch ‘live’ tv – it’s nearly always from the planner.
          I was using your script to output the ‘live’ data to a file which I was then calling from the Android app. 
          If you get a few minutes to find out what’s changed and how to fix it then I and other, I’m sure will be in your debt!! Thanks.

    3. ringspunThe SkyPlay2 DNLA endpoint has changed to SkyPlay in the newest update.
      You’ll need to update any apps that call /SkyPlay2 to now call /SkyPlay!

      1. ringspun Avatar
        ringspun

        lgladdy ringspun Strange. I tried my code again, and it works with no changes. Perhaps I haven’t had the update yet and there was just another problem earlier.

  24. im on 4F3001, and have the latest ios app update. it still works. also the mac app i wrote still works too.

  25. entropic Avatar
    entropic

    My Sky box for testing is reporting version 4f3153
    My code has stopped working. Subscribing to the /SkyBrowse2 and /SkyPlay2 services results in a 404 Not Found.
    Calling SkyPlay with pause or play etc gives a 500 Internal Server Error.
    I will upadte my iPad app and look at what it’s doing with wireshark.

  26. entropic Avatar
    entropic

    I fixed my code by removing the “2” from the POST endpoint:
    e.g. This used to work:
    POST /SkyPlay2 HTTP/1.1
    NOw it has to be:
    POST /SkyPlay HTTP/1.1
    the rest is the same.

    1. ChrisWest Avatar
      ChrisWest

      @entropic I can confirm this worked. Just removed to 2’s and it all works again.

    2. entropic Avatar
      entropic

      I’ve updated my code to actually get these endpoints from the description<n>.xml files, to try to avoid this in the future. One other thing that changed in this update was that in the planner items, the format of the StartDate changed slightly.

      1. How exactly are you knowing which endpoints to use then? Surely you have to hardcode the name somewhere? What if sky changes the names radically, how do you know which is the remote, and which is the planner info?

        1. entropic Avatar
          entropic

          Jon889 You can get them from the description<N>.xml file, the location of which is broadcast over SSDP by the sky box.

        2. Yes, but once you get then from the descriptions XML how do you know which is for remote and which is for planner (seeing as your not using the name to identify which is which)

        3. brianilland Avatar
          brianilland

          Jon889 In ther servicelist node in the descriptionX.xml files, loop through the serviceList node and look for the service types :
          urn:schemas-nds-com:service:SkyBook:2 – for record requests
          urn:schemas-nds-com:service:SkyPlay:2 – for play requests
          urn:schemas-nds-com:service:SkyBrowse:2 – for browse requests
          When you find these, get the value for the controlURL node and append it to the box IP and port you already have.
          For example, the old firmware looks like this. The new firmware has the same values for serviceType, but a different control URL. This way, you should hopefully be Firmware-update-proof.
          <serviceList>
          <service>
          <serviceType>urn:schemas-nds-com:service:SkyBook:2</serviceType>
          <serviceId>urn:nds-com:serviceId:SkyBook2</serviceId>
          <SCPDURL>/scm_srs.xml</SCPDURL>
          <controlURL>/SkyBook2</controlURL>
          <eventSubURL>/SkyBook2</eventSubURL>
          </service>
          <service>
          <serviceType>urn:schemas-nds-com:service:SkyBrowse:2</serviceType>
          <serviceId>urn:nds-com:serviceId:SkyBrowse2</serviceId>
          <SCPDURL>/scm_hn_cds.xml</SCPDURL>
          <controlURL>/SkyBrowse2</controlURL>
          <eventSubURL>/SkyBrowse2</eventSubURL>
          </service>
          </serviceList>

        4. So we just have to hope they don’t change the service type?

  27. ChrisWest Avatar
    ChrisWest

    Anyone know how I get the planner details for a specific recording?
    I’ve got the file://pvr/xxxx but can’t work out how to get the data for just that entry. I can get the whole planner. I see there’s a ‘filter’ option but can’t work out how to use it.
    Thanks

    1. ChrisWest The filter option is there for filtering the returned set of results by tag, e.g. dc:title – not for search of data within the tags. There is a Search action, which I’ve tried posting various queries to, but no joy. Using GetSearchCapabilities returns:
      <SearchCaps>vx:X_bookingType,vx:X_recStatus,vx:X_recStatus@failed,vx:X_reminderStatus</SearchCaps>
      … so it looks like those are the only search capabilities currently. Probably why the official iPad app syncs planner items at startup, and then presumably stores the whole XML for query later. You can play with search via a SOAPACTION header of “urn:schemas-nds-com:service:SkyBrowse:2#Search”, and then the following body data:
      <?xml version=”1.0″?><s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:Search xmlns:u=”urn:schemas-nds-com:service:SkyBrowse:2″><ContainerID>3</ContainerID><Filter>*</Filter><RequestedCount>5</RequestedCount><StartingIndex>0</StartingIndex><SearchCriteria>[insert search criteria from SearchCaps above]</SearchCriteria><SortCriteria></SortCriteria></u:Search></s:Body></s:Envelope>

      Again it keeps returning an error, so not sure of the format of SearchCriteria – I’ve tried the normal uPnP format of ([tag name] contains “[search criteria]”), i.e. (vx:X_bookingType contains “2”), but I’m obviously missing something.

  28. ChrisB196 Avatar
    ChrisB196

    Hi, I hope you don’t all become instantly fed up with the following question only I am very much a newbie but I’ve been following the various posts in response to what appears to be amazing work by Liam! 🙂 Basically, I’m delving into the world of Linux having recently got a Raspberry Pi, primarily running XBMC so I can access my music library through Demopad on my iPad – can’t do this with Apple TV3 for obvious reasons!? Anyway, I’ve also been trying to set up some code in Demopad to control and pull information from Sky+HD box (Samsung with the ?picasso epg) via IP using a download that includes commands for play, pause, ff and rw at different speeds. What I’d really like to do is have the same capabilities in Demopad as you can with the Sky+ app, in particular accessing and navigating my Sky planner. Despite way too many hours trying to find something on the net, it seems Sky are not releasing the information for this. Liam, or anyone, do you have any suggestions of how this could be done please? The following is an example that works in Demopad for ‘play’;
    POST /SkyPlay2 HTTP/1.1x0Dx0AHost: 192.168.1.16:49153x0Dx0AUser-Agent: SKY_skyplusx0Dx0AContent-Length: 367x0Dx0AAccept: */*x0Dx0AContent-Type: text/xml; charset=utf-8x0Dx0ASOAPACTION: “urn:schemas-nds-com:service:SkyPlay:2#Play”x0Dx0AAccept-Language: en-usx0Dx0AAccept-Encoding: gzip, deflatex0Dx0AConnection: keep-alivex0Dx0Ax0Dx0A<?xml version=”1.0″ encoding=”utf-8″?>x0Dx0A<s:Envelope s:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>x0Dx0A    <s:Body>x0Dx0A        <u:Play xmlns:u=”urn:schemas-nds-com:service:SkyPlay:2″>x0Dx0A            <InstanceID>0</InstanceID>x0Dx0A            <Speed>1</Speed>x0Dx0A        </u:Play>x0Dx0A    </s:Body>x0Dx0A</s:Envelope>x0Dx0A
    Hope you can help and sorry if this is a stupid question… Thanks, Chris 🙂

  29. Brian Collins Avatar
    Brian Collins

    A question and an offering …
    The question is whether anyone knows of the equivalent to JSOn web service at http://tv.sky.com/channel/index – but which returns information about Sky *radio* channels? I can manually build my own mapping list for a few standard favourites. But I would need to maintain it as and when Sky rename or move channels. So a Sky-sourced data feed would be great.

    The offering is for those who would like to have a fairly complete network control of the Sky box implemented as a C# .Net class. Even if you don’t use Windows or C#, the source code may be helpful as a worked example for others on the same path as myself.
    The class forms part of my integrated smartphone/tablet  HTTP-based control system for all my TV/Video/Radio/Music/DVD/Spotify/iPlayer/Photos. I have recently integrated Sky control using reverse engineering pointers from this thread.
    The class can:
    Enumerate all TV channels, with Now+Next info and programme descriptions.
    Change to watch a specified live channel.
    Enumerate all planner recordings, with original broadcast channel and date/time info and programme descriptions.
    Start watching a planner recording.
    Delete a planner recording.
    Play / Pause / FF / Rewind the playing channel or recording.
    It has no means to set or otherwise control the recording *schedule* – I use a “proper” app for that. And it cannot emulate all the buttons on the IR remote control – I use an IR transmitter for that. But it has all the capabilities I need for a remote control.
    Eventually I will write up the complete project and make it all available under an MIT license. And I will tidy-up and comment the code for wider use. But for now, you can help yourselves to the source of this one class at http://brianavid.co.uk/Xfer/sky.zip.
    Enjoy
    Brian

    1. Hi Brian,

      Any chance you still have your C# Sky+ remote code available anywhere? The link you posted no longer seems to work. Assuming this technique still works (these articles are all fairly old now) I’d very much like to see if I can get something along these lines working myself, but I’m more than happy to take a look at existing code if anyone has any to offer!

      Many thanks and I look forward to hearing from you,

      Adam.

  30. Brian Collins Avatar
    Brian Collins

    [I’m posting here as it seems to be the most useful source of information on the Sky HTTP access]
    Aaargh!
    Today’s Sky STB update broke everything again – including for a few hours the SkyPlus IOS app.
    WireShark shows me that where I previously posted to /SkyBrowse, I must post to /444D5376-3253-6B79-5365-0019fbb99592SkyBrowse. Similarly /SkyPlay becomes /444D5276-3253-6B79-436F-0019fbb99592SkyPlay. But the posted XML appears to work unchanged.

    I have no idea what these GUIDs mean. Are they keyed to my STB? Are they persistent, and will survive a STB restart? Are they discoverable?
    So – beware of this breaking change to the Web protocol.
    Brian

    1. @Brian Collins Hey! Yeh – my blog post from the last time they updated the endpoints has talk about this change. Basically, they’ve put the Sky Box UUID into the end points. The url’s wont change, but are unique per box now.
      Presumably this is part of their plans to let boxes share planner programming over the network.

    2. brianilland Avatar
      brianilland

      @Brian Collins Darn. Can you confirm what box and firmware you are on from http://www.skyepginfo.co.uk/skyhd/skyhd.html. I wrote an app which is still working on R007.061.49.00P drx890, but I’ve not checked my code, I’m hoping I had the foresight to code this properly(!).

    3. brianilland Avatar
      brianilland

      @Brian Collins Brian – just checked. See my earlier post below to @jon889 about the servicelist nodes in the descriptionX.xml files.  luckily my code has survived this update and still works, so you should take this approach to survive future updates.

      1. Brian Collins Avatar
        Brian Collins

        brianilland Thanks for this. I am not currently using the descriptionX files, and I now see that I need to be for future proofing. At the moment I simply hard-wire the URLs. But a STB firmware update can occur at any time, and I want to avoid yesterday’s hassle of coming home from work to immediately need to re-wireshark the box and change the code!! That is the problem with a unified centralized control system.
        So I shall be adopting your approach quite soon.
        PS: Interestingly, the UUID on the SkyBrowse and SkyPlay are different – so it is not simply an encoding for the STB. But hopefully the descriptionX files will give both appropriate values.

        1. brianilland Avatar
          brianilland

          @Brian Collins brianilland Yes, also note that the numeric suffix of the descriptionX.xml files change over time, so you need to fire off a multicast SSDP request to get the correct description URLs. If you want to get all 3 control URLs, you’ll need to retrieve both description files.
          I do something like this :
          var nodeList1 = GetServicesNode(url1); // Get service nodes from URL1
          var nodeList2 = GetServicesNode(url2); // Get service nodes from URL2
          var nodeListMerge = nodeList1.Cast<XmlNode>().Concat(nodeList2.Cast<XmlNode>()); // Merge them
          // Loop through each service node.
          foreach (XmlNode no in nodeListMerge)
          {
          var serviceTypeElement = no[“serviceType”];
          if (serviceTypeElement != null)
          {
          if (serviceTypeElement.InnerXml.Contains(“urn:schemas-nds-com:service:SkyBook:2”))
          {
          var controlUrlElement = no[“controlURL”];
          if (controlUrlElement != null) bookUrl = controlUrlElement.InnerXml;
          }
          if (serviceTypeElement.InnerXml.Contains(“urn:schemas-nds-com:service:SkyPlay:2”))
          {
          var controlUrlElement = no[“controlURL”];
          if (controlUrlElement != null) playUrl = controlUrlElement.InnerXml;
          }
          if (serviceTypeElement.InnerXml.Contains(“urn:schemas-nds-com:service:SkyBrowse:2”))
          {
          var controlUrlElement = no[“controlURL”];
          if (controlUrlElement != null) browseUrl = controlUrlElement.InnerXml;
          }
          }
          }

        2. Brian Collins Avatar
          Brian Collins

          brianilland Thanks for this. I hadn’t bothered (till now) with SSDP as I know the IP address of the STB and all I needed was HTTP to that. But I now see the need for a more fuller discovery mechanism. It will make it more generic when I come to share the code anyway.

  31. Right! Fixed my last issue which ive deleted. My next question is:
    Is there a command I can send to the sky box to get its status, e.g. if its on or in standby?
    I am trying to integrate control into DemoPad and although im aware I cant switch the sky box on using IP commands I want to be able to set a flag for its power status in DemoPad so I can keep the remote and the box in sync and use an IR blaster to switch the box on and off. 
    Once again any helps greatly appreciated!
    Cheers,
    Tom.

    1. Brian Collins Avatar
      Brian Collins

      tombpain I have not found a way of doing this. But I turn the STB on with IR using the “TV” IR code. And then, since I know it is on, the “Power” IR code will then turn it off. This is reliable for me.
      Brian

  32. Brian Collins Avatar
    Brian Collins

    One further question on discovering Sky STBs. A basically have this working now in my .Net code, but wonder if I can do better.
    The question is how to identify and filter SSDP responses from the Sky box(es). I currently broadcast an M-SEARCH for “ST: ssdp:all” on the local network. I then filter the responses to identify the Sky boxes. Options for this filtering are:
    1) “server:” header contains the sub-string ” SKY “.
    2) “location:” port is 49153.
    3) There is a value of the broadcast “ST:” header that requests responses only from Sky STBs .
    4) Something I haven’t thought of yet.
    Any opinions on the best approach to this? 
    Thanks, Brian

    1. @Brian CollinsIn my code I look at the userAgent, and assume it’s a Sky Box if it has the value “redsonic”.

  33. Trevor Daniel Avatar
    Trevor Daniel

    Is it possible to make a call to tell the STB to record a particular programme please?
    Thanks
    Trev

  34. Along with the initial release of new
    firmware today (R008.063.49.04P) for DRX 890 & 895 and the
    previous release of new Sky+HD boxes with built in Wi-Fi, we’ve updated the
    Skyepginfo.co.uk website by splitting Sky HD box Firmware and Sky+HD Box
    Firmware into separate pages.
    Firmware versions for all Sky+HD boxes have moved to: http://www.skyepginfo.co.uk/skyhd/skyplushd.html
    While the SkyHD box (DRX595) remains at: http://www.skyepginfo.co.uk/skyhd/skyhd.html

  35. R008.063.49.08P is now available for forced update on DRX 890 & 895 boxes, do you guys know if any things changed with the remote commands for this version.

  36. @Brian Collins brianilland I’m back looking at this.  I seem to have forgotten how to do it……
    I’m using the “simple rest client” to try and get the description0.xml file.
    what user agent or other string do i need to prevent the “unauthorised” error?
    I need to get the UUIDs from the files so I can put them in my URLS for iRule on the iPad.

    Thanks

  37. BruH5200 Hi, I’ve been trying to get my head round this for AGES and just when I thought I was getting somewhere, the code now requires the UUIDs!!! I use Demopad (don’t swear, I see you use iRule 🙂 ) and had IP controls for basic transport thanks to Liam et al. I never managed to get change channel working but I’m still on it. Do you have any pointers on how to get the UUIDs (I have Wireshark) and an example of your iRule URLs would be very much appreciated? 
    Cheers, Chris

  38. BruH5200 brianilland   Thanks to Liam’s work and others since, I’ve managed basic transport controls on the Sky HD box until the latest update!? I understand UUIDs for each service are now needed but how do you find them? I think I’ve got 1 for SkyPlay through Wireshark but adding this as #####-####-####-SkyPlay after POST doesn;t work!? http://www.livefyre.com/profile/5492003/ I saw your recent post on here, have you or anyone had any success getting the description0.xml file? Any pointers to the format of your URLs for iRule would be appreciated….. 🙂
    Thanks
    Chris

  39. Hello there,

    I have been trying to use sky plus.js on my raspberry pi and on my macbook pro I get the server running on port 5555 and have update the channels.json for my area but on the web server when I try to change the channels nothing happens, in the command line I get “changing to channel ID ….” but nothing changes 🙁

    At times I get errors like “Error in Comms with SKY Box connect ETIMEDOUT” or even “Error in Comms with SKY Box connect ECONNREFUSED” :S 

    Can anyone please help? 

    Thanks.

  40. Hello there,

    I have been trying to use sky plus.js on my raspberry pi and on my macbook pro I get the server running on port 5555 and have update the channels.json for my area but on the web server when I try to change the channels nothing happens, in the command line I get “changing to channel ID ….” but nothing changes 🙁

    At times I get errors like “Error in Comms with SKY Box connect ETIMEDOUT” or even “Error in Comms with SKY Box connect ECONNREFUSED” :S 

    Can anyone please help? 

    Thanks.

  41. robinantony94 Avatar
    robinantony94

    lgladdy mwrf 
    I am Robin . You have done good work. i want to know how can i control the sky box through a Controller. I can send any string in Hex or any format to a specific IP with the Port number which you will tell me. 

    Pls reply on         robinantony94@mail.com

  42. Kevin Wilson Avatar
    Kevin Wilson

    The latest versions of the EPG and app allow you to send the standby, select, backup and keypad buttons to the box. I’m trying to send standby commands, but in my Wireshark captures the app doesn’t seem to send any SOAP requests when you click the standby button, unlike for the transport controls. Perhaps it sends some sort of magic packet instead? Does anybody know how the standby button is implemented?

    1. From what I can tell these commands are sent via the vnc protocol via remoteserverui

      1. Brian Illand Avatar
        Brian Illand

        Clive, any more info on this – how did you ascertain this? I’m trying to see how these are sent here too so I can test myself (C#).

      2. Prakash Rola Avatar
        Prakash Rola

        Did you manage to find out how to send this command?

    2. Hey – the standby button isn’t sent to the DLNA endpoints at all – it uses a different protocol, sending keycodes. In fact – we can send any key from a Sky remote (not tv, mute, volume for obvious reasons), including standby, up / down / left / right, red / blue etc. Checkout http://github.com/dalhundal/sky-remote

  43. R009.066.77.08P is on the DR stream for the DRX 890 & 895 Sky+HD box.

    R009.066.79.00P is on the DR stream for the DRX 595 SkyHD box (home screen not included).

    So you can force update your box now if you have one of those boxes.

  44. Mitchell Mann Avatar
    Mitchell Mann

    I know I’m late to the party here, but after using the Sky+ app recently to show off some photos on my iPhone to guests we had round I wondered if there was a Mac (or PC) app that allowed photos to be shared from a computer to the TV via the Sky+ box as I’ve many more on my Mac than I have on my iPhone. I used Wireshark to intercept the traffic to see how it worked and it *seemed* rather simple:-

    1. The app on the iPhone (or iPad/iPodTouch) opens a local port that acts as a web server, 51178 in my case although I’m sure this is randomly assigned.
    2. After initiating a TCP connection to the Sky+ box the app sends this: GET /photo-viewing/start?uri=http://192.168.0.5:51178/photo1763828098 HTTP/1.1 to port 49159 of the Sky+ box (192.168.0.5) being the IP of my iPhone and photo1763828098 being the jpg photo file on my iPhone.
    3. The photo is streamed from the iPhone to the Sky+ box and displayed.

    Quite simple. I thought I could initiate a TCP connection with netcat to port 49159 of the Sky+ box and substitute the IP of my iPhone for the IP of a local web server and specify port 80 and replace photo1763828098 with whatever photo file was stored in the home/root directory of the web server, but nothing happened. So I did some searching and came across this old blog and upon reviewing Liam’s excellent skyRemote.py I realise there are probably a few more steps required to make this work but my Python skills aren’t even noob level and as it already seems a pretty capable script I thought maybe adding this extra functionality would be quicker/easier than for me to code something from the ground up in a language I’m more familiar with.

    I hope this sparks some renewed interest and apologies for the spam as I notice there are a couple of related threads on this blog which I shall be copying and pasting this post to verbatim..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.