Free the mouse Replay RemoteScheduling
Home | Changes | Index | Search | Go

About RemoteScheduling

Beginning with version 5.0 of the ReplayTV OS, it became possible to remotely schedule recordings to other units on a local area network.

There is an ability to do channel lookups if your Replay units are on different headends.

If there is a simple get_record_slots request it will do a lookup based upon the Program structure (specifically the show title in the Program structure.)

However, if it is responding to a get_manual_record_slots (which outside of third party software can only occur if you have a conflict) directive, it will look it up by channel call letters and type (i.e. BBCA(Cable)). For more information see the section get_manual_record_slots.

There is a working implementation for this in Perl (with an optional web front end) at the bottom of this document.

Phases

There are two phases to the remote scheduling process.

  1. Slot Request (http_replay_guide-get_record_slots)
  2. Record Show Request (http_replay_guide-record_show)

The transport for all of this is http and is always a GET from the requesting machine.

The request is sent to each known Replay DVR on the local network. Tunerless "DVRs" on the network such as DVArchive should return a negative response to a slot request.

Each phase has a response sent to the requesting machine over the same HTTP GET.

NOTE: There is a variant of http_replay_guide-get_record_slots called http_replay_guide-get_manual_record_slots for manual recordings.


get_record_slots

argument data description
time_based numeric Is it a time based or theme based recording. eg. 0x1
program hex_struct Hexadecimal representation of the Program structure.
slot_request hex_struct Hexadecimal representation of the SlotRequest structure.

Followed after a 0x20 by:

HTTP/1.1
Host: XXX.XXX.XXX.XXX:80
Accept-Encoding: gzip

The response is returned as an HTTP response to the get_record_slots GET.

The required fields in the Program structure are: struct_size, autorecord, isvalid, eventtime, minutes, rec len (248), title length and a title.

For example:

program=00000110000000010000000100000000000000003EC9A84000000000003C0000000000F80E0101010101010153746172676174652053472D310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Samples

Raw

2F 68 74 74 70 5F 72 65 70 6C 61 79 5F 67 75 69  /http_replay_gui
64 65 2D 67 65 74 5F 72 65 63 6F 72 64 5F 73 6C  de-get_record_sl
6F 74 73 3F 74 69 6D 65 5F 62 61 73 65 64 3D 30  ots?time_based=0
78 31 26 70 72 6F 67 72 61 6D 3D 30 30 30 30 30  x1&program=00000
31 31 30 30 30 30 30 30 30 30 31 30 30 30 30 30  1100000000100000
30 30 31 30 30 30 30 30 31 32 36 30 30 30 30 31  0010000012600001
30 30 30 33 45 43 31 36 41 45 30 30 30 30 30 34  0003EC16AE000004
37 30 33 30 30 31 45 32 32 35 43 36 33 30 30 30  703001E225C63000
30 36 43 30 41 30 31 32 43 30 31 30 31 31 35 30  06C0A012C0101150
31 30 31 35 34 36 35 36 33 36 38 32 30 34 43 36  10154656368204C6
39 37 36 36 35 30 30 30 30 34 31 37 35 37 34 36  9766500004175746
46 36 44 36 31 37 34 36 39 36 33 32 30 37 33 37  F6D6174696320737
30 37 32 36 39 36 45 36 42 36 43 36 35 37 32 37  072696E6B6C65727
33 32 30 36 31 36 34 36 41 37 35 37 33 37 34 32  32061646A7573742
30 37 34 36 46 32 30 37 34 36 38 36 35 32 30 37  0746F20746865207
37 36 35 36 31 37 34 36 38 36 35 37 32 32 45 30  76561746865722E0
30 30 30 30 30 33 32 33 37 32 43 33 36 33 34 32  0000032372C36342
43 33 31 33 34 33 30 33 34 32 43 33 35 33 30 33  C313430342C35303
30 33 32 32 43 33 35 33 30 33 31 33 37 30 30 30  0322C35303137000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 30 30 30 30 30 26 72 65 63 6F  00000000000&reco
72 64 5F 72 65 71 75 65 73 74 3D 30 30 30 30 30  rd_request=00000
30 30 33 30 37 44 33 30 30 30 35 30 30 30 44 30  00307D30005000D0
30 31 36 30 30 30 30 30 30 30 30 30 30 30 30 37  0160000000000007
42 41 43 30 30 30 30 30 30 31 45 30 30 30 30 30  BAC0000001E00000
30 30 32 30 30 30 30 30 30 30 33 30 30 30 30 30  0020000000300000
31 32 36 30 30 30 30 30 30 30 30 30 30 30 30 30  1260000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 37 46 30 30 30 30 30 30 30 30 30 30 30  0007F00000000000
30 30 30 30 30 30 30 30 30 30 31 30 30 30 30 30  0000000000100000
30 30 30 30 30 30 30 30 30 30 30 20 48 54 54 50  00000000000 HTTP
2F 31 2E 31 0D 0A 48 6F 73 74 3A 20 31 39 32 2E  /1.1..Host: 192.
31 36 38 2E 30 2E 39 3A 38 30 0D 0A 41 63 63 65  168.0.9:80..Acce
70 74 2D 45 6E 63 6F 64 69 6E 67 3A 20 67 7A 69  pt-Encoding: gzi
70 0D 0A 0D 0A                                   p....

