Logs & Reports

A SMIL-player supports the HTTP PUT method to upload logs and reports to an HTTP server. The web server must support WebDAV and the PUT method.

There are five reporting functions supported which you can combine.

You can also monitor the heartbeats of your player by storing every fetch request of the smil-index via HEAD.

Inventory Report

Inventory Handler

Add metadata to the head section of the SMIL index which define where the media player should PUT the inventory file. A typical definition looks like this.

<head>
  <metadata>
    <x-server>
      <subscriptionList>
        <subscription>
          <type>InventoryReport</type>
          <action>https://domain.tld/filename</action>
          <method>put</method>
          <refreshInterval>3600</refreshInterval>
          <retryInterval>3600</retryInterval>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>
Inventory handler for SMIL Header

In action, there is the path of the file which contains the report. The tags refreshInterval and retryInterval are optional. With these tags, you control the updates frequencies.

Inventory File Format

The file uploaded to the server via PUT looks like this:

<report>
  <date>{createDate}</date>
  <version>1.0</version>
  <player id="{playerId}">
    <contentDirectory>
      <objectInfo>
        <object id="{uuid}" persistent="true|false">
          <resourceURI><!--resourceURI--></resourceURI>
          <state><!--TRANSFER|STREAMING|CHECKSUM|CHECKSUM_ERROR|COMPLETE--></state>
          <contentType><!--mimeType--></contentType>
          <contentLength><!--empty if unknown size or data is in TRANSFER state--></contentLength>
          <lastModified><!--empty if n/a, otherwise xsd:dateTime based on local TZ--></lastModified>
          <expires><!--empty, 0, or xsd:dateTime based on locale TZ--></Expires>
          <transferLength><!--size downloaded in cache so far--></transferLength>
        </object>
		  <!-- More <objects> -->
      </objectInfo>
    </contentDirectory>
  </player>
</report>
Inventory report sample

Play Report

Play Report Handler

The metadata to the head section of the SMIL index are the same. They only needs PlaylogCollection set as type.

<head>
  <metadata>
    <x-server>
      <subscriptionList>
        <subscription>
          <type>PlaylogCollection</type>
          <action>https://domain.tld/filename</action>
          <method>put</method>
          <refreshInterval>3600</refreshInterval>
          <retryInterval>3600</retryInterval>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>
Play Report handler for SMIL Header

Set Log-Id

The playbacks of media files are not logged by default. If you want to log played media files, you had to specify in SMIL index explicitly. The following example shows how to assign a log ID to an image file, so a log is generated when it is played.

<img src="https://domain.tld/image.jpg">
  <param name="logContentId" value="image-id" />
</img>
Set a Log ID to a Media File

Play Report File Format

The play log files uploaded to the server are similar to the POPAI Log Standard 1.0. Several redundant fields are removed to optimize network performance. A log file uploaded to the server looks like this.

<report>
  <date>{createDate}</date>
  <version>1.0</version>
  <player id="{playerId}" multi-channel="true">
    <contentPlayLog displayDeviceId="display:0">
      <contentPlayed>
        <contentId>{log-id}</contentId>
        <startTime>{start-time}</startTime>
        <endTime>{end-time}</endTime>
      </contentPlayed>
		<!-- ... more records of contentPlayLog -->
    </contentPlayLog>
  </player>
</report>
Play report sample

Event logs

The event logs reports various events which can happen on the player. These events can be:

  • FETCH_FAILED: when a file cannot be downloaded. This is due to network failure or not existing URL.
  • MEDIA_NOT_AVAILABLE: When a media file does not exist in player's storage. One reason can be the file is not just downloaded. This also can happen due to insufficient space, which causes the player's storage “garbage collector” erasing files least-recently-used (LRU).
  • MEDIA_OPEN_ERROR: when the header information of the media file describes a format not supported by the player.
  • MEDIA_PLAYBACK_ERROR: Most likely due to a corrupt media file or stream. Occasionally, this can also indicate a RAM or CPU error.

The event reports are helpful when you need to analyze problems.

Event Report Handler

same as above with EventlogCollection set as type.

<head>
  <metadata>
    <x-server>
      <subscriptionList>
        <subscription>
          <type>EventlogCollection</type>
          <action>https://domain.tld/filename</action>
          <method>put</method>
          <refreshInterval>3600</refreshInterval>
          <retryInterval>3600</retryInterval>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>
Event Report handler for SMIL Header

Event Report File Format

The event report uploaded to the server looks like this.

