Maintenance tasks

From opensmil
Jump to: navigation, search

Maintenance jobs

Maintenance jobs can be dispatched to SMIL players by designating a TaskSchedule subscription within the SMIL script's header section. For example:

<head>
  <metadata>
    <x-server xmlns="http://schemas.open-smil.org/smartapi-1.0">
      <subscriptionList>
        <subscription>
          <type>TaskSchedule</type>
          <action>http://server/taskSchedule.xml</action>
          <method>get</method>
        </subscription>
      </subscriptionList>
    </x-server>
  </metadata>
</head>

To initiate device configuration, the player must be issued a SMIL script with a TaskSchedule subscription in the head section. The subscription contains a URL that points to a taskSchedule.xml file that defined the configuration tasks.


Firmware upgrade

taskSchedule.xml example for firmware upgrade.

<taskSchedule xmlns="http://schemas.open-smil.org/smartapi-1.0">
  <timedTaskList>
    <firmware trigger="alignDailyReboot | immediately">
      <source>http://server/firmware.zip | firmware.zip</sοurce>
      <version>v1.0.4</version>
      <model>ironman</model>
      <buildTime>1455825876</buildTime>
      <contentType>x-firmware-update/x-zip</contentType>
      <contentLength>38354944</contentLength>
      <checksum>8243dcea4987685b2928ccceb9026999</checksum>
      <checksumMethod>MD5</checksumMethod>
    </firmware>
  </timedTaskList>
</taskSchedule>
  • 'trigger' parameter will be set to "immediately" if user doesn't provide trigger value in xml.
  • Source: a URL or file name that points to a OTA firmware zip file provided by your device vendor.
  • contentChecksum: MD5 checksum of the firmware package
  • Optional tag -- the firmware should be downloaded from server if <foo> tags listed at below is empty or doesn't exist in this xml. Firmware should auto avoid to check information from zip and avoid upgrade process if information is invalid after downloaded.
    • <model> tag is optional.
    • <buildTime> tag is optional
    • <contentLength> tag is optional.

Reboot

taskSchedule.xml example for reboot device.

<taskSchedule xmlns="http://schemas.open-smil.org/smartapi-1.0">
  <timedTaskList>
    <shutdownPlayer id="123">
      <type>reboot</type>
    </shutdownPlayer>
  </timedTaskList>
</taskSchedule>
  • shutdownPlayer id: the ID is used by the player to register if a particular task has already be applied. The player will not apply the task if its ID is the same as the one most recently applied. In other words, if you wish you re-apply a task, make sure you change its ID

Capture Screen

taskSchedule.xml example for capture screen.

<taskSchedule xmlns="http://schemas.open-smil.org/smartapi-1.0">
  <timedTaskList>
    <screenCapture id="123">
      <type>ScreenCapture</type>
      <action>http://server/uploadfolder/</action>
      <method>put</method>
    </screenCapture>
  </timedTaskList>
</taskSchedule>
  • screenCapture id: the ID is used by the player to register if a particular task has already be applied. The player will not apply the task if its ID is the same as the one most recently applied. In other words, if you wish you re-apply a task, make sure you change its ID

User Preference Configuration

taskSchedule.xml example for preference configuration.

<taskSchedule xmlns="http://schemas.open-smil.org/smartapi-1.0">
  <timedTaskList>
    <updateSettings id="2015121201">
      <sourceURI>http://your_server_ip/config.xml</sourceURI>
      <contentType>x-configuration/xml</contentType>
      <contentLength>1737</contentLength>
      <contentChecksum>4248E25934DE144670FB3C89BAEEE2D2</contentChecksum>
      <checksumMethod>MD5</checksumMethod>
    </updateSettings>
  </timedTaskList>
</taskSchedule>
  • updateSettings id: the ID is used by the player to register if a particular task has already be applied. The player will not apply the task if its ID is the same as the one most recently applied. In other words, if you wish you re-apply a task, make sure you change its ID
  • config.xml: the configuration file need to contains the parameter that need to be changed, it it not required to include all parameters. The config file looks like the following:

Connect specific Wi-Fi AP

User preference example for connect to specific Wi-Fi AP