HTTP

/http_replay_guide-get_record_slots?time_based=0x1&program=00000110000000010000000100000126000010003EC16AE000004703001E225C6300006C0A012C010115010154656368204C69766500004175746F6D6174696320737072696E6B6C6572732061646A75737420746F2074686520776561746865722E00000032372C36342C313430342C353030322C3530313700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&record_request=0000000307D30005000D00160000000000007BAC0000001E000000020000000300000126000000000000000000000000000000007F00000000000000000000010000000000000000

SlotRequest Structure

Any fields marked in italics are required when passing in data. Most flags (and even channelindex) will be filled in for you as part of the response.

offset type label description
0 DWORD unknown1 Always 0x00000003 in my samples.
4 WORD year year of the recording (GMT)
6 WORD month month of the recording (GMT)
8 WORD day date of the recording (GMT)
10 WORD hour hour of the recording (GMT)
12 WORD minute minute of the recording (GMT)
14 WORD second second of the recording (GMT) unused but always set to =0x0000=
16 DWORD unknown9 This number varies sometimes but isn't required unless it's a manual recording. NOTE: With get_manual_record_slots this must always be set to 0x0000692C
20 DWORD minutes Minutes
24 DWORD quality Quality Level (2 Standard, 1 Medium, 0 High)
28 DWORD inputsource Input Source (3 Tuner )
32 DWORD channelindex Tuning Channel. This is not required.
36 DWORD manualrecord Should usually be 0x00000000, but if it's a manual recording should be 0x00000001
40 DWORD guaranteed If 0xFFFFFFFF the show is Guaranteed
44 DWORD recurring If 0xFFFFFFFF the show is Recurring
48 DWORD keep Number of episodes to keep. If not recurring then this isn't required.
52 BYTE daysofweek Days of Week Bitmask (NOTE: Always 0x7F for "this show only" )
53 BYTE afterpadding Minutes to pad after show
54 BYTE beforepadding Minutes to pad before show
55 BYTE flags This is guess, so far it's always been zeroed so it's probably unused and a holdover since this is from another struct.
56 DWORD unused1 Seems to always be 0x00000000
60 DWORD category Category to put the recording in.
64 DWORD unused2 Seems to always be 0x00000000
68 DWORD firstrun If 0x00000001 then only first run episodes will be recorded. Usually this is 0x00000000 for "this show only" or "all shows"

(0x48) 72 bytes (144 as hexascii string)

Sample

record_request=0000000307D30005000D00160000000000007BAC0000001E000000020000000300000126000000000000000000000000000000007F00000000000000000000010000000000000000

SlotRequest Responses

The response to a slot request is fairly straightforward. A response 'no slots' or a response containing the slot_data structure is given which includes most of the original request data. This data is used to create the information displayed to the user to confirm a recording on a remote unit.

