pyskyqremote


Namepyskyqremote JSON
Version 0.3.25 PyPI version JSON
download
home_pagehttps://github.com/RogerSelwyn/skyq_remote
SummaryLibrary for Sky Q Remote
upload_time2023-04-01 15:57:49
maintainer
docs_urlNone
authorRoger Selwyn
requires_python>=3.7
licenseMIT
keywords skyq remote
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![CodeFactor](https://www.codefactor.io/repository/github/rogerselwyn/skyq_remote/badge)](https://www.codefactor.io/repository/github/rogerselwyn/skyq_remote)

![GitHub release](https://img.shields.io/github/v/release/RogerSelwyn/skyq_remote) [![maintained](https://img.shields.io/maintenance/yes/2023.svg)](#)
[![maintainer](https://img.shields.io/badge/maintainer-%20%40RogerSelwyn-blue.svg)](https://github.com/RogerSelwyn)
[![Community Forum](https://img.shields.io/badge/community-forum-brightgreen.svg)](https://community.home-assistant.io/t/custom-component-skyq-media-player/140306)

# pyskyqremote
Python module for accessing SkyQ box and EPG, and sending commands

## Introduction

This library enables access to SkyQ devices, primarily focused on the UK, but should also work for Italy and Germany.

## Installing

To install:

```
pip install pyskyqremote
```

## Usage

### Base
```
from pyskyqremote.skyq_remote import SkyQRemote

self.client = SkyQRemote('192.168.1.99')
```
Optional parameters:
* epg_cache_len - Default = 20
* port - Default = 49160
* json_port - Default = 9006


### Get device information

```
device = self.client.get_device_information()
```

Will return an object such as below for device informatiom:

```
{
   'ASVersion':'Q112.000.21.00-AS_asdev',
   'IPAddress':'192.168.1.22',
   'countryCode':'GBR',
   'usedCountryCode':'GBR',
   'hardwareModel':'ES240',
   'hardwareName':'Falcon',
   'deviceType': 'GATEWAYSTB',
   'gateway': true,
   'gatewayIPAddress': '192.168.1.20',
   'manufacturer':'Sky',
   'modelNumber':'Q112.000.21.00L (53wk8j8)',
   'serialNumber':'0627086857 2',
   'versionNumber':'32B12D',
   'bouquet': 4101,
   'subbouquet': 9,
   'wakeReason': 'ECO',
   'systemUptime': 28346,
   'hdrCapable': true,
   'uhdCapable': true,
   'presentLocalTimeOffset': 3600,
   'utc': 1660486276,
   'futureLocalTimeOffset': 0,
   'futureTransitionUtc': 1667091599
}
```

### Get device information (JSON)

```
device = self.client.get_device_information().as_json()
```

Will return a JSON structure such as below for device information:

```
{
   "__type__":"__device__",
   "attributes":{
      "ASVersion":"Q112.000.21.00-AS_asdev",
      "IPAddress":"192.168.x.xx",
      "countryCode":"GBR",
      "usedCountryCode":"GBR",
      "hardwareModel":"ES240",
      "hardwareName":"Falcon",
      "deviceType": "GATEWAYSTB",
      "gateway": true,
      "gatewayIPAddress": "192.168.1.20",
      "manufacturer":"Sky",
      "modelNumber":"Q112.000.21.00L (53wk8j8)",
      "serialNumber":"##########",
      "versionNumber":"32B12D",
      "bouquet": 4101,
      "subbouquet": 9,
      "wakeReason": "ECO",
      "systemUptime": 28346,
      "hdrCapable": true,
      "uhdCapable": true,
      "presentLocalTimeOffset": 3600,
      "utc": 1660486276,
      "futureLocalTimeOffset": 0,
      "futureTransitionUtc": 1667091599
   }
}

```

### Decode device information (JSON)

```
from pyskyqremote.media import device_decoder
device = device_decoder(device_json)
```

Will decode the JSON structure to a python object.


### Get power status

```
status = self.client.power_status()
```

Will return "POWERED OFF", "STANDBY or "ON"

### Get current state

```
status = self.client.get_current_state()
```

Will return an object such as below with current transport status information (`state` is the same as the previously returned single attribute):
```
{
    'CurrentTransportState':'PLAYING',
    'CurrentTransportStatus':'OK',
    'CurrentSpeed':'1',
    'state':'PLAYING'
}
```

### Get current state (JSON)

```
status = self.client.get_current_state().as_json()
```

Will return an object such as below with current transport status information (`state` is the same as the previously returned single attribute):
```
{
   "__type__":"__transportinfo__",
   "attributes":{
      "CurrentTransportState":"PLAYING",
      "CurrentTransportStatus":"OK",
      "CurrentSpeed":"1",
      "state":"PLAYING"
}
```

### Get the active application

```
app = self.client.get_active_application()
```

Will return an object such as below for the running application name:

```
{
   'appid':'com.bskyb.beehive',
   'title':'Beehive Bedlam'
}
```

### Get the active application (JSON)

```
app = self.client.get_active_application().as_json()
```

Will return a JSON structure such as below for the running application name:

```
{
   "__type__":"__app__",
   "attributes":{
      "appid":"com.bskyb.beehive",
      "title":"Beehive Bedlam"
   }
}
```

### Get current media

```
app = self.client.get_current_media()
```

Will return an object such as below for live programme:

```
{
   'channel':'Sky Comedy HD',
   'channelno':'153',
   'image_url':'https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb1143.png',
   'sid':1143,
   'pvrid':None,
   'live':True
}
```
or for recording

```
{
   'channel':None,
   'channelno':'None',
   'image_url':None,
   'sid':None,
   'pvrid':'P12345ABC'
   'live':False
}
```
### Get current media (JSON)

```
media = self.client.get_current_media().as_json()
```

Will return a JSON structure such as below for live programme:

```
{
   "__type__":"__media__",
   "attributes":{
      "channel":"BBC One South",
      "channelno":"101",
      "image_url":"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png",
      "sid":2153,
      "pvrid":null,
      "live":true
   }
}

```
or for recording

```
{
   "__type__":"__media__",
   "attributes":{
      "channel":null,
      "channelno":null,
      "image_url":null,
      "sid":null,
      "pvrid":"P12345ABC",
      "live":false
   }
}
```

### Decode current media (JSON)

```
from pyskyqremote.media import media_decoder
media = media_decoder(media_json)
```

Will decode the JSON structure to a python object.


### Get EPG information

```
epg = self.client.get_epg_data(sid, epgDate, days)
```

Will return an object with an array of events including the specified number of days. Defaults to 2 days.

```
{
   'sid':2153,
   'channelno':'101',
   'channelname':'BBC One South',
   'channelimage_url':'https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',
   'programmes':[
      {
         'progammeuuid':'57a11caf-1ebd-4c01-a40b-7fdfe5c5fad0',
         'starttime':datetime.datetime(2020,4,16,21,50,tzinfo=datetime.timezone.utc),
         'endtime':datetime.datetime(2020,4,16,22,50,tzinfo=datetime.timezone.utc),
         'title':'New: Tonight Show Starring. Jimmy Fallon',
         'season':7,
         'episode':119,
         'image_url':'https://images.metadata.sky.com/pd-image/57a11caf-1ebd-4c01-a40b-7fdfe5c5fad0/16-9',
         'channelname':'BBC One South',
         'status':'LIVE',
         'eid':'E4b8-19b'
      },
      {
         'progammeuuid':'d2d67048-673a-4ea8-8a32-3ad386e306d2',
         'starttime':datetime.datetime(2020,4,16,22,50,tzinfo=datetime.timezone.utc),
         'endtime':datetime.datetime(2020,4,16,23,50,tzinfo=datetime.timezone.utc),
         'title':'New: Late Late Show With...',
         'season':2020,
         'episode':89,
         'image_url':'https://images.metadata.sky.com/pd-image/d2d67048-673a-4ea8-8a32-3ad386e306d2/16-9',
         'channelname':'BBC One South',
         'status':'LIVE',
         'eid':'E4b8-19b'
      },
      {...}
   ]
}
```
### Get EPG information (JSON)

```
epg = self.client.get_epg_data(sid, epgDate, days).as_json()
```

Will return a JSON structure with an array of events including the specified number of days. Defaults to 2 days.

```
{
   "__type__":"__channel__",
   "attributes":{
      "sid":2153,
      "channelno":"101",
      "channelname":"BBC One South",
      "channelimage_url":"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png"
   },
   "programmes":[
      {
         "__type__":"__programme__",
         "attributes":{
            "programmeuuid":"62ad0457-1a6a-4b45-9ef7-6e144639d734",
            "starttime":"2020-04-27T21:45:00Z",
            "endtime":"2020-04-27T22:10:00Z",
            "title":"Man Like Mobeen",
            "season":3,
            "episode":5,
            "image_url":"https://images.metadata.sky.com/pd-image/62ad0457-1a6a-4b45-9ef7-6e144639d734/16-9",
            "channelname":"BBC One South",
            "status":"LIVE",
            "eid":"E4b8-19b"
        }
      },
      {
         "__type__":"__programme__",
         "attributes":{
            "programmeuuid":"a975bdeb-c19b-4de2-9557-c6d2757bdae7",
            "starttime":"2020-04-27T22:10:00Z",
            "endtime":"2020-04-27T22:50:00Z",
            "title":"Have I Got A Bit More News For You",
            "season":59,
            "episode":4,
            "image_url":"https://images.metadata.sky.com/pd-image/a975bdeb-c19b-4de2-9557-c6d2757bdae7/16-9",
            "channelname":"BBC One South"
            "status":"LIVE",
            "eid":"E4b8-19b"
         }
      },
      {...},
   ]
}
```

### Decode EPG information (JSON)

```
from pyskyqremote.channel import channel_decoder
channel = channel_decoder(channel_json)
```

Will decode the JSON structure to a python object.

### Get programme at a point in time on a day

Note that at the end of a day, the programme may appear on the next day's schedule.

```
programme = self.client.get_programme_from_epg(sid, epgDate, queryDate)
```

Will return an object such as below:

```
{
   'progammeuuid':'9fbdcefe-312c-4681-b996-00637e85313a',
   'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),
   'endtime':datetime.datetime(2020,4,17,9,0,tzinfo=datetime.timezone.utc),
   'title':'Parks And Recreation',
   'season':4,
   'episode':5,
   'image_url':'https://images.metadata.sky.com/pd-image/9fbdcefe-312c-4681-b996-00637e85313a/16-9',
   'channelname':'Channel 5 HD',
   'status':'LIVE',
   'eid':'E4b8-19b'
}
```
### Get programme at a point in time on a day (JSON)

Note that at the end of a day, the programme may appear on the next day's schedule.

```
programme = self.client.get_programme_from_epg(sid, epgDate, queryDate).as_json()
```

Will return a JSON structure such as below:

```
{
   "__type__":"__programme__",
   "attributes":{
      "programmeuuid":"e11d9e93-0eec-4855-88f5-6ade9946d5dd",
      "starttime":"2020-04-28T21:00:00Z",
      "endtime":"2020-04-28T21:30:00Z",
      "title":"BBC News at Ten",
      "season":null,
      "episode":null,
      "image_url":"https://images.metadata.sky.com/pd-image/e11d9e93-0eec-4855-88f5-6ade9946d5dd/16-9",
      "channelname":"BBC ONE HD",
      "status":"LIVE",
      "eid':"E4b8-19b"
   }
}
```
### Decode programme information (JSON)

```
from pyskyqremote.programme import programme_decoder
programme = programme_decoder(programmeJSON)
```

### Get current live TV programme on a channel

```
currentTV = self.client.get_current_live_tv_programme(sid)
```

Will return an object such as below:

```
{
   'progammeuuid':'9fbdcefe-312c-4681-b996-00637e85313a',
   'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),
   'endtime':datetime.datetime(2020,4,17,9,0,tzinfo=datetime.timezone.utc),
   'title':'Parks And Recreation',
   'season':4,
   'episode':5,
   'image_url':'https://images.metadata.sky.com/pd-image/9fbdcefe-312c-4681-b996-00637e85313a/16-9',
   'channelname':'Channel 5 HD',
   'status':'LIVE',
   'eid':'E4b8-19b'
}
```
### Get current live TV programme on a channel (JSON)

```
currentTV = self.client.get_current_live_tv_programme(sid).as_json()
```

Will return a JSON structure such as below:

```
{
   "__type__":"__programme__",
   "attributes":{
      "programmeuuid":"e11d9e93-0eec-4855-88f5-6ade9946d5dd",
      "starttime":"2020-04-28T21:00:00Z",
      "endtime":"2020-04-28T21:30:00Z",
      "title":"BBC News at Ten",
      "season":null,
      "episode":null,
      "image_url":"https://images.metadata.sky.com/pd-image/e11d9e93-0eec-4855-88f5-6ade9946d5dd/16-9",
      "channelname":"BBC ONE HD",
      "status":"LIVE",
      "eid":"E4b8-19b"
  }
}
```

### Get recordings

```
recordings = self.client.get_recordings(<status="all">, <limit=1000>, <offset=0>)
```

Will return an object such as below for the number of recordings specified by limit with the specified offset and with the provided status:

```
{
   'programmes':[
      {
        'programmeuuid':'54bfc205-c56e-4583-b03f-59c31f97f8c7',
        'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),
        'endtime':datetime.datetime(2020,4,17,9,30,tzinfo=datetime.timezone.utc),
        'title':'New: Batwoman',
        'summary': 'Lorum ipsum...',
        'season':1,
        'episode':19,
        'image_url':'https://images.metadata.sky.com/pd-image/54bfc205-c56e-4583-b03f-59c31f97f8c7/16-9',
        'channelname':'E4 HD',
        'status':'RECORDED',
        'deletetime': '2020-09-02T20:00:59Z',
        'failurereason': None,
        'source': 'LIVE',
        'pvrid':'P29014192',
        'eid':'E869-67b1',
      },
      {
        'programmeuuid':'af9ecd2c-5026-4050-9c15-37598fe26713',
        'starttime':null,
        'endtime':'null,
        'title':'Home and Away',
        'summary': 'Lorum ipsum...',
        'season':35,
        'episode':4,
        'image_url':'https://images.metadata.sky.com/pd-image/af9ecd2c-5026-4050-9c15-37598fe26713/16-9',
        'channelname':'Channel 5 HD',
        'status':'SCHEDULED',
        'deletetime': None,
        'failurereason': None,
        'source': 'LIVE',
        'pvrid':'P29014192',
        'eid':'E869-67b1'
      },
      {
        'programmeuuid':'575736fd-0719-4249-88cc-babd6e232bfa',
        'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),
        'endtime':datetime.datetime(2020,4,17,9,30,tzinfo=datetime.timezone.utc),
        'title':'Lorraine',
        'summary': 'Lorum ipsum...',
        'season':35,
        'episode':4,
        'image_url':'https://images.metadata.sky.com/pd-image/575736fd-0719-4249-88cc-babd6e232bfa/16-9',
        'channelname':'ITV HD',
        'status':'PART REC',
        'deletetime': None,
        'failurereason': 'Start Missed',
        'source': 'VOD',
        'pvrid':'P29014192',
        'eid':'E869-67b1'
      },
      {…}
      }
   ]
}
```

### Get recordings (JSON)

```
recordings = self.client.get_recordings(<status="all">, <limit=1000>, <offset=0>).as_json()
```

Will return an object such as below for the number of recordings specified by limit with the specified offset and with the provided status:

```
{
   "__type__":"__recordings__",
   "attributes":{

   },
   "recordings":[
      {
         "__type__":"__recording__",
         "attributes":{
            "programmeuuid":"54bfc205-c56e-4583-b03f-59c31f97f8c7",
            "starttime":"2020-08-02T19:58:00Z",
            "endtime":"2020-08-02T21:01:59Z",
            "title":"New: Batwoman",
            "summary":"Lorum ipsum...",
            "season":1,
            "episode":19,
            "image_url":"https://images.metadata.sky.com/pd-image/54bfc205-c56e-4583-b03f-59c31f97f8c7/16-9",
            "channelname":"E4 HD",
            "status":"RECORDED",
            "deletetime":"2020-09-02T20:00:59Z",
            "failurereason":"null",
            "source":"LIVE",
            "pvrid":"P29014192",
            "eid":"E869-67b1"
        }
      },
      {
         "__type__":"__recording__",
         "attributes":{
            "programmeuuid":"af9ecd2c-5026-4050-9c15-37598fe26713",
            "starttime":"null",
            "endtime":"null",
            "title":"Home and Away",
            "summary":"Lorum ipsum...",
            "season":35,
            "episode":4,
            "image_url":"https://images.metadata.sky.com/pd-image/af9ecd2c-5026-4050-9c15-37598fe26713/16-9",
            "channelname":"Channel 5 HD",
            "status":"SCHEDULED",
            "deletetime":"null",
            "failurereason":"null",
            "source":"LIVE",
            "pvrid":"P29014192",
            "eid":"E869-67b1"
     },
     {
        "__type__":"__recording__",
        "attributes":{
           "programmeuuid":"af9ecd2c-5026-4050-9c15-37598fe26713",
           "starttime":"2020-08-02T19:58:00Z",
           "endtime":"2020-08-02T21:01:59Z",
           "title":"Home and Away",
           "summary":"Lorum ipsum...",
           "season":35,
           "episode":4,
           "image_url":"https://images.metadata.sky.com/pd-image/af9ecd2c-5026-4050-9c15-37598fe26713/16-9",
           "channelname":"Channel 5 HD",
           "status":"PART REC",
           "deletetime":"null",
           "failurereason":"Start Missed",
           "source":"VOD",
           "pvrid":"P29014192",
           "eid":"E869-67b1"
    },
      {...}
      }
   ]
}
```

### Get recording

```
recording = self.client.getRecording(pvrid)
```

Will return an object such as below:

```
{
   'progammeuuid':'9fbdcefe-312c-4681-b996-00637e85313a',
   'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),
   'endtime':datetime.datetime(2020,4,17,9,0,tzinfo=datetime.timezone.utc),
   'channelname':'ITV HD',
   'title':'Van Der Valk',
   'season':4,
   'episode':5,
   'image_url':'https://images.metadata.sky.com/pd-image/ddcd727f-487f-4558-8365-7bed4fe41c87/16-9',
   'status':'RECORDED',
   'deletetime': None,
   'failurereason': None,
   'pvrid':'P29014192',
   'eid':'E869-67b1'
}
```
### Get recording (JSON)

```
recording = self.client.getRecording(pvrid).as_json()
```

Will return an object such as below:

```
{
   "__type__":"__recording__",
   "attributes":{
      "programmeuuid":"e11d9e93-0eec-4855-88f5-6ade9946d5dd",
      "starttime":"2020-04-28T21:00:00Z",
      "endtime":"2020-04-28T21:30:00Z",
      "channelname":"ITV HD",
      "title":"BBC News at Ten",
      "season":null,
      "episode":null,
      "image_url":"https://images.metadata.sky.com/pd-image/e11d9e93-0eec-4855-88f5-6ade9946d5dd/16-9",
      "status":"RECORDED",
      "deletetime": null,
      "failurereason": null,
      "pvrid":"P29014192",
      "eid":"E869-67b1"
   }
}
```
### Decode recording information (JSON)

```
from pyskyqremote.programme import recorded_programme_decoder
recording = recorded_programme_decoder(recording_json)
```

### Get quota

```
quota = self.client.get_quota()
```

Will return an object such as below:

```
{
   'quotamax':1604285,
   'quotaused':171083
}
```
### Get quota (JSON)

```
recording = self.client.get_quota().as_json()
```

Will return an object such as below:

```
{
   "__type__":"__quota__",
   "attributes":{
     "quotaMax":1604285,
     "quotaUsed":171083
   }
}
```

### Book Recording

```
response = self.client.book_recording(eid, <series=False>)
```


Will return True for success or False for failure. Set series to True for series link or False for no series link.

### Book PPV Recording

```
response = self.client.book_ppv_recording(eid, offerref)
```


Will return True for success or False for failure.

### Series Link Recording

```
response = self.client.series_link(pvrid, <linkon=True>)
```

Will return True for success or False for failure. Set on to True for linking, False for unlinking.

### Keep Recording

```
response = self.client.recording_keep(pvrid, <keepon=True>)
```

Will return True for success or False for failure. Set on to True to keep, False to unkeep.

### Lock Recording

```
response = self.client.recording_lock(pvrid, <lockon=True>)
```

Will return True for success or False for failure. Set on to True to lock, False to unlock.

### Delete Recording (or scheduled recording)

```
response = self.client.recording_delete(pvrid, <deleteon=True>)
```

Will return True for success or False for failure. Set on to True to delete, False to undelete. Cannot undelete scheduled recording.

### Erase Recording

```
response = self.client.recording_erase(pvrid)
```

Will return True for success or False for failure.

### Erase all Recordings including scheduled recordings

```
response = self.client.recording_erase_all()
```

Will return True for success or False for failure.

### Set Last Played Position

```
response = self.client.recording_set_last_played_position(pvrid, pos)
```

Will return True for success or False for failure. Only works on the main Sky Q box.

### Get Channel List

```
channelList = self.client.get_channel_list()
```

Will return an object with an array of channels.

```
{
   'channels':[
      {
         'channelno':'101',
         'channelname':'BBC ONE',
         'channelsid'='2153',
         'channelimage_url'='https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',
         'channeltype':'video',
         'channelnoint':101,
         'sf':'sd'
      },
      {
         'channelno':'0102',
         'channelname':'BBC R2',
         'channelsid'='2153',
         'channelimage_url'='https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',
         'channeltype':'audio',
         'channelnoint':102,
         'sf':'au'
      },
      {...}
   ]
}
```
### Get Channel List (JSON)

```
channelList = self.client.get_channel_list().as_json()
```

Will return a JSON structure with an array of channels.

```
{
   "__type__":"__channellist__",
   "attributes":{
   },
   "channels":[
      {
         "__type__":"__channel__",
         "attributes":{
            "channelno":"101",
            "channelname":"BBC ONE",
            "channelsid":"2153",
            "channelimage_url":"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png",
            "channeltype":"video",
            "channelnoint":101,
            "sf":"sd"
         }
      },
      {
         "__type__":"__channel__",
         "attributes":{
            "channelno":"0102",
            "channelname":"BBC R2",
            "channelsid":"2153",
            "channelimage_url":"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png",
            "channeltype":"audio",
            "channelnoint":102,
            "sf":"au"
         }
      },
      {...},
   ]
}
```

### Get Channel Information (for a specific channel number)

```
channelInfo = self.client.get_channel_info(channel_no)
```

Will return an object such as below:

```
{
   'channelno'='101',
   'channelname'='BBC One South',
   'channelsid'='2153',
   'channelimage_url'='https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',
   'channeltype'='video',
   'channelnoint'=101,
   'sf'='sd'
}
```
### Get Channel Information (for a specific channel number) (JSON)

```
channelInfo = self.client.get_channel_info(channel_no).as_json()
```

Will return an object such as below:

```
{
   "__type__":"__channel__",
   "attributes":{
      "channelno":"101",
      "channelname":"BBC One South",
      "channelsid":"2153",
      "channelimage_url":"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png",
      "channeltype":"video",
      "channelnoint":101,
      "sf":"sd"
   }
}
```

### Get Favourite List

```
favouriteList = self.client.get_favourite_list()
```

Will return an object with an array of favourites.

```
{
   'favourites':[
      {
         'lcn': 1,
         'channelno':'101',
         'channelname':'BBC ONE',
         'sid'='2153'
      },
      {
         'lcn': 2,
         'channelno':'0102',
         'channelname':'BBC R2',
         'sid'='2153'
      },
      {...}
   ]
}
```
### Get Favorite List (JSON)

```
favouriteList = self.client.get_favourite_list().as_json()
```

Will return a JSON structure with an array of channels.

```
{
   "__type__":"__favouritelist__",
   "attributes":{
   },
   "favourites":[
      {
         "__type__":"__favourite__",
         "attributes":{
            "lcn": 1,
            "channelno":"101",
            "channelname":"BBC ONE",
            "sid":"2153"
         }
      },
      {
         "__type__":"__favourite__",
         "attributes":{
            "lcn": 2,
            "channelno":"0102",
            "channelname":"BBC R2",
            "sid":"2153"
         }
      },
      {...},
   ]
}
```

### Decode EPG information (JSON)

```
from pyskyqremote.channel import ChannelDecoder
channel = ChannelDecoder(channelJSON)
```

Will decode the JSON structure to a python object.

### Send key press

```
self.client.press(sequence)
```

Allows the sending of a sequence of key presses which are submitted at 1/2 second intervals

Valid values are:
```
power
select
backup
dismiss
channelup
channeldown
interactive
sidebar
help
services
search
tvguide
home
i
text
up
down
left
right
red
green
yellow
blue
0
1
2
3
4
5
6
7
8
9,
play
pause
stop
record
fastforward
rewind
boxoffice
sky
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RogerSelwyn/skyq_remote",
    "name": "pyskyqremote",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "SKYQ Remote",
    "author": "Roger Selwyn",
    "author_email": "roger.selwyn@nomail.com",
    "download_url": "https://files.pythonhosted.org/packages/57/da/7fe5956a3ca7efbbc6213b242488ed1d84da3e6e6ed4bc5e8f6ab34475f4/pyskyqremote-0.3.25.tar.gz",
    "platform": null,
    "description": "[![CodeFactor](https://www.codefactor.io/repository/github/rogerselwyn/skyq_remote/badge)](https://www.codefactor.io/repository/github/rogerselwyn/skyq_remote)\n\n![GitHub release](https://img.shields.io/github/v/release/RogerSelwyn/skyq_remote) [![maintained](https://img.shields.io/maintenance/yes/2023.svg)](#)\n[![maintainer](https://img.shields.io/badge/maintainer-%20%40RogerSelwyn-blue.svg)](https://github.com/RogerSelwyn)\n[![Community Forum](https://img.shields.io/badge/community-forum-brightgreen.svg)](https://community.home-assistant.io/t/custom-component-skyq-media-player/140306)\n\n# pyskyqremote\nPython module for accessing SkyQ box and EPG, and sending commands\n\n## Introduction\n\nThis library enables access to SkyQ devices, primarily focused on the UK, but should also work for Italy and Germany.\n\n## Installing\n\nTo install:\n\n```\npip install pyskyqremote\n```\n\n## Usage\n\n### Base\n```\nfrom pyskyqremote.skyq_remote import SkyQRemote\n\nself.client = SkyQRemote('192.168.1.99')\n```\nOptional parameters:\n* epg_cache_len - Default = 20\n* port - Default = 49160\n* json_port - Default = 9006\n\n\n### Get device information\n\n```\ndevice = self.client.get_device_information()\n```\n\nWill return an object such as below for device informatiom:\n\n```\n{\n\u00a0\u00a0\u00a0'ASVersion':'Q112.000.21.00-AS_asdev',\n\u00a0\u00a0\u00a0'IPAddress':'192.168.1.22',\n\u00a0\u00a0\u00a0'countryCode':'GBR',\n\u00a0\u00a0\u00a0'usedCountryCode':'GBR',\n\u00a0\u00a0\u00a0'hardwareModel':'ES240',\n\u00a0\u00a0\u00a0'hardwareName':'Falcon',\n   'deviceType': 'GATEWAYSTB',\n   'gateway': true,\n   'gatewayIPAddress': '192.168.1.20',\n \u00a0\u00a0'manufacturer':'Sky',\n\u00a0\u00a0\u00a0'modelNumber':'Q112.000.21.00L\u00a0(53wk8j8)',\n\u00a0\u00a0\u00a0'serialNumber':'0627086857\u00a02',\n\u00a0\u00a0\u00a0'versionNumber':'32B12D',\n   'bouquet': 4101,\n   'subbouquet': 9,\n   'wakeReason': 'ECO',\n   'systemUptime': 28346,\n   'hdrCapable': true,\n   'uhdCapable': true,\n   'presentLocalTimeOffset': 3600,\n   'utc': 1660486276,\n   'futureLocalTimeOffset': 0,\n   'futureTransitionUtc': 1667091599\n}\n```\n\n### Get device information (JSON)\n\n```\ndevice = self.client.get_device_information().as_json()\n```\n\nWill return a JSON structure such as below for device information:\n\n```\n{\n   \"__type__\":\"__device__\",\n   \"attributes\":{\n      \"ASVersion\":\"Q112.000.21.00-AS_asdev\",\n      \"IPAddress\":\"192.168.x.xx\",\n      \"countryCode\":\"GBR\",\n      \"usedCountryCode\":\"GBR\",\n      \"hardwareModel\":\"ES240\",\n      \"hardwareName\":\"Falcon\",\n      \"deviceType\": \"GATEWAYSTB\",\n      \"gateway\": true,\n      \"gatewayIPAddress\": \"192.168.1.20\",\n      \"manufacturer\":\"Sky\",\n      \"modelNumber\":\"Q112.000.21.00L (53wk8j8)\",\n      \"serialNumber\":\"##########\",\n      \"versionNumber\":\"32B12D\",\n      \"bouquet\": 4101,\n      \"subbouquet\": 9,\n      \"wakeReason\": \"ECO\",\n      \"systemUptime\": 28346,\n      \"hdrCapable\": true,\n      \"uhdCapable\": true,\n      \"presentLocalTimeOffset\": 3600,\n      \"utc\": 1660486276,\n      \"futureLocalTimeOffset\": 0,\n      \"futureTransitionUtc\": 1667091599\n   }\n}\n\n```\n\n### Decode device information (JSON)\n\n```\nfrom pyskyqremote.media import device_decoder\ndevice = device_decoder(device_json)\n```\n\nWill decode the JSON structure to a python object.\n\n\n### Get power status\n\n```\nstatus = self.client.power_status()\n```\n\nWill return \"POWERED OFF\", \"STANDBY or \"ON\"\n\n### Get current state\n\n```\nstatus = self.client.get_current_state()\n```\n\nWill return an object such as below with current transport status information (`state` is the same as the previously returned single attribute):\n```\n{\n    'CurrentTransportState':'PLAYING',\n    'CurrentTransportStatus':'OK',\n    'CurrentSpeed':'1',\n    'state':'PLAYING'\n}\n```\n\n### Get current state (JSON)\n\n```\nstatus = self.client.get_current_state().as_json()\n```\n\nWill return an object such as below with current transport status information (`state` is the same as the previously returned single attribute):\n```\n{\n   \"__type__\":\"__transportinfo__\",\n   \"attributes\":{\n      \"CurrentTransportState\":\"PLAYING\",\n      \"CurrentTransportStatus\":\"OK\",\n      \"CurrentSpeed\":\"1\",\n      \"state\":\"PLAYING\"\n}\n```\n\n### Get the active application\n\n```\napp = self.client.get_active_application()\n```\n\nWill return an object such as below for the running application name:\n\n```\n{\n   'appid':'com.bskyb.beehive',\n   'title':'Beehive Bedlam'\n}\n```\n\n### Get the active application (JSON)\n\n```\napp = self.client.get_active_application().as_json()\n```\n\nWill return a JSON structure such as below for the running application name:\n\n```\n{\n   \"__type__\":\"__app__\",\n   \"attributes\":{\n      \"appid\":\"com.bskyb.beehive\",\n      \"title\":\"Beehive Bedlam\"\n   }\n}\n```\n\n### Get current media\n\n```\napp = self.client.get_current_media()\n```\n\nWill return an object such as below for live programme:\n\n```\n{\n   'channel':'Sky Comedy HD',\n   'channelno':'153',\n   'image_url':'https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb1143.png',\n   'sid':1143,\n   'pvrid':None,\n   'live':True\n}\n```\nor for recording\n\n```\n{\n   'channel':None,\n   'channelno':'None',\n   'image_url':None,\n   'sid':None,\n   'pvrid':'P12345ABC'\n   'live':False\n}\n```\n### Get current media (JSON)\n\n```\nmedia = self.client.get_current_media().as_json()\n```\n\nWill return a JSON structure such as below for live programme:\n\n```\n{\n   \"__type__\":\"__media__\",\n   \"attributes\":{\n      \"channel\":\"BBC One South\",\n      \"channelno\":\"101\",\n      \"image_url\":\"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png\",\n      \"sid\":2153,\n      \"pvrid\":null,\n      \"live\":true\n   }\n}\n\n```\nor for recording\n\n```\n{\n   \"__type__\":\"__media__\",\n   \"attributes\":{\n      \"channel\":null,\n      \"channelno\":null,\n      \"image_url\":null,\n      \"sid\":null,\n      \"pvrid\":\"P12345ABC\",\n      \"live\":false\n   }\n}\n```\n\n### Decode current media (JSON)\n\n```\nfrom pyskyqremote.media import media_decoder\nmedia = media_decoder(media_json)\n```\n\nWill decode the JSON structure to a python object.\n\n\n### Get EPG information\n\n```\nepg = self.client.get_epg_data(sid, epgDate, days)\n```\n\nWill return an object with an array of events including the specified number of days. Defaults to 2 days.\n\n```\n{\n   'sid':2153,\n   'channelno':'101',\n   'channelname':'BBC One South',\n   'channelimage_url':'https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',\n   'programmes':[\n      {\n         'progammeuuid':'57a11caf-1ebd-4c01-a40b-7fdfe5c5fad0',\n         'starttime':datetime.datetime(2020,4,16,21,50,tzinfo=datetime.timezone.utc),\n         'endtime':datetime.datetime(2020,4,16,22,50,tzinfo=datetime.timezone.utc),\n         'title':'New: Tonight Show Starring. Jimmy Fallon',\n         'season':7,\n         'episode':119,\n         'image_url':'https://images.metadata.sky.com/pd-image/57a11caf-1ebd-4c01-a40b-7fdfe5c5fad0/16-9',\n         'channelname':'BBC One South',\n         'status':'LIVE',\n         'eid':'E4b8-19b'\n      },\n      {\n         'progammeuuid':'d2d67048-673a-4ea8-8a32-3ad386e306d2',\n         'starttime':datetime.datetime(2020,4,16,22,50,tzinfo=datetime.timezone.utc),\n         'endtime':datetime.datetime(2020,4,16,23,50,tzinfo=datetime.timezone.utc),\n         'title':'New: Late Late Show With...',\n         'season':2020,\n         'episode':89,\n         'image_url':'https://images.metadata.sky.com/pd-image/d2d67048-673a-4ea8-8a32-3ad386e306d2/16-9',\n         'channelname':'BBC One South',\n         'status':'LIVE',\n         'eid':'E4b8-19b'\n      },\n      {...}\n   ]\n}\n```\n### Get EPG information (JSON)\n\n```\nepg = self.client.get_epg_data(sid, epgDate, days).as_json()\n```\n\nWill return a JSON structure with an array of events including the specified number of days. Defaults to 2 days.\n\n```\n{\n   \"__type__\":\"__channel__\",\n   \"attributes\":{\n      \"sid\":2153,\n      \"channelno\":\"101\",\n      \"channelname\":\"BBC One South\",\n      \"channelimage_url\":\"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png\"\n   },\n   \"programmes\":[\n      {\n         \"__type__\":\"__programme__\",\n         \"attributes\":{\n            \"programmeuuid\":\"62ad0457-1a6a-4b45-9ef7-6e144639d734\",\n            \"starttime\":\"2020-04-27T21:45:00Z\",\n            \"endtime\":\"2020-04-27T22:10:00Z\",\n            \"title\":\"Man Like Mobeen\",\n            \"season\":3,\n            \"episode\":5,\n            \"image_url\":\"https://images.metadata.sky.com/pd-image/62ad0457-1a6a-4b45-9ef7-6e144639d734/16-9\",\n            \"channelname\":\"BBC One South\",\n            \"status\":\"LIVE\",\n            \"eid\":\"E4b8-19b\"\n        }\n      },\n      {\n         \"__type__\":\"__programme__\",\n         \"attributes\":{\n            \"programmeuuid\":\"a975bdeb-c19b-4de2-9557-c6d2757bdae7\",\n            \"starttime\":\"2020-04-27T22:10:00Z\",\n            \"endtime\":\"2020-04-27T22:50:00Z\",\n            \"title\":\"Have I Got A Bit More News For You\",\n            \"season\":59,\n            \"episode\":4,\n            \"image_url\":\"https://images.metadata.sky.com/pd-image/a975bdeb-c19b-4de2-9557-c6d2757bdae7/16-9\",\n            \"channelname\":\"BBC One South\"\n            \"status\":\"LIVE\",\n            \"eid\":\"E4b8-19b\"\n         }\n      },\n      {...},\n   ]\n}\n```\n\n### Decode EPG information (JSON)\n\n```\nfrom pyskyqremote.channel import channel_decoder\nchannel = channel_decoder(channel_json)\n```\n\nWill decode the JSON structure to a python object.\n\n### Get programme at a point in time on a day\n\nNote that at the end of a day, the programme may appear on the next day's schedule.\n\n```\nprogramme = self.client.get_programme_from_epg(sid, epgDate, queryDate)\n```\n\nWill return an object such as below:\n\n```\n{\n   'progammeuuid':'9fbdcefe-312c-4681-b996-00637e85313a',\n   'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),\n   'endtime':datetime.datetime(2020,4,17,9,0,tzinfo=datetime.timezone.utc),\n   'title':'Parks And Recreation',\n   'season':4,\n   'episode':5,\n   'image_url':'https://images.metadata.sky.com/pd-image/9fbdcefe-312c-4681-b996-00637e85313a/16-9',\n   'channelname':'Channel 5 HD',\n   'status':'LIVE',\n   'eid':'E4b8-19b'\n}\n```\n### Get programme at a point in time on a day (JSON)\n\nNote that at the end of a day, the programme may appear on the next day's schedule.\n\n```\nprogramme = self.client.get_programme_from_epg(sid, epgDate, queryDate).as_json()\n```\n\nWill return a JSON structure such as below:\n\n```\n{\n   \"__type__\":\"__programme__\",\n   \"attributes\":{\n      \"programmeuuid\":\"e11d9e93-0eec-4855-88f5-6ade9946d5dd\",\n      \"starttime\":\"2020-04-28T21:00:00Z\",\n      \"endtime\":\"2020-04-28T21:30:00Z\",\n      \"title\":\"BBC News at Ten\",\n      \"season\":null,\n      \"episode\":null,\n      \"image_url\":\"https://images.metadata.sky.com/pd-image/e11d9e93-0eec-4855-88f5-6ade9946d5dd/16-9\",\n      \"channelname\":\"BBC ONE HD\",\n      \"status\":\"LIVE\",\n      \"eid':\"E4b8-19b\"\n   }\n}\n```\n### Decode programme information (JSON)\n\n```\nfrom pyskyqremote.programme import programme_decoder\nprogramme = programme_decoder(programmeJSON)\n```\n\n### Get current live TV programme on a channel\n\n```\ncurrentTV = self.client.get_current_live_tv_programme(sid)\n```\n\nWill return an object such as below:\n\n```\n{\n   'progammeuuid':'9fbdcefe-312c-4681-b996-00637e85313a',\n   'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),\n   'endtime':datetime.datetime(2020,4,17,9,0,tzinfo=datetime.timezone.utc),\n   'title':'Parks And Recreation',\n   'season':4,\n   'episode':5,\n   'image_url':'https://images.metadata.sky.com/pd-image/9fbdcefe-312c-4681-b996-00637e85313a/16-9',\n   'channelname':'Channel 5 HD',\n   'status':'LIVE',\n   'eid':'E4b8-19b'\n}\n```\n### Get current live TV programme on a channel (JSON)\n\n```\ncurrentTV = self.client.get_current_live_tv_programme(sid).as_json()\n```\n\nWill return a JSON structure such as below:\n\n```\n{\n   \"__type__\":\"__programme__\",\n   \"attributes\":{\n      \"programmeuuid\":\"e11d9e93-0eec-4855-88f5-6ade9946d5dd\",\n      \"starttime\":\"2020-04-28T21:00:00Z\",\n      \"endtime\":\"2020-04-28T21:30:00Z\",\n      \"title\":\"BBC News at Ten\",\n      \"season\":null,\n      \"episode\":null,\n      \"image_url\":\"https://images.metadata.sky.com/pd-image/e11d9e93-0eec-4855-88f5-6ade9946d5dd/16-9\",\n      \"channelname\":\"BBC ONE HD\",\n      \"status\":\"LIVE\",\n      \"eid\":\"E4b8-19b\"\n  }\n}\n```\n\n### Get recordings\n\n```\nrecordings = self.client.get_recordings(<status=\"all\">, <limit=1000>, <offset=0>)\n```\n\nWill return an object such as below for the number of recordings specified by limit with the specified offset and with the provided status:\n\n```\n{\n   'programmes':[\n      {\n        'programmeuuid':'54bfc205-c56e-4583-b03f-59c31f97f8c7',\n        'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),\n        'endtime':datetime.datetime(2020,4,17,9,30,tzinfo=datetime.timezone.utc),\n        'title':'New: Batwoman',\n        'summary': 'Lorum ipsum...',\n        'season':1,\n        'episode':19,\n        'image_url':'https://images.metadata.sky.com/pd-image/54bfc205-c56e-4583-b03f-59c31f97f8c7/16-9',\n        'channelname':'E4 HD',\n        'status':'RECORDED',\n        'deletetime': '2020-09-02T20:00:59Z',\n        'failurereason': None,\n        'source': 'LIVE',\n        'pvrid':'P29014192',\n        'eid':'E869-67b1',\n      },\n      {\n        'programmeuuid':'af9ecd2c-5026-4050-9c15-37598fe26713',\n        'starttime':null,\n        'endtime':'null,\n        'title':'Home and Away',\n        'summary': 'Lorum ipsum...',\n        'season':35,\n        'episode':4,\n        'image_url':'https://images.metadata.sky.com/pd-image/af9ecd2c-5026-4050-9c15-37598fe26713/16-9',\n        'channelname':'Channel 5 HD',\n        'status':'SCHEDULED',\n        'deletetime': None,\n        'failurereason': None,\n        'source': 'LIVE',\n        'pvrid':'P29014192',\n        'eid':'E869-67b1'\n      },\n      {\n        'programmeuuid':'575736fd-0719-4249-88cc-babd6e232bfa',\n        'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),\n        'endtime':datetime.datetime(2020,4,17,9,30,tzinfo=datetime.timezone.utc),\n        'title':'Lorraine',\n        'summary': 'Lorum ipsum...',\n        'season':35,\n        'episode':4,\n        'image_url':'https://images.metadata.sky.com/pd-image/575736fd-0719-4249-88cc-babd6e232bfa/16-9',\n        'channelname':'ITV HD',\n        'status':'PART REC',\n        'deletetime': None,\n        'failurereason': 'Start Missed',\n        'source': 'VOD',\n        'pvrid':'P29014192',\n        'eid':'E869-67b1'\n      },\n      {\u2026}\n      }\n   ]\n}\n```\n\n### Get recordings (JSON)\n\n```\nrecordings = self.client.get_recordings(<status=\"all\">, <limit=1000>, <offset=0>).as_json()\n```\n\nWill return an object such as below for the number of recordings specified by limit with the specified offset and with the provided status:\n\n```\n{\n   \"__type__\":\"__recordings__\",\n   \"attributes\":{\n\n   },\n   \"recordings\":[\n      {\n         \"__type__\":\"__recording__\",\n         \"attributes\":{\n            \"programmeuuid\":\"54bfc205-c56e-4583-b03f-59c31f97f8c7\",\n            \"starttime\":\"2020-08-02T19:58:00Z\",\n            \"endtime\":\"2020-08-02T21:01:59Z\",\n            \"title\":\"New: Batwoman\",\n            \"summary\":\"Lorum ipsum...\",\n            \"season\":1,\n            \"episode\":19,\n            \"image_url\":\"https://images.metadata.sky.com/pd-image/54bfc205-c56e-4583-b03f-59c31f97f8c7/16-9\",\n            \"channelname\":\"E4 HD\",\n            \"status\":\"RECORDED\",\n            \"deletetime\":\"2020-09-02T20:00:59Z\",\n            \"failurereason\":\"null\",\n            \"source\":\"LIVE\",\n            \"pvrid\":\"P29014192\",\n            \"eid\":\"E869-67b1\"\n        }\n      },\n      {\n         \"__type__\":\"__recording__\",\n         \"attributes\":{\n            \"programmeuuid\":\"af9ecd2c-5026-4050-9c15-37598fe26713\",\n            \"starttime\":\"null\",\n            \"endtime\":\"null\",\n            \"title\":\"Home and Away\",\n            \"summary\":\"Lorum ipsum...\",\n            \"season\":35,\n            \"episode\":4,\n            \"image_url\":\"https://images.metadata.sky.com/pd-image/af9ecd2c-5026-4050-9c15-37598fe26713/16-9\",\n            \"channelname\":\"Channel 5 HD\",\n            \"status\":\"SCHEDULED\",\n            \"deletetime\":\"null\",\n            \"failurereason\":\"null\",\n            \"source\":\"LIVE\",\n            \"pvrid\":\"P29014192\",\n            \"eid\":\"E869-67b1\"\n     },\n     {\n        \"__type__\":\"__recording__\",\n        \"attributes\":{\n           \"programmeuuid\":\"af9ecd2c-5026-4050-9c15-37598fe26713\",\n           \"starttime\":\"2020-08-02T19:58:00Z\",\n           \"endtime\":\"2020-08-02T21:01:59Z\",\n           \"title\":\"Home and Away\",\n           \"summary\":\"Lorum ipsum...\",\n           \"season\":35,\n           \"episode\":4,\n           \"image_url\":\"https://images.metadata.sky.com/pd-image/af9ecd2c-5026-4050-9c15-37598fe26713/16-9\",\n           \"channelname\":\"Channel 5 HD\",\n           \"status\":\"PART REC\",\n           \"deletetime\":\"null\",\n           \"failurereason\":\"Start Missed\",\n           \"source\":\"VOD\",\n           \"pvrid\":\"P29014192\",\n           \"eid\":\"E869-67b1\"\n    },\n      {...}\n      }\n   ]\n}\n```\n\n### Get recording\n\n```\nrecording = self.client.getRecording(pvrid)\n```\n\nWill return an object such as below:\n\n```\n{\n   'progammeuuid':'9fbdcefe-312c-4681-b996-00637e85313a',\n   'starttime':datetime.datetime(2020,4,17,8,30,tzinfo=datetime.timezone.utc),\n   'endtime':datetime.datetime(2020,4,17,9,0,tzinfo=datetime.timezone.utc),\n   'channelname':'ITV HD',\n   'title':'Van Der Valk',\n   'season':4,\n   'episode':5,\n   'image_url':'https://images.metadata.sky.com/pd-image/ddcd727f-487f-4558-8365-7bed4fe41c87/16-9',\n   'status':'RECORDED',\n   'deletetime': None,\n   'failurereason': None,\n   'pvrid':'P29014192',\n   'eid':'E869-67b1'\n}\n```\n### Get recording (JSON)\n\n```\nrecording = self.client.getRecording(pvrid).as_json()\n```\n\nWill return an object such as below:\n\n```\n{\n   \"__type__\":\"__recording__\",\n   \"attributes\":{\n      \"programmeuuid\":\"e11d9e93-0eec-4855-88f5-6ade9946d5dd\",\n      \"starttime\":\"2020-04-28T21:00:00Z\",\n      \"endtime\":\"2020-04-28T21:30:00Z\",\n      \"channelname\":\"ITV HD\",\n      \"title\":\"BBC News at Ten\",\n      \"season\":null,\n      \"episode\":null,\n      \"image_url\":\"https://images.metadata.sky.com/pd-image/e11d9e93-0eec-4855-88f5-6ade9946d5dd/16-9\",\n      \"status\":\"RECORDED\",\n      \"deletetime\": null,\n      \"failurereason\": null,\n      \"pvrid\":\"P29014192\",\n      \"eid\":\"E869-67b1\"\n   }\n}\n```\n### Decode recording information (JSON)\n\n```\nfrom pyskyqremote.programme import recorded_programme_decoder\nrecording = recorded_programme_decoder(recording_json)\n```\n\n### Get quota\n\n```\nquota = self.client.get_quota()\n```\n\nWill return an object such as below:\n\n```\n{\n   'quotamax':1604285,\n   'quotaused':171083\n}\n```\n### Get quota (JSON)\n\n```\nrecording = self.client.get_quota().as_json()\n```\n\nWill return an object such as below:\n\n```\n{\n   \"__type__\":\"__quota__\",\n   \"attributes\":{\n     \"quotaMax\":1604285,\n     \"quotaUsed\":171083\n   }\n}\n```\n\n### Book Recording\n\n```\nresponse = self.client.book_recording(eid, <series=False>)\n```\n\n\nWill return True for success or False for failure. Set series to True for series link or False for no series link.\n\n### Book PPV Recording\n\n```\nresponse = self.client.book_ppv_recording(eid, offerref)\n```\n\n\nWill return True for success or False for failure.\n\n### Series Link Recording\n\n```\nresponse = self.client.series_link(pvrid, <linkon=True>)\n```\n\nWill return True for success or False for failure. Set on to True for linking, False for unlinking.\n\n### Keep Recording\n\n```\nresponse = self.client.recording_keep(pvrid, <keepon=True>)\n```\n\nWill return True for success or False for failure. Set on to True to keep, False to unkeep.\n\n### Lock Recording\n\n```\nresponse = self.client.recording_lock(pvrid, <lockon=True>)\n```\n\nWill return True for success or False for failure. Set on to True to lock, False to unlock.\n\n### Delete Recording (or scheduled recording)\n\n```\nresponse = self.client.recording_delete(pvrid, <deleteon=True>)\n```\n\nWill return True for success or False for failure. Set on to True to delete, False to undelete. Cannot undelete scheduled recording.\n\n### Erase Recording\n\n```\nresponse = self.client.recording_erase(pvrid)\n```\n\nWill return True for success or False for failure.\n\n### Erase all Recordings including scheduled recordings\n\n```\nresponse = self.client.recording_erase_all()\n```\n\nWill return True for success or False for failure.\n\n### Set Last Played Position\n\n```\nresponse = self.client.recording_set_last_played_position(pvrid, pos)\n```\n\nWill return True for success or False for failure. Only works on the main Sky Q box.\n\n### Get Channel List\n\n```\nchannelList = self.client.get_channel_list()\n```\n\nWill return an object with an array of channels.\n\n```\n{\n   'channels':[\n      {\n         'channelno':'101',\n         'channelname':'BBC ONE',\n         'channelsid'='2153',\n         'channelimage_url'='https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',\n         'channeltype':'video',\n         'channelnoint':101,\n         'sf':'sd'\n      },\n      {\n         'channelno':'0102',\n         'channelname':'BBC R2',\n         'channelsid'='2153',\n         'channelimage_url'='https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',\n         'channeltype':'audio',\n         'channelnoint':102,\n         'sf':'au'\n      },\n      {...}\n   ]\n}\n```\n### Get Channel List (JSON)\n\n```\nchannelList = self.client.get_channel_list().as_json()\n```\n\nWill return a JSON structure with an array of channels.\n\n```\n{\n   \"__type__\":\"__channellist__\",\n   \"attributes\":{\n   },\n   \"channels\":[\n      {\n         \"__type__\":\"__channel__\",\n         \"attributes\":{\n            \"channelno\":\"101\",\n            \"channelname\":\"BBC ONE\",\n            \"channelsid\":\"2153\",\n            \"channelimage_url\":\"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png\",\n            \"channeltype\":\"video\",\n            \"channelnoint\":101,\n            \"sf\":\"sd\"\n         }\n      },\n      {\n         \"__type__\":\"__channel__\",\n         \"attributes\":{\n            \"channelno\":\"0102\",\n            \"channelname\":\"BBC R2\",\n            \"channelsid\":\"2153\",\n            \"channelimage_url\":\"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png\",\n            \"channeltype\":\"audio\",\n            \"channelnoint\":102,\n            \"sf\":\"au\"\n         }\n      },\n      {...},\n   ]\n}\n```\n\n### Get Channel Information (for a specific channel number)\n\n```\nchannelInfo = self.client.get_channel_info(channel_no)\n```\n\nWill return an object such as below:\n\n```\n{\n   'channelno'='101',\n   'channelname'='BBC One South',\n   'channelsid'='2153',\n   'channelimage_url'='https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png',\n   'channeltype'='video',\n   'channelnoint'=101,\n   'sf'='sd'\n}\n```\n### Get Channel Information (for a specific channel number) (JSON)\n\n```\nchannelInfo = self.client.get_channel_info(channel_no).as_json()\n```\n\nWill return an object such as below:\n\n```\n{\n   \"__type__\":\"__channel__\",\n   \"attributes\":{\n      \"channelno\":\"101\",\n      \"channelname\":\"BBC One South\",\n      \"channelsid\":\"2153\",\n      \"channelimage_url\":\"https://d2n0069hmnqmmx.cloudfront.net/epgdata/1.0/newchanlogos/600/600/skychb2153.png\",\n      \"channeltype\":\"video\",\n      \"channelnoint\":101,\n      \"sf\":\"sd\"\n   }\n}\n```\n\n### Get Favourite List\n\n```\nfavouriteList = self.client.get_favourite_list()\n```\n\nWill return an object with an array of favourites.\n\n```\n{\n   'favourites':[\n      {\n         'lcn': 1,\n         'channelno':'101',\n         'channelname':'BBC ONE',\n         'sid'='2153'\n      },\n      {\n         'lcn': 2,\n         'channelno':'0102',\n         'channelname':'BBC R2',\n         'sid'='2153'\n      },\n      {...}\n   ]\n}\n```\n### Get Favorite List (JSON)\n\n```\nfavouriteList = self.client.get_favourite_list().as_json()\n```\n\nWill return a JSON structure with an array of channels.\n\n```\n{\n   \"__type__\":\"__favouritelist__\",\n   \"attributes\":{\n   },\n   \"favourites\":[\n      {\n         \"__type__\":\"__favourite__\",\n         \"attributes\":{\n            \"lcn\": 1,\n            \"channelno\":\"101\",\n            \"channelname\":\"BBC ONE\",\n            \"sid\":\"2153\"\n         }\n      },\n      {\n         \"__type__\":\"__favourite__\",\n         \"attributes\":{\n            \"lcn\": 2,\n            \"channelno\":\"0102\",\n            \"channelname\":\"BBC R2\",\n            \"sid\":\"2153\"\n         }\n      },\n      {...},\n   ]\n}\n```\n\n### Decode EPG information (JSON)\n\n```\nfrom pyskyqremote.channel import ChannelDecoder\nchannel = ChannelDecoder(channelJSON)\n```\n\nWill decode the JSON structure to a python object.\n\n### Send key press\n\n```\nself.client.press(sequence)\n```\n\nAllows the sending of a sequence of key presses which are submitted at 1/2 second intervals\n\nValid values are:\n```\npower\nselect\nbackup\ndismiss\nchannelup\nchanneldown\ninteractive\nsidebar\nhelp\nservices\nsearch\ntvguide\nhome\ni\ntext\nup\ndown\nleft\nright\nred\ngreen\nyellow\nblue\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9,\nplay\npause\nstop\nrecord\nfastforward\nrewind\nboxoffice\nsky\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for Sky Q Remote",
    "version": "0.3.25",
    "split_keywords": [
        "skyq",
        "remote"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e757ac15705a46a641960712b905ed5ad44b4d724630fbf8ebc0af7da3f36d4",
                "md5": "fca7c1b2387ec40d25bca45703d42c41",
                "sha256": "d724b208c7dacf94a00afb2fceb4c4cec22cd281b85715f224f3bac85910a035"
            },
            "downloads": -1,
            "filename": "pyskyqremote-0.3.25-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fca7c1b2387ec40d25bca45703d42c41",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 30016,
            "upload_time": "2023-04-01T15:57:47",
            "upload_time_iso_8601": "2023-04-01T15:57:47.419803Z",
            "url": "https://files.pythonhosted.org/packages/9e/75/7ac15705a46a641960712b905ed5ad44b4d724630fbf8ebc0af7da3f36d4/pyskyqremote-0.3.25-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57da7fe5956a3ca7efbbc6213b242488ed1d84da3e6e6ed4bc5e8f6ab34475f4",
                "md5": "7764dcf4240a04aa976654cfc742774a",
                "sha256": "970b6a9e430d744510f6677e3aa1a0ce79e65ceb4379c85f37494760580109b1"
            },
            "downloads": -1,
            "filename": "pyskyqremote-0.3.25.tar.gz",
            "has_sig": false,
            "md5_digest": "7764dcf4240a04aa976654cfc742774a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 31095,
            "upload_time": "2023-04-01T15:57:49",
            "upload_time_iso_8601": "2023-04-01T15:57:49.412590Z",
            "url": "https://files.pythonhosted.org/packages/57/da/7fe5956a3ca7efbbc6213b242488ed1d84da3e6e6ed4bc5e8f6ab34475f4/pyskyqremote-0.3.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-01 15:57:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "RogerSelwyn",
    "github_project": "skyq_remote",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyskyqremote"
}
        
Elapsed time: 0.06388s