<report>
  <date>{createDate}</date>
  <version>1.0</version>
  <player id="{playerId}" multi-channel="true">
    <playerEventLog>
       <event>
         <eventType>informational|warning|error|critical</eventType>
         <eventTime>{eventTime}</eventTime>
         <eventSource>{moduleName}</eventSource>
         <eventName>{eventEnumName}</eventName>
         <metadata>
           <meta name="{meta1-name}" content="{meta1-content}"/>
           <meta .../>
         </metadata>
       </event>
     </playerEventLog>
  </player>
</report>
Play report sample

Events Reference Listed by Event Source

Player events listed by different event sources as below:

ContentManager

  • event: LRU_OBJECT_REMOVED
  • eventType: informational if lastAccessTime is before 30 days
  • meta "resourceURI": URI for the object that removed
  • meta "lastAccessTime": object last access time
  • event:OBJECT_REMOVED
  • eventType: informational
  • meta "resourceURI": URI for the object that removed
  • event: OBJECT_UPDATED
  • eventType: informational
  • meta "resourceURI": URI for the object that updated
  • meta "contentLength": content length in bytes
  • meta "lastModifiedTime": object last modified time
  • event: FETCH_FAILED
  • eventType: error if no other versions available in cache; warning if an earlier version exists
  • meta "resourceURI": URI for the file that failed to transfer
  • meta "transferLength": Number of bytes transferred so far
  • meta "lastCachedLength": If a previous version exists, its length in bytes
  • meta "lastCachedModifiedTime": If a previous version exists, its modified time
  • event: FETCH_FAILED : E_CHECKSUM_NOT_MATCHED
  • eventType: error
  • meta "xmp:errorMessage": E_CHECKSUM_NOT_MATCHED
  • meta "md5": MD5 calculated from downloaded media
  • event: BROKEN_OBJECT_REMOVED
  • eventType: warning
  • meta "resourceURI": URI for the object that removed
  • meta "contentLength": content length in bytes
  • meta "transferLength": actual file size; -1 means file not found

MediaPlayer

  • event: MEDIA_NOT_AVAILABLE
  • eventType: error
  • meta "resourceURI": URI for the object that not available
  • event: MEDIA_OPEN_ERROR
  • eventType: error
  • meta "resourceURI": URI for the object that fails to open
  • event: MEDIA_PLAYBACK_ERROR
  • eventType: error
  • meta "resourceURI": URI for the object that fails to play

MediaControl

  • event: SMIL_LOADED
  • eventType: informational
  • meta "instanceId": fixed value:"display:0"
  • meta "resourceURI": URI for the object that loaded
  • meta "contentLength": content length in bytes
  • meta "lastModifiedTime": object last modified time
  • event: SMIL_NOT_AVAILABLE
  • eventType: informational
  • meta "instanceId": fixed value:"display:0"
  • meta "resourceURI": URI for the smil-index that not available
  • event: SMIL_OPEN_ERROR
  • eventType: error document error (too large, syntax error, other errors), other internal errors
  • meta "instanceId": fixed value:"display:0"
  • meta "resourceURI": URI for the smil-index that not loadable
  • meta "contentLength": content length in bytes
  • meta "lastModifiedTime": object last modified time

System Report

System report Handler

Add metadata to the head section of the SMIL index which define where the media player should PUT the inventory file. A typical definition looks like this.

<head>
  <metadata>
    <x-server>
      <subscriptionList>
        <subscription>
          <type>SystemReport</type>
          <action>https://domain.tld/filename</action>
          <method>put</method>
          <refreshInterval>3600</refreshInterval>
          <retryInterval>3600</retryInterval>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>
System report handler for SMIL Header

In action, there is the path of the file which contains the report. The tags refreshInterval and retryInterval are optional. With these tags, you control the updates frequencies.

System Report File Format