data description
chunk_size_header Size of the chunk
status_code  
n_slots Answer to the get_record_slots question. Can be 0x0 or 0x1
slot_data Hexadecimal represenation of the slot data structure, only sent if n_slots is 0x1

NOTE: While it is true that this will fill in data that may be missing from your original request (various flags, channel tuning number, etc) it will for some reason sometimes not echo back the quality level. You will need to patch the quality field back in before you submit the record request.

Samples

Raw (Positive)

48 54 54 50 2F 31 2E 31 20 32 30 30 20 4F 4B 0D  HTTP/1.1 200 OK.
0A 44 61 74 65 3A 20 54 68 75 2C 20 30 31 20 4A  .Date: Thu, 01 J
61 6E 20 31 39 37 30 20 30 31 3A 35 34 3A 33 33  an 1970 01:54:33
20 47 4D 54 0D 0A 53 65 72 76 65 72 3A 20 55 6E   GMT..Server: Un
6B 6E 6F 77 6E 2F 30 2E 30 20 55 50 6E 50 2F 31  known/0.0 UPnP/1
2E 30 20 56 69 72 61 74 61 2D 45 6D 57 65 62 2F  .0 Virata-EmWeb/
52 36 5F 30 5F 31 0D 0A 54 72 61 6E 73 66 65 72  R6_0_1..Transfer
2D 45 6E 63 6F 64 69 6E 67 3A 20 63 68 75 6E 6B  -Encoding: chunk
65 64 0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65  ed..Content-Type
3A 20 74 65 78 74 2F 70 6C 61 69 6E 0D 0A 45 78  : text/plain..Ex
70 69 72 65 73 3A 20 54 68 75 2C 20 30 31 20 4A  pires: Thu, 01 J
61 6E 20 31 39 37 30 20 30 31 3A 35 34 3A 33 33  an 1970 01:54:33
20 47 4D 54 0D 0A 4C 61 73 74 2D 4D 6F 64 69 66   GMT..Last-Modif
69 65 64 3A 20 54 68 75 2C 20 30 31 20 4A 61 6E  ied: Thu, 01 Jan
20 31 39 37 30 20 30 31 3A 35 34 3A 33 33 20 47   1970 01:54:33 G
4D 54 0D 0A 43 61 63 68 65 2D 43 6F 6E 74 72 6F  MT..Cache-Contro
6C 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 50 72 61  l: no-cache..Pra
67 6D 61 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 0D  gma: no-cache...
0A 30 30 30 30 30 31 30 30 0D 0A 30 30 30 30 30  .00000100..00000
30 30 30 0A 6E 5F 73 6C 6F 74 73 3D 30 78 31 0A  000.n_slots=0x1.
73 6C 6F 74 5F 64 61 74 61 3D 30 30 30 30 30 30  slot_data=000000
30 33 30 37 44 33 30 30 30 35 30 30 30 44 30 30  0307D30005000D00
31 36 30 30 30 30 30 30 30 30 30 30 30 30 30 30  1600000000000000
30 30 30 30 30 30 30 30 31 45 30 30 30 30 30 30  000000001E000000
30 30 30 30 30 30 30 30 30 33 30 30 30 30 30 31  0000000003000001
32 36 30 30 30 30 30 30 30 30 30 30 30 30 30 30  2600000000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 37 46 30 30 30 30 30 30 30 30 30 30 30 30  007F000000000000
30 30 30 30 30 30 30 30 30 31 30 30 30 30 30 30  0000000001000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 35 34 34 35 34 33 34 38 35 34 35 36 32 30  0054454348545620
33 32 33 39 33 34 32 30 32 38 34 33 36 31 36 32  3239342028436162
36 43 36 35 32 39 30 30 30 31 30 30 30 30 30 30  6C65290001000000
30 30 30 30 30 30 33 41 36 41 38 30 31 42 33 46  0000003A6A801B3F
39 30 38 31 33 43 38 37 35 38 0A 0D 0A           90813C8758...