<configuration xmlns="http://schemas.open-smil.org/smartapi-1.0">
<userPref>
<prop name="net.wifi.enabled" value="true"/>
<prop name="net.wifi.ssid" value="opensmil"/>
<prop name="net.wifi.authentication" value="WPAPSK"/>
<prop name="net.wifi.password" value="xxxxxxxx"/>
</userPref>
</configuration>

Disable proxy

User preference example for disable proxy

<configuration xmlns="http://schemas.open-smil.org/smartapi-1.0">
<userPref>
<prop name="net.proxy.enabled" value="false"/>
</userPref>
</configuration>

User Preference Configuration Support Properties

<configuration xmlns="http://schemas.open-smil.org/smartapi-1.0">
  <userPref>
    <prop name="info.playerName" value="{playerName}"/>
    <prop name="info.playGroup" value="{playGroup}"/>
    <prop name="net.proxy.enabled" value="true|false"/>
    <prop name="net.proxy.settings" value="none|static|pac"/>
    <prop name="net.proxy.host" value="{ip,domain-name}"/>
    <prop name="net.proxy.port" value="{integer}"/>
    <prop name="net.proxy.exclusionList" value="List-of{ip,domain-name}"/>
    <prop name="net.proxy.pac" value="{string}"/>
    <prop name="net.wifi.enabled" value="true|false"/>
    <prop name="net.wifi.ssid" value="{string}"/>
    <prop name="net.wifi.authentication" value="WEPAUTO|WPAPSK|WPA2PSK|OPEN"/>
    <prop name="net.wifi.encryption" value="WEP|TKIP|AES|NONE"/>
    <prop name="net.wifi.dhcp.enabled" value="true|false"/>
    <prop name="net.ethernet.enabled" value="true|false"/>
    <prop name="net.ethernet.dhcp.enabled" value="true|false"/>
    <prop name="net.ethernet.ip" value="{ip}"/>
    <prop name="net.ethernet.netmask" value="{ip}"/>
    <prop name="net.ethernet.gateway" value="{ip}"/>
    <prop name="net.ethernet.dnsServers" value="list-of{ip}"/>
    <prop name="net.beacon.ibeacon.enabled" value="true|false"/>
    <prop name="net.beacon.ibeacon.uuid" value="{uuid format string}"/>
    <prop name="net.beacon.ibeacon.major" value="0-65535"/>
    <prop name="net.beacon.ibeacon.minor" value="0-65535"/>
    <prop name="net.beacon.ibeacon.advertiseMode" value="low_latency|balanced|low_power"/>
    <prop name="net.beacon.ibeacon.power" value="{integer}"/>
    <prop name="time.timeZone" value="Europe/London"/>
    <prop name="time.autoTime.enabled" value="true|false"/>
    <prop name="time.autoTime.server" value="{ip,domain-name,uri}"/>
    <prop name="hardware.videoOut.0.format" value="CEA_720p50|CEA_720p60|CEA_1080p50|CEA_1080p60|CEA_2160p30|CEA_2160p60"/>
    <prop name="hardware.videoOut.0.rotation" value="0|90|180|270|auto"/>
    <prop name="hardware.audioOut.0.masterSoundLevel" value="mute,{min}-{max}db,0-{max}%"/>
    <prop name="hardware.audioOut.0.notificationSoundLevel" value="mute,{min}-{max}db,0-{max}%"/>
    <prop name="hardware.audioOut.0.alarmSoundLevel" value="mute,{min}-{max}db,0-{max}%"/>
    <prop name="content.serverUrl" value="{contentsourceUrl}"/>
    <prop name="schedule.reboot.time" value="{HH:MM in 24-hr format}"/>
    <prop name="schedule.reboot.timeOptimized" value="true|false"/>
    <prop name="schedule.scheduledOn.time" value="{HH:MM in 24-hr format}"/>
    <prop name="schedule.scheduledOff.time" value="{HH:MM in 24-hr format}"/>
    <prop name="task.ota.xml" value="http://username:password@otaXmlURL"/>
    <prop name="task.appUpgrade.xml" value="http://username:password@appXmlURL"/>
    <prop name="debug.adb.enabled" value="true|false"/>
    <prop name="debug.adb.tcp.enabled" value="true|false"/>
    <prop name="system.locale" value="en_US"/>
  </userPref>
</configuration>