The system report uploaded to the server looks like this. Formatted for better overview.

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://schemas.adfotain.org/adapi-1.0">
	<date>{createdate}</date>
	<version>1.0</version>
	<player id="{playerId}">
		<systemInfo>
			<systemStartTime>{startTime}</systemStartTime>
			<systemTimeZone>{timeZone}</systemTimeZone>
			<totalCapacity>7377477632</totalCapacity>
			<totalFreeSpace>6895546368</totalFreeSpace>
			<cpuUsage>31%</cpuUsage>
			<memoryTotal>1048576</memoryTotal>
			<memoryUsed>969224</memoryUsed>
			<hdmiOutput>1920x1080p-60</hdmiOutput>
			<network>
				<interface id="eth0">
					<type>ethernet</type>
					<mac>{macAddress}</mac>
					<ip>{ipAddress}</ip>
					<netmask>{netMask}</netmask>
				</interface>
			</network>
			<configuration>
				<modelInfo>
					<prop name="PCB" value="MBR-1100"/>
					<prop name="PCBRevision" value="SR3"/>
					<prop name="licenseModel" value="Android"/>
					<prop name="manufacturer" value=""/>
					<prop name="manufacturerURL" value=""/>
					<prop name="modelDescription" value=""/>
					<prop name="modelName" value="XMP-6200"/>
					<prop name="modelURL" value=""/>
					<prop name="option" value=""/>
				</modelInfo>
				<factoryDefault>
					<variant></variant>
				</factoryDefault>
				<userPref>
					<prop name="info.playerName" value="{playerName}"/>
					<prop name="info.playGroup" value=""/>
					<prop name="info.playGroupMaster" value=""/>
					<prop name="system.locale" value="en_US"/>
					<prop name="net.proxy.type" value="HTTP"/>
					<prop name="net.proxy.host" value=""/>
					<prop name="net.proxy.port" value="0"/>
					<prop name="hardware.videoOut.0.format" value="auto"/>
					<prop name="hardware.videoOut.0.margin" value="auto"/>
					<prop name="hardware.videoOut.0.rotation" value="auto"/>
					<prop name="app.start" value="{"action":"android.intent.action.VIEW","packageName":"com.iadea.player","uri":"http://localhost:8080/v2/user-data/usbdata/index.smil","className":"com.iadea.player.SmilActivity"}"/>
					<prop name="app.fallback" value="{}"/>
					<prop name="app.settings.com.iadea.console.disableAutoStart" value="false"/>
					<prop name="app.settings.com.iadea.console.hideIpAddress" value="false"/>
					<prop name="schedule.reboot.days" value="Sun|Mon|Tue|Wed|Thu|Fri|Sat"/>
					<prop name="schedule.reboot.time" value="04:00"/>
					<prop name="hardware.audioOut.0.masterSoundLevel" value="0.015848931924611124"/>
					<prop name="hardware.hdmi.audio.samplingrate" value="48000"/>
					<prop name="net.wifi.enabled" value="false"/>
					<prop name="net.wifi.dhcp.enabled" value="true"/>
					<prop name="net.ethernet.enabled" value="true"/>
					<prop name="net.ethernet.dhcp.enabled" value="true"/>
					<prop name="net.ethernet.ip" value=""/>
					<prop name="net.ethernet.netmask" value=""/>
					<prop name="net.ethernet.gateway" value=""/>
					<prop name="net.ethernet.dnsServers" value=""/>
					<prop name="net.mobile.apn" value=""/>
					<prop name="net.mobile.user" value=""/>
					<prop name="net.mobile.preferredNetwork" value="AUTO"/>
					<prop name="time.timeZone" value="US/Eastern"/>
					<prop name="time.autoTime.enabled" value="true"/>
					<prop name="time.autoTime.server" value="default"/>
					<prop name="debug.adb.enabled" value="true"/>
					<prop name="debug.adb.tcp.enabled" value="false"/>
					<prop name="usb.updateSmil.enabled" value="true"/>
					<prop name="content.serverUrl" value="{contentsourceUrl}"/>
				</userPref>
			</configuration>
		</systemInfo>
		<hardwareInfo>
			<hardware id="display:0">
				<prop name="modelName" value="{string}"/>
				<prop name="productId" value="{string}"/>
				<prop name="serialNumber" value="{string}"/>
				<prop name="vendorId" value="{string}"/>
			</hardware>
		</hardwareInfo>
	</player>
</report>
System report sample from IAdea MBR-1100

Task Execution Report

Task execution reports informs about an execution of a maintenance task like reboot, software refresh, or firmware update. Not every player software supports this, as this is an operating system dependent function. Currently, only android version of garlic-player with garlic-launcher sends this reports.

Task Execution Report Handler

A typical file definition looks like this.

<head>
  <metadata>
    <x-server>
      <subscriptionList>
        <subscription>
          <type>TaskExecutionReport</type>
          <action>https://domain.tld/filename</action>
          <method>put</method>
          <refreshInterval>3600</refreshInterval>
          <retryInterval>3600</retryInterval>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>
Task execution report handler for SMIL Header

Task Execution Report File Format

<report>
  <date>{createDate}</date>
  <version>1.0</version>
  <player id="{playerId}" multi-channel="true">
    <taskState>
      <task id="foo">
        <lastUpdateTime>{iso-local-datetime}</lastUpdateTime>
        <state>pending|aborted|completed</state>
      </task>
	</taskState>
  </player>
</report>
Task execution report sample

The ID is the same which is given on the maintenance task, so you can assign to the right execution to the report.