HTTP (Positive)

HTTP/1.1 200 OK
Date: Thu, 01 Jan 1970 01:54:33 GMT
Server: Unknown/0.0 UPnP/1.0 Virata-EmWeb/R6_0_1
Transfer-Encoding: chunked
Content-Type: text/plain
Expires: Thu, 01 Jan 1970 01:54:33 GMT
Last-Modified: Thu, 01 Jan 1970 01:54:33 GMT
Cache-Control: no-cache
Pragma: no-cache

00000100
00000000
n_slots=0x1
slot_data=

Immediately after the slot_data= follows an ASCII hex encoded slot_data struct which ends with a single 0A and then a 0D 0A.

There can be more than one slot returned (eg. n_slots=0x3) in these cases each slot_data structure is just directly appended one after the other. Just split them at 144 characters per slot.

0

Raw (Negative)

48 54 54 50 2F 31 2E 31 20 32 30 30 20 4F 4B 0D  HTTP/1.1 200 OK.
0A 44 61 74 65 3A 20 54 68 75 2C 20 30 31 20 4A  .Date: Thu, 01 J
61 6E 20 31 39 37 30 20 30 31 3A 35 34 3A 31 38  an 1970 01:54:18
20 47 4D 54 0D 0A 53 65 72 76 65 72 3A 20 55 6E   GMT..Server: Un
6B 6E 6F 77 6E 2F 30 2E 30 20 55 50 6E 50 2F 31  known/0.0 UPnP/1
2E 30 20 56 69 72 61 74 61 2D 45 6D 57 65 62 2F  .0 Virata-EmWeb/
52 36 5F 30 5F 31 0D 0A 54 72 61 6E 73 66 65 72  R6_0_1..Transfer
2D 45 6E 63 6F 64 69 6E 67 3A 20 63 68 75 6E 6B  -Encoding: chunk
65 64 0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65  ed..Content-Type
3A 20 74 65 78 74 2F 70 6C 61 69 6E 0D 0A 45 78  : text/plain..Ex
70 69 72 65 73 3A 20 54 68 75 2C 20 30 31 20 4A  pires: Thu, 01 J
61 6E 20 31 39 37 30 20 30 31 3A 35 34 3A 31 38  an 1970 01:54:18
20 47 4D 54 0D 0A 4C 61 73 74 2D 4D 6F 64 69 66   GMT..Last-Modif
69 65 64 3A 20 54 68 75 2C 20 30 31 20 4A 61 6E  ied: Thu, 01 Jan
20 31 39 37 30 20 30 31 3A 35 34 3A 31 38 20 47   1970 01:54:18 G
4D 54 0D 0A 43 61 63 68 65 2D 43 6F 6E 74 72 6F  MT..Cache-Contro
6C 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 50 72 61  l: no-cache..Pra
67 6D 61 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 0D  gma: no-cache...
0A 30 30 30 30 30 30 31 36 0D 0A 30 30 30 30 30  .00000016..00000
30 30 30 0A 6E 5F 73 6C 6F 74 73 3D 30 78 30 0A  000.n_slots=0x0.
6E 0D 0A                                         n..

HTTP (Negative)

HTTP/1.1 200 OK
Date: Thu, 01 Jan 1970 01:54:18 GMT
Server: Unknown/0.0 UPnP/1.0 Virata-EmWeb/R6_0_1
Transfer-Encoding: chunked
Content-Type: text/plain
Expires: Thu, 01 Jan 1970 01:54:18 GMT
Last-Modified: Thu, 01 Jan 1970 01:54:18 GMT
Cache-Control: no-cache
Pragma: no-cache

00000016
00000000
n_slots=0x0
n
0

It should be noted that after n_slots=0x0 and before n is only a 0A, not a 0A 0D pair.

SlotData Structure

The slot_data structure basically returns your slot request (if approved) with any needed flags set and data filled in (such as the channelindex).

You will need to use a portion (the first 144 characters of the hexstring) of this as part of your record_request structure for the record_show directive.

