MIG API
Protocols.UPnP Domain
Protocols.UPnP
Controller interface for any UPnP/DLNA enabled device.
AvMedia.Browse
Get the list of files contained in the folder specified by <item_id> from the UPnP media server with GUID <module_address>.
To get the list of files in the root folder, set <item_id> to 0.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.Browse/<item_id>
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.Browse/15
Response
[
{ "Id" : "12", "Title" : "Downloads", "Class" : "object.container" },
{ "Id" : "16", "Title" : "Va Bene, Va Bene Così.mp4", "Class" : "object.item.videoItem" },
{ "Id" : "22", "Title" : "Sade - King Of Sorrow.mp4", "Class" : "object.item.videoItem" },
{ "Id" : "25", "Title" : "Sade - Soldier of Love.mp4", "Class" : "object.item.videoItem" }
]
AvMedia.GetUri
Get the URI path of the file specified by <item_id> from the UPnP media server with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.GetUri/<item_id>
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.GetUri/25
Response
http://10.12.2.73:49152/content/media/object_id/25/res_id/0/ext/file.mp4
AvMedia.SetUri
Set to <uri> the URI path of the file to play on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.SetUri/<uri>
GET /api/Protocols.UPnP/7a41b404-4c4a-715f-b7b2-49fa112ea8ba/AvMedia.SetUri/http%3A%2F%2F10....
AvMedia.GetTransportInfo
Get transport status of the currently playing file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.GetTransportInfo
GET /api/Protocols.UPnP/7a41b404-4c4a-715f-b7b2-49fa112ea8ba/AvMedia.GetTransportInfo
Response
[{
"CurrentTransportState" : "PLAYING",
"CurrentTransportStatus" : "OK",
"CurrentSpeed" : "1"
}]
AvMedia.GetMediaInfo
Get media information of the currently playing file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.GetMediaInfo
GET /api/Protocols.UPnP/7a41b404-4c4a-715f-b7b2-49fa112ea8ba/AvMedia.GetMediaInfo
Response
[{
"NrTracks" : "1",
"MediaDuration" : "0:04:40",
"CurrentURI" : "http://10.12.2.73:49152/content/media/object_id/21/res_id/0/ext/file.mp4",
"CurrentURIMetaData" : "<DIDL-Lite xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\">
<item>
<dc:title>video - file.mp4</dc:title>
<upnp:class>object.item.videoItem</upnp:class>
<res protocolInfo=\"http-get:*:video/mp4:\" size=\"18728966\">http://10.12.2.73:49152/content/media/object_id/21/res_id/0/ext/file.mp4</res>
</item>
</DIDL-Lite>",
"NextURI" : "",
"NextURIMetaData" : "",
"PlayMedium" : "NETWORK,NONE",
"RecordMedium" : "NOT_IMPLEMENTED",
"WriteStatus" : "NOT_IMPLEMENTED"
}]
AvMedia.GetPositionInfo
Get position information of the currently playing file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.GetPositionInfo
GET /api/Protocols.UPnP/7a41b404-4c4a-715f-b7b2-49fa112ea8ba/AvMedia.GetPositionInfo
Response
[{
"Track" : "1",
"TrackDuration" : "0:04:40",
"TrackMetaData" : "<DIDL-Lite xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\">
<item>
<dc:title>video - file.mp4</dc:title>
<upnp:class>object.item.videoItem</upnp:class>
<res protocolInfo=\"http-get:*:video/mp4:\" size=\"18728966\">http://10.12.2.73:49152/content/media/object_id/21/res_id/0/ext/file.mp4</res>
</item>
</DIDL-Lite>",
"TrackURI" : "http://10.12.2.73:49152/content/media/object_id/21/res_id/0/ext/file.mp4",
"RelTime" : "0:00:39",
"AbsTime" : "0:00:39",
"RelCount" : "299113793",
"AbsCount" : "299113793"
}]
AvMedia.Play
Play the current file (previously set with AvMedia.SetUri) on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.Play
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.Play
AvMedia.Pause
Pause the currently playing file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.Pause
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.Pause
AvMedia.Stop
Stop the currently playing file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.Stop
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.Stop
AvMedia.Previous
Go to previous track/file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.Previous
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.Previous
AvMedia.Next
Go to next track/file on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.Next
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.Next
AvMedia.GetMute
Get volume mute status on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.GetMute
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.GetMute
Response
False
AvMedia.SetMute
Set volume mute status to <mute> (0 or 1) on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.SetMute/<mute>
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.SetMute/1
AvMedia.GetVolume
Get volume level on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.GetVolume
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.GetVolume
Response
8
AvMedia.SetVolume
Set volume level to <level> on the UPnP media player with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/AvMedia.SetVolume/<level>
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/AvMedia.SetVolume/12
Control.On
Turn on the UPnP light/switch with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/Control.On
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/Control.On
Control.Off
Turn off the UPnP light/switch with GUID <module_address>.
Syntax
/api/Protocols.UPnP/<module_address>/Control.Off
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/Control.Off
Control.Level
Set the level of the UPnP dimmer light with GUID <module_address> to <level>% (0-100).
Syntax
/api/Protocols.UPnP/<module_address>/Control.Level/<level>
GET /api/Protocols.UPnP/7a93b404-4c4a-495f-b7b2-93fa382e68ba/Control.Level/65