Skip to content

Subscription

Phil Schatzmann edited this page Oct 26, 2025 · 1 revision

Here's how DLNA/UPnP subscriptions look:

Subscription Request (SUBSCRIBE) Basic Subscription text SUBSCRIBE /upnp/event/ContentDirectory HTTP/1.1 Host: 192.168.1.100:8200 Callback: http://192.168.1.50:8080/upnp/event NT: upnp:event Timeout: Second-1800 User-Agent: MyDLNAClient/1.0 With Multiple Callbacks text SUBSCRIBE /upnp/event/ContentDirectory HTTP/1.1 Host: 192.168.1.100:8200 Callback: http://192.168.1.50:8080/upnp/event, http://192.168.1.50:8080/backup NT: upnp:event Timeout: Second-3600 Subscription Response Successful Subscription text HTTP/1.1 200 OK Date: Mon, 01 Jan 2024 12:00:00 GMT Server: UPnP/1.0 MediaServer/1.0 SID: uuid:abcd1234-5678-90ef-ghij-klmnopqrstuv Timeout: Second-1800 Content-Length: 0 Subscription Failed text HTTP/1.1 412 Precondition Failed Date: Mon, 01 Jan 2024 12:00:00 GMT SERVER: UPnP/1.0 MediaServer/1.0 CONTENT-LENGTH: 0 Event Notification (when changes occur) Basic Event Notification text NOTIFY /upnp/event HTTP/1.1 Host: 192.168.1.50:8080 Content-Type: text/xml; charset="utf-8" Content-Length: 200 NT: upnp:event NTS: upnp:propchange SID: uuid:abcd1234-5678-90ef-ghij-klmnopqrstuv Seq: 1

<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"> <e:property> 5 </e:property> </e:propertyset> Notification with Multiple Properties text NOTIFY /upnp/event HTTP/1.1 Host: 192.168.1.50:8080 Content-Type: text/xml; charset="utf-8" NT: upnp:event NTS: upnp:propchange SID: uuid:abcd1234-5678-90ef-ghij-klmnopqrstuv Seq: 2

<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"> <e:property> 0 3 </e:property> <e:property> 6 </e:property> </e:propertyset> Renewal/Unsubscription Renew Subscription text SUBSCRIBE /upnp/event/ContentDirectory HTTP/1.1 Host: 192.168.1.100:8200 SID: uuid:abcd1234-5678-90ef-ghij-klmnopqrstuv Timeout: Second-3600 Unsubscribe text UNSUBSCRIBE /upnp/event/ContentDirectory HTTP/1.1 Host: 192.168.1.100:8200 SID: uuid:abcd1234-5678-90ef-ghij-klmnopqrstuv Key Headers Explained: Callback: URL(s) where the server should send event notifications

NT (Notification Type): Always upnp:event for subscriptions

Timeout: Subscription duration in seconds (Second-xxx or Infinite)

SID (Subscription ID): Unique identifier for the subscription

NTS (Notification Sub Type): Always upnp:propchange for property changes

Seq: Sequence number (monotonically increasing)

Common Event Properties: ContentDirectory Service Events: SystemUpdateID: Global update counter for the entire media library

ContainerUpdateIDs: Specific container updates (pairs of ContainerID and UpdateID)

Clone this wiki locally