Also, the get_manual_record_slots uses this structure instead of the initial record_request. The same fields that are required for the get_record_slots =record_request= structure are required here with an important difference, the channeltext field is absolutely mandatory.

NOTE: While it is true that this will fill in data that may be missing from your original request (various flags, channel tuning number, etc) it will for some reason sometimes not echo back the quality level. You will need to patch the quality field back in before you submit the record request.

offset type label description
0 DWORD unknown1 Always 0x00000003 in my samples.
4 WORD year year of the recording (GMT)
6 WORD month month of the recording (GMT)
8 WORD day date of the recording (GMT)
10 WORD hour hour of the recording (GMT)
12 WORD minute minute of the recording (GMT)
14 WORD second second of the recording (GMT) unused but always set to =0x0000=
16 DWORD unknown9 Always 0x00000000 when used in a response, 0x0000692C when used as a manual recording request.
20 DWORD minutes Minutes
24 DWORD quality Quality Level (2 Standard, 1 Medium, 0 High). NOTE: Warning might be nulled out sometimes, be ready to insert your value before you submit a record_request.
28 DWORD inputsource (3 Tuner)
32 DWORD channelindex Tuning Channel. Should be zero if Program data not available.
36 DWORD manual_record Set to 0x00000001 for manual recording.
40 DWORD guaranteed If -1 (0xFFFFFFFF) the show is Guaranteed
44 DWORD recurring If -1 (0xFFFFFFFF) the show is Recurring
48 DWORD keep Episodes to keep (unused if not recurring)
52 BYTE daysofweek Days of Week Bitmask (NOTE: Always 0x7F for "this show only" )
53 BYTE afterpadding Minutes to pad after show
54 BYTE beforepadding Minutes to pad before show
55 BYTE flags This is guess, so far it's always been zeroed so it's probably unused and a holdover since this is from another struct.
56 DWORD unused1 Always seems to be 0x00000000
60 DWORD category Category to put the recording in.
64 DWORD unused2 Always seems to be 0x00000000
68 DWORD firstrun If 0x00000000 then all episodes will be recorded.
72 DWORD flags1 Flags. Sometimes uninitialized?
76 CHAR[20] channeltext Null terminated text representation of call letters, channel number and source. eg. TECHTV(Cable). This is directly used by the requesting unit to display to the user for confirmation. This may include uninitialized data. In the case of get_manual_record_slots this is how channelindex is looked up and it must match a channel on the lineup or it will be refused. The call letters used match the channel guide of the recording unit and are also used by TribuneMediaServices.
96 DWORD flags2 Flags. Sometimes uninitialized?
100 DWORD flags3 Flags. Sometimes uninitialized? Seems to always duplicate flags2.
104 DWORD flags4 Flags. Sometimes uninitialized?
108 DWORD flags5 Flags. Sometimes uninitialized?

(0x70) 112 bytes (224 bytes as hexascii string)

Sample

slot_data=0000000307D30005000D001600000000000000000000001E000000000000000300000126000000000000000000000000000000007F00000000000000000000010000000000000000000000005445434854562032393420284361626C652900010000000000003A6A801B3F90813C8758


record_show

argument data description
record_request hex_struct Hexadecimal representation of the RecordRequest structure.

Followed after a 0x20 by:

HTTP/1.1
Host: XXX.XXX.XXX.XXX:80
Accept-Encoding: gzip

The response is returned as an HTTP response to the record_show GET.

Samples

Raw

2F 68 74 74 70 5F 72 65 70 6C 61 79 5F 67 75 69  /http_replay_gui
64 65 2D 72 65 63 6F 72 64 5F 73 68 6F 77 3F 72  de-record_show?r
65 63 6F 72 64 5F 72 65 71 75 65 73 74 3D 30 30  ecord_request=00
30 30 30 30 30 33 30 37 44 33 30 30 30 35 30 30  00000307D3000500
30 44 30 30 31 36 30 30 30 30 30 30 30 30 30 30  0D00160000000000
30 30 30 30 30 30 30 30 30 30 30 30 31 45 30 30  0000000000001E00
30 30 30 30 30 32 30 30 30 30 30 30 30 33 30 30  0000020000000300
30 30 30 31 32 36 30 30 30 30 30 30 30 30 30 30  0001260000000000
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30  0000000000000000
30 30 30 30 30 30 37 46 30 30 30 30 30 30 30 30  0000007F00000000
30 30 30 30 30 30 30 30 30 30 30 30 30 31 30 30  0000000000000100
30 30 30 30 30 30 30 30 30 30 30 30 30 30 20 48  00000000000000 H
54 54 50 2F 31 2E 31 0D 0A 48 6F 73 74 3A 20 31  TTP/1.1..Host: 1
39 32 2E 31 36 38 2E 30 2E 39 3A 38 30 0D 0A 41  92.168.0.9:80..A
63 63 65 70 74 2D 45 6E 63 6F 64 69 6E 67 3A 20  ccept-Encoding: 
67 7A 69 70 0D 0A 0D 0A                          gzip....

HTTP

/http_replay_guide-record_show?record_request=0000000307D30005000D001600000000000000000000001E000000020000000300000126000000000000000000000000000000007F00000000000000000000010000000000000000

RecordRequest Structure

This is identical to the slot_request structure in the initial slot request with one exception: unknown9 is always 0x0000 unless it's a manual recording, in which case it is 0x692C.

NOTE: Most of these fields will be filled in for you during the slot_request phase as part of the slot_data structure. (Although sometimes quality will be nulled out and you'll need to patch it back into the structure.)

offset type label description
0 DWORD unknown1 Always 0x00000003 in my samples.
4 WORD year year of the recording (GMT)
6 WORD month month of the recording (GMT)
8 WORD day date of the recording (GMT)
10 WORD hour hour of the recording (GMT)
12 WORD minute minute of the recording (GMT)
14 WORD second second of the recording (GMT) unused but always set to =0x0000=
16 DWORD unknown9 Always 0x00000000 when used in this command unless it's in conjunction with a manual recording in which case use 0x0000692C
20 DWORD minutes Minutes
24 DWORD quality Quality Level (2 Standard, 1 Medium, 0 High)
28 DWORD inputsource (3 Tuner)
32 DWORD channelindex Tuning Channel. However, one sample I received had this set to 0x00000000. This should be set for a manual recording
36 DWORD manualrecording Usually 0x00000000. If it's a manual recording then 0x00000001
40 DWORD guaranteed If 0xFFFFFFFF the show is Guaranteed
44 DWORD recurring If 0xFFFFFFFF the show is Recurring
48 DWORD keep Number of episodes to keep
52 BYTE daysofweek Days of Week Bitmask (NOTE: Always 0x7F for "this show only" )
53 BYTE afterpadding Minutes to pad after show
54 BYTE beforepadding Minutes to pad before show
55 BYTE flags This is guess, so far it's always been zeroed so it's probably unused and a holdover since this is from another struct.
56 DWORD unused1 Seems to always be 0x00000000
60 DWORD category Category to put the recording in.
64 DWORD unused2 Seems to always be 0x00000000
68 DWORD firstrun If 0x00000001 then only first run episodes will be recorded. Usually this is 0x00000000 for "this show only" or "record all"

(0x48) 72 bytes (144 as hexascii string)

Sample

record_request=0000000307D30005000D001600000000000000000000001E000000020000000300000126000000000000000000000000000000007F00000000000000000000010000000000000000

RecordRequest Response

The response to a record request is very straightforward.

data description
chunk_size_header Size of the chunk
status_code  
record_result Answer to the record_show command. Can be 0x0 (true) or 0x1 (false)

If false, the status code will be nonzero. As of this writing I'm unsure how to properly interpret the codes.

Samples

Raw

48 54 54 50 2F 31 2E 31 20 32 30 30 20 4F 4B 0D  HTTP/1.1 200 OK.
0A 44 61 74 65 3A 20 54 68 75 2C 20 30 31 20 4A  .Date: Thu, 01 J
61 6E 20 31 39 37 30 20 30 31 3A 35 34 3A 33 34  an 1970 01:54:34
20 47 4D 54 0D 0A 53 65 72 76 65 72 3A 20 55 6E   GMT..Server: Un
6B 6E 6F 77 6E 2F 30 2E 30 20 55 50 6E 50 2F 31  known/0.0 UPnP/1
2E 30 20 56 69 72 61 74 61 2D 45 6D 57 65 62 2F  .0 Virata-EmWeb/
52 36 5F 30 5F 31 0D 0A 54 72 61 6E 73 66 65 72  R6_0_1..Transfer
2D 45 6E 63 6F 64 69 6E 67 3A 20 63 68 75 6E 6B  -Encoding: chunk
65 64 0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65  ed..Content-Type
3A 20 74 65 78 74 2F 70 6C 61 69 6E 0D 0A 45 78  : text/plain..Ex
70 69 72 65 73 3A 20 54 68 75 2C 20 30 31 20 4A  pires: Thu, 01 J
61 6E 20 31 39 37 30 20 30 31 3A 35 34 3A 33 34  an 1970 01:54:34
20 47 4D 54 0D 0A 4C 61 73 74 2D 4D 6F 64 69 66   GMT..Last-Modif
69 65 64 3A 20 54 68 75 2C 20 30 31 20 4A 61 6E  ied: Thu, 01 Jan
20 31 39 37 30 20 30 31 3A 35 34 3A 33 34 20 47   1970 01:54:34 G
4D 54 0D 0A 43 61 63 68 65 2D 43 6F 6E 74 72 6F  MT..Cache-Contro
6C 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 50 72 61  l: no-cache..Pra
67 6D 61 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 0D  gma: no-cache...
0A 30 30 30 30 30 30 31 62 0D 0A 30 30 30 30 30  .0000001b..00000
30 30 30 0A 72 65 63 6F 72 64 5F 72 65 73 75 6C  000.record_resul
74 3D 30 78 30 0A 0D 0A                          t=0x0...

HTTP

HTTP/1.1 200 OK
Date: Thu, 01 Jan 1970 01:54:33 GMT
Server: Unknown/0.0 UPnP/1.0 Virata-EmWeb/R6_0_1
Transfer-Encoding: chunked
Content-Type: text/plain
Expires: Thu, 01 Jan 1970 01:54:33 GMT
Last-Modified: Thu, 01 Jan 1970 01:54:33 GMT
Cache-Control: no-cache
Pragma: no-cache

0000001b
00000000
record_result=0x0
0

NOTE: Between the 0x00000000 (unknown2) and record_result is a sole 0A. There is no 0A 0D pair. There is also only a 0A before the 0A 0D after the record_result ends and before the 0.

If there is a negative result, record_result will be positive and a number will appear instead of 00000000. We have not yet determined how to intepret this.


Other Commands

change_record_options

Another newly added command allows you to change most of the recording options on a networked ReplayTV.

This command is change_record_options (/http_replay_guide-change_record_options).

argument data description
channel_id hex_value Hexadecimal representation of the ReplayChannel. (eg. 0x3ece80d2)
record_request hex_struct Hexadecimal representation of the RecordRequest structure.

The RecordRequest structure and responses are the same as they are for record-show with one exception: _unknown9_ is always set to 0x00000D0C when sent with a change_record_options command.

Sample

/http_replay_guide-change_record_options?channel_id=0x3ece80d2&
record_request=0000000307D30005000D001600000000000000000000001E000000020000000300000126000000000000000000000000000000007F00000000000000000000010000000000000000


get_manual_record_slots

argument data description
slot_data hex_struct Hexadecimal representation of the SlotData structure.

The response is returned as an HTTP response to the get_manual_record_slots GET.

This uses the exact same structure as the slot_data structure usually returned from a get_record_slots request.

A modified version of the structure will be returned with the usual response syntax.

NOTE: Currently in the ReplayTV OS UI you can only remote schedule a manual recording if a conflict is detected.

Systems

Manual recordings do lookups for tuning channel via a string in the format BBCA(Cable). The call letters must match the data on zap2it or your Replay's own channel lineups. (You can also use XMLTV to gather this data.)

This is only required for manual recordings.

text description
(Cable) Cable System
(DBS) Direct Broadcast System such as DISH or DirecTV?
(ANT)? Antenna System (wild guess)

Sample

/http_replay_guide-get_manual_record_slots?slot_data=0000000307D30005000E0004001E00000000692C0000001E000000020000000300000088FFFFFFFFFFFFFFFF00000000000000007F000000000000000000000100000000000000008008D1A44734284361626C652900626C6529000281B43BF8810446C4810446C481F0A7208007EE9

Minimal Required Sample

This will also work, the slot_data returned by the target DVR will fill in the flag fields and the channelindex.

/http_replay_guide-get_manual_record_slots?slot_data=0000000307D30005000E0004001E00000000692C0000001E000000020000000300000000FFFFFFFFFFFFFFFF00000000000000007F00000000000000000000010000000000000000000000004734284361626C652900000000000000000000000000000000000000000000000000000


update_replay_channel

Another newly added command allows you to change most of the theme recording options on a networked ReplayTV.

NOTE: This command is very dangerous and can change almost any portion of a ReplayChannel. Extreme caution should be used to ensure only changing the portions of the ReplayChannel desired.

This command is update_replay_channel (/http_replay_guide-update_replay_channel).

argument data description
channel_id hex_value Hexadecimal representation of the ReplayChannel. (eg. 0x3ece80d2)
replay_channel hex_struct Hexadecimal representation of the ReplayChannel structure.

The ReplayChannel structure has the ReplayShow structure zeroed, and the ChannelFlags has the exported bit turned on. The responses are the same as they are for record-show. However, a false or negative result does NOT produce a nonzero status result, but rather still returns 00000000.

Sample

/http_replay_guide-update_replay_channel?channel_id=0x49041a8b&replay_channel=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000001E5468652053696E67696E6720426565008008C88481F09A980000002881F09B400000000081F09B408109AC580000002849041A8B00000000000000020000000200000000000000007F00000400000000000000005468652053696E67696E67204265650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-- LeeThompson - 23 May 2003 (Update by HenryDonzis 07 Oct 2009)


Comments


time_based seems to be ignored.

unknown9 seems to be echoed back (?) but doesn't seem to really do anything.

(AIR) is the correct system type for over the air broadcasts. This is untested still but I peeked at the ReplayTV's IAppShell?.out module.

-- LeeThompson - 11 Apr 2004


input_source thus far has been ignored, worse, the channeltext does seem to be a requirement and doesn't seem to work for direct tuning. Could this just be an incomplete implementation?

-- LeeThompson - 11 Apr 2004


After some additional checking against the ReplayTV's handling of manual recording remote schedule (which it will only do in the event of a conflict) implementation I've concluded that the input_source stuff is completely broken on the unit itself. If any other input type is selected and it needs to schedule on a different unit it doesn't even make the request.

-- LeeThompson - 11 Apr 2004


unknown1 is ignored when building slot data for a manual record.

-- LeeThompson - 11 Apr 2004


There appears to be (used for themes) a longer version of change_record_options called update_replay_channel. This appears to send a channelid and a hexascii version of the entire replaychannel struct. (e.g. /http_replay_guide-update_replay_channel?channel_id=0x3ec134b4&replay_channel=0000...)

-- LeeThompson - 13 Apr 2004


Your post will appear before this form in chronological order (newest at bottom)

Attachment: Action: Size: Date: Who: Comment:
schedule.zip action 18408 04 Jun 2003 - 01:01 LeeThompson Perl Implementation of Record Scheduling

Topic RemoteScheduling . { Edit | Attach | Ref-By | Printable | Diffs | r1.29 | > | r1.28 | > | r1.27 | More }
Revision r1.29 - 04 Jun 2003 - 01:01 GMT - LeeThompson

Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.