en:provisioning

This is an old revision of the document!


Remote Set-top box configuration from Operator's server (provisioning)

To configure STB a special XML-file is used. It is requested by STB from URL: http://[PROVISION_ADDR]/prov/tvip_provision.xml

Provisioning [PROVISION_ADDR] is located on the STB's rootfs /etc/default_provision_server (For the TVIP firmware it is tvipstb.net).

Different STBs could by provisioned by differen versions of XML file, using Web server's features: depending on IP-address or MAC-addres of STB (HTTP header: Mac-Address).

The following example displays providing different XML files depending on STB MAC address using NGINX web-server:

                if ($http_mac_address) {
                    set $tvipmac M;
                }
                if ( -d "/var/www/tvipstb.net/prov.mac/$http_mac_address/" ) {
                    set $tvipres  F$tvipmac;
                }
                if ( $tvipres = FM ) {
                    rewrite ^/prov/(.*)$ /prov.mac/$http_mac_address/$1 break;
                }

In this example, requests from devices with different MAC addresses are forwarded to different directories on web server: /var/www/tvipstb.net/prov.mac/DEVICE_MAC_ADDRESS/

Configure DNS for provisioning

:!: You should configure local domain tvipstb.net to use local provisioning

example configuration for bind DNS server:

$TTL 1200
tvipstb.net        IN SOA  ***HOSTNAME_OF_YOUR_DNS***. dnsmaster.tvipstb.net. (
                                201380101 ; serial
                                10800      ; refresh (3 hours)
                                3600       ; retry (1 hour)
                                604800     ; expire (1 week)
                                3600       ; minimum (1 hour)
                                )
                        NS      ***HOSTNAME_OF_YOUR_DNS***.
                        A       *******YOUR_SERVER_ADDRESS****

File tvip_provision.xml structure

Basic structure is the follows:

<?xml version="1.0"?>
<provision reload="86400">
  <!-- Modules -->
</provision>

reload attribute defines tvip_provision.xml update checking interval in seconds. Default value is 86400. <!– Modules –> defines modules described in the following chapters.

Modules

Update server information

Update server tag is used if operator is using local update server.

<update_server name="update.tvip.ru" />

name attribute defines update server domain name.

  • priorities of update server addresses
  • Defined address will be written to /var/tvip/update_server.prov
  • All official updates are always avaliable on update.tvip.ru web server

TR-069 server (ACS) information

Supported from firmware: 3.8.6
Set up URL, username and password for ACS access over CWMP protocol.

<tr69_server url="http://myacs.net/TR-069" user="test" password="test" />

Syslog server information

Supported from firmware: 3.9.13
Set up ip-address syslog server to send copy of /var/log/syslog. Syslog uses UDP protocol with port 514.

<syslog_host name="1.1.1.1"/>

Statistics server information

Supported from firmware 4.0.13
Set up server URL, where statistics will be sent.

<statistics url="http://domain/stbstat/index.php" accum_period="45">
  <media />
  <network period="20" />
</statistics>

Statistics tag attributes:

  • url - statistics server address.
  • accum_period - period in second of statistic accumulation before sent to server.

Network tag attributes (statistics of network interfaces):

  • period - period in second of statistics reading from hardware.

Media tag has no attributes. If tag media exists, STB will send statistics after stream ends.

Provisioning server information

This allows to redirect STB to another provisioning server. Request to a new server will be executed immediately.

<provision_server name="tvipstb.net" />

name attribute defines new provisioning server domain.
If you need to explicitly reset provisioning server to default domain, make name attribute empty:

<provision_server name="" />

Reboot STB on provisioning file change

<restart value="reboot" />

value attribute could be:
shell - reinit application.
reboot - STB reboot.

Update types information

Defines a list of update type that user could select in Settings menu. For example, customers can have access to Beta and Release firmwares. “release” update type is always present in the menu (called “Default”).

<update_types>
  <device id="s400a">
    <type name="Android/Beta" os="android" type="beta" />
    <type name="Linux-Qt/Release" os="linux-qt" />
  </device>
  <device id="s410" force_type="release" force_os="linux-qt">
  </device>
</update_types>

id attribute in device tag defines device type which is being configured (for ex. s410, s500). type tag attributes:

  • name defines update type user-readable name for display;
  • os defines OS type (for ex. “linux”, “linux-qt”, “android”);
  • type defines update type (for ex. “release”, “beta”). Ifos attribute is not set, current installed OS is being used. If type is not set, “release” will be used by default.

In the following example, S400 STBs (running Android OS) will have access to “android/release” firmwares (by default) and to Beta-firmwares for Android OS (“android/beta”). They also can change OS to Linux-QT (“linux-qt/release”).
S410 STBs can only access “release” version of “linux-qt” OS. They also forced to use “release” update type on each startup.

Software update control

<updates>
  <update_background force="true" value="true" />
  <update_force force="true" value="true" />
  <update_period force="true" value="60" />
</updates>

update_background defines if timer should be used to force confirm update when “New Software is available” window is displayed.
update_force defines if “Cancel” button should be hidden from “New Software is available” window
update_period defines software updated check period in seconds (from 60 to 86400)

force is used to override user defined settings.

Operator information

Defines basic operator information. name sets up operator's name.

<operator name="Operator_Name" />

:!: The following attributes work from firmware 3.8.11. tv_app_name - sets TV'apps name in Main Menu instead of “Watch TV”. tv_app_icon - sets icon id for TV app.

This defines URL of logo image to be displayed on the Main Menu of TVIP Mediacenter. Limits: image format is PNG, max size is 300×300 px. To force update logo, URL change is required.

<logo url="http://tvipstb.net/prov/logo.png" />

url attribute defines image URL.

Defines URL of a special image that is displayed during STB boot (instead of TVIP logo). Limits: BMP format, exact size is 1280×720 px. Color depth is 24bpp. To force update logo, URL change is required.

<bootlogo url="http://tvipstb.net/prov/tvip_splash.bmp" />

url attribute defines image URL.

Time zone and NTP (time) server setup

These define STB time zone and NTP server address.

<time tz="Europe/Moscow" ntp="ru.pool.ntp.org"  />

tz defines time zone in zoneinfo format. ntp attribute defines NTP server address.

Allowed main menu apps

This can disable access to different Mediacenter apps (like DVR, CCTV, VOD, mediaplayer).

App codes: mediaplayer is MediaPlayer, dvr is DVR, cctv is CCTV, vod is Movies, tv is TV, navigator is Web browser, settings is Settings, apps is All apps (Android).

By default, all apps are allowed.

<features>
  <mediaplayer enabled="true" />
  <dvr enabled="true" />
  <cctv enabled="false" />
  <vod enabled="false" />
</features>

Tag name defines app code, enabled attribute defines access: enabled (true) or disabled (false).

Add/hide web applications

This allows to add custom Web applications and hide default installed applications

<webapps override="true">
   <app name="youtube" title="YouTube" uiwidth="1280" uiheight="720" url="http://apps.tvip.ru/apps/youtube/" api="tvip" />
   <app name="lk" title="User Account" icon="account" uiwidth="1280" uiheight="720" url="http://private.provider.com" api="mag"/>
</webapps>

This code hides all default Web applications and adds YouTube and operator's User Account page.

If override attribute is true, all default apps will be hidden; if attribute is false, custom apps will be added to default apps.

Web app attributes:
name is an unique app name (a-z characters, no spaces), it should not be the same as a reserved name or as other web app's name;
title is user readable name for Main menu display;
icon icon codename;
uiwidth and uiheight define UI resolution;
url defines web application URL;
api defines STB API type (tvip/mag/html5);
proxy defines HTTP/HTTPS proxy (if required).

Required attributes are name, title, uiwidth, uiheight, url, api. If icon codename is not specified, name will be used as icon codename. If icon is not found, “vod” icon will be used.

Reserved application names for name attributes: “tvplayer” (Watch TV), “dvr” (DVR), “mediaplayer” (Mediaplayer), “vod” (Movies), “cctv” (CCTV), “preferences” (Settings), “allapps” (Android's All apps). Default app names: “account” for Operator's User Account page, “youtube” for YouTube app, “kodi” for Kodi app. For customer's app, you can use any avaliable icon.

If an app needs “Go to Main Menu” function, it should redirect to “about:back” page.

To disable ALL webapps, use the following code:

<webapps override="true">
</webapps>

Setup stream source type

This allows stream source type setup for IPTV streams: multicast or UDP-proxy.

<tv_stream type="multicast" tsbuffer="100"/>

type attribute defines stream type. Could be: “multicast” or “udpxy”.

tsbuffer defines size MPEG-TS buffer in msec (by default, 0ms).

<tv_stream type="udpxy" server="http://user:pwd@host.ru:4022" />

In this example, UDP-proxy is used. UDPXY server address is specified as server_address:port or user:password@server_address:port using server attribute.

IPTV/OTT protocol setup

This defines various content sources for IPTV/OTT streams.

<tv_protocols default="tvip" force="tvip">
</tv_protocols>

dafault defines default Middleware type.
force defines force Middleware type.

Supported Middleware types:

  • tvip for TVIP Middleware.
  • jsonapi for TVIP JSON API Middleware.
  • m3u for M3U playlist.
  • iptvportal for IPTVPORTAL Middleware.
  • stalker for Stalker Middleware (TVIP UI).
  • browser for web application (portal) middleware.

TVIP JSON API Middleware setup

<tv_protocols default="jsonapi">
  <protocol type="jsonapi" server="http://api.domain.com" />
</tv_protocols>

URL of the API server is defined by server attribute.

M3U playlist and XMLTV/JTV EPG setup

This defines M3U playlist based non-middleware mode.

<tv_protocols default="m3u">
  <protocol type="m3u" m3u="http://operator.com/channels.m3u" epg="http://operator.com/epg.zip" />
</tv_protocols>

URL of an m3u playlist is defined by m3u attribute. URL of EPG file (XMLTV/JTV) is defined by epg attribute.

Stalker Middleware setup

This defines Stalker setup that work in TVIP user interface design.

<tv_protocols default="stalker">
 <protocol type="stalker" server="http://provider.net/stalker_portal" />
</tv_protocols>

Stalker portal URL is defined by server attribute.

Web-portal middleware setup

This content source replaces TVIP IPTV application with a web-portal application.

<tv_protocols default="browser">
 <protocol type="browser" server="http://provider.net/portal/" api="tvip" noui="false" />
</tv_protocols>

server attribute defines portal URL (middleware); api defines JavaScript API for the portal (“tvip”, “mag”, “html5”).
If noui attribute is true then all TVIP user interface is replaced by Web portal (“Whole system” mode), if false, then Web-portal only replaces Watch TV app (“TV only” mode). If combined attribute is true and noui is false, then “Combined” mode is used (from v.4.0.23).

Optional attributes:
proxy defines HTTP/HTTPS-proxy server;
uiwidth and uiheight defines web page resolution(default: 1280×720);
cas - CAS type;
multi_portal - enable (true) or disable (false) Portal Manager. (from v.3.8.19);
multi_portal_params - if Portal Manager is enabled, provides params containing forced (pre-defined) portals. (from v.3.8.19);
Multi portal params are provided in the following format: "server1=Server 1 Name|http://server1.domain/path&server2=Server 2 Name|http://server2.domain/path"

Security

This allows to setup channel and app blocking.

Example:

<security>
        <enabled value="true" force="true" />
        <password value="0000" force="true" />
        <autolock_timeout value="600" force="true" />
        <channel_default_locked value="true" />
        <channel_adult_lock value="true" />
        <operator_forced_age value="18" />
        <disabled_apps force="true" value="vidimax,youtube" />
</security>

enabled activates security mode. Also, unlock code (password) is required in that case. To force enable security mode even if user disables it, use force attribute with value true.
autolock_timeout - set autolock timeout in seconds.
channel_default_locked - Block channels mode (true - only channels in black list are blocked, false - all channels except white list are blocked).
operator_forced_age - Block channels with age tag equal or greater then the value (firmwares 4.0.11+).
channel_adult_lock - Block adult channels (adult channels should be set by middleware (firmwares up to 3.8)).
disabled_apps - comma separates list of blocked apps.

Display setup

<display>
  <hd_format value="720p50" />
  <hdmi_autofr value="true" />
  <sd_format value="auto" />
  <aspect value="box" />
  <cec value="false" force="true" />
  <sync_standby value="true" />
</display>

hd_format - HDMI-out resolution (auto,2160p50,2160p60,1080p50,1080p60,1080i50,720p50,720p60,576i50).
sd_format - A/V-output (auto,pal,ntsc).
hdmi_autofr - HDMI-output
cec - enable HDMI-CEC.
aspect - Default aspect ratio (box,zoom,full), to set default, use empty value=“”.
sync_standby - STB goes to Sleep/Wake, when TV goes to sleep/wake. (do not supported by all mediacenters and TVs, from fw. 4.0.13).

To force some settings to apply use attribute force with value=“true”

Auto standby mode setup

Supported from v.3.8.6

  <auto_standby timeout="3600" force="true" />

timeout - inactivity time in seconds, after which standby mode will be activated (possible values: from 60 to 2500000, or 0 - disable.).
force - true - override user's setting.

Appearance settings

<appearance>
  <uialpha value="50" />
  <animation value="true" force="true" />
  <listlooped value="true" />
  <uipadding value="large" />
  <tv_preview_mode value="true" force="true" />
  <display_channel_numbers value="true" />
  <channel_icons_aspect value="1.777"/>
</appearance>
  • uialpha - UI transparency (0-100%).
  • animation - Enable (true) or disable (false) UI animations.
  • listlooped - Enable/disable looped channel list.
  • uipadding - Overscan setup (“small”, “medium”, “large”).
  • tv_preview_mode - Enable/disable preview mode in channel list.
  • tv_cursor_mode - Enable simple TV control mode. In this mode, cursor keys control volume and channel switch.
  • display_channel_numbers - Enable (true) or disable (false) display of channel numbers(supported from firmware 4.0.17).
  • channel_icons_aspect - Channel icon images aspect ration (aspect=width/height). Used for UI channel layout optimizations (supported from firmware 4.0.20).


To force some settings to apply use attribute force with value=“true”

Configuration of user interface color schemes

Supported from firmware 4.0.17

<appearance>
  <color_schemes value="true" override="true" default="Berries" force="Berries">
    <scheme name="TVIP brand color">
      <color name="CL_MAIN" value="#ff2A50A3" />
      <color name="CL_BACKGROUND" value="#ff14A2DC"/>
      <color name="CL_CONTRAST_MAIN" value="#ffCAE2F5"/>
      <color name="CL_CONTRAST_BACKGROUND" value="#ffCAE2F5"/>
      <color name="CL_SECOND" value="#ffF37121"/>
      <color name="CL_button_casual" >CL_BACKGROUND</color>
    </scheme>
    <scheme name="Berries">
    </scheme>
  </color_schemes>
</appearance>
  • color_scheme - root definition of UI color schemes. Attributes: override - if true, preinstalled schemes will be completely overridden by operator defined schemes; default - name of default color scheme; force - name of forced color scheme.
    • scheme - single operator scheme definition; name - defines scheme name.
      • color - defines a color variable; name - defines color id from the scheme. value defines ARGB color like: #AARRGGBB.

Base scheme colors:

  • CL_MAIN - the main color of a scheme. It is used with the most opaque elements. Usually, at the top and bottom of the screen (default: #ff37363c).
  • CL_BACKGROUND - background color for the elements at the center of the screen and for table's backgrounds(default: #73aaaaaa).
  • CL_CONTRAST_MAIN - color for the items (text, images), that are displayed on top of the the main color. This should be in contrast with CL_MAIN (default: #ff282832).
  • CL_CONTRAST_BACKGROUND - color for the items (information) at the center of the screen (like pop-up menus and transparent windows). This should be in contrast with CL_BACKGROUND (default: #ffffffff).
  • CL_SECOND - secondary scheme color. This is used for the active control elements (selectors, buttons) (default: #ffffffff).

Extended colors:

Definition of these colors is optional. They are calculated from the base colors if not defined.

Color Dependency Transparency Description
CL_on_main_casualCL_CONTRAST_MAIN1,00general color for the elements on top of the main color
CL_text_on_main_casualCL_on_main_casual 1,00base text color, that is displayed on top of the main color
CL_text_on_main_activeCL_on_main_casual 1,00active/selected text color, that is displayed on top of the main color
CL_text_on_main_dimmedCL_on_main_casual 0,55dimmed text color, that is displayed on top of the main color
CL_on_background_casualCL_CONTRAST_BACKGROUND1,00base text color, that is at the center or inside a table
CL_text_on_background_casualCL_on_background_casual1,00base text color inside a table
CL_text_on_background_activeCL_on_background_casual1,00active/selected text color inside a table
CL_text_on_background_dimmedCL_on_background_casual0,55dimmed text color for inactive elements in tables and some secondary text
CL_wallpaperCL_BACKGROUND0,90background color for most of UI widgets
CL_fadeCL_BACKGROUND0,90video overlay color for the fullscreen elemens
CL_additionalCL_BACKGROUND0,40additional color for active widgets and active table columns
CL_bgr_colorCL_MAIN1,00color of the background image in the Home screen (when no video) and for some other elements
CL_bumperCL_MAIN0,94color of top and bottom “panels”
CL_headerCL_bumperbackground color of the elements at the top of the screen
CL_footerCL_bumperbackground color of the elements at the bottom of the screen
CL_popupCL_MAIN1,00color of dialog windows, extended settings and system messages
CL_popup_contrastCL_CONTRAST_MAIN1,00content color inside dialog windows
CL_plateCL_MAIN1,00“Plates” (Home screen elements, VoD elements, etc.) color
CL_plate_contrastCL_CONTRAST_MAIN1,00context (text, buttons) color inside “plates”
CL_selectorCL_SECONDselector color for the active/selected control elements, cursor, active buttons, etc.
CL_emptyCL_SECOND1,00color of inactive part of a progress bar
CL_inactiveCL_SECOND0,35color for disabled UI elements (buttons)
CL_fullCL_CONTRAST_MAIN1,00color of active part of a progress bar
CL_button_selectedCL_selector1,00color of a selected button
CL_button_casualCL_selector0,35color of a disabled button
CL_on_buttonCL_on_background_casualtext and icon color for a button

Preinstalled scheme names are the following:

  • Default
  • Deep Purple
  • Indigo
  • Teal
  • Blue
  • Light Green
  • Berries
  • Chocolate
  • Medusa
  • TVIP classic

Force mount SMB and NFS shares

That forces mounting of remote storage.

<mountpoints>
  <mountpoint  type="smb" mountname="SMB Share">
    <address value="192.168.1.1" />
    <folder value="Movies" />
    <password value="pass" />
    <username value="login" />
  </mountpoint>
  <mountpoint type="nfs" mountname="NFS Share">
    <address value="nfs.operator.com" />
    <folder value="/home/sharing/Movies" />
  </mountpoint>
</mountpoints>

Protocol is set by type attribute (“smb” or “nfs”), mountname defines resource name.

In this example two shares are mounted:
- SMB directory with name “Movies” on the SMB server with IP 192.168.1.1 with username “login” and password “pass”.
- NFS directory “/home/sharing/Movies” on the NFS server with domain name nfs.operator.com.

Force add CCTV sources

This sets up sources for CCTV app. Sources could be: direct URLS in UDP, HTTP, RTSP formats or M3U-playlists over HTTP.

<cctv_sources>
  <source name="Cameras" url="http://cam.operator.com/cameras.m3u" />
  <source name="Our Office" url="rtsp://cam.operator.com/office" />
</cctv_sources>

name attribute sets name in the CCTV list. url defines URL of a stream or playlist.

Block debug window access (s.info->DEL)

<system_locks>
        <sysinfo_del locked="true" />
</system_locks>

Block reset to default settings

<system_locks>
        <reset locked="true" />
</system_locks>

Disable IGMPv1 protocol

Supported from fw version 4.0.13 for Linux-Qt OS. Does not supported for all mediacenters.
Prevents OS kernel to use IGMP protocol with version lower then 2.

<system_locks>
        <igmpv1_block enabled="true" />
</system_locks>

Restrict access to mediacenter settings

You can hide or disable almost any setting in Settings app. Note: this does not set setting values. It just control user's access to settings! You should use id of a setting to work with it. Possible values:

visible="false/true"
enabled="false/true"

Root setting tabs:

pref_system - System
pref_appearance - Appearance
pref_network - Network
pref_display - Display
pref_tv - TV
pref_security - Security

<preferences>
  <pref_network visible="false" />
</preferences>

In this example, “Network” tab is totally hidden from Settings.

Ids of System tab

pref_system_language - System language
pref_system_updatetype - Update type
pref_system_updateperiod - Update period
pref_system_updatebackground - Background install
pref_system_timezone - Timezone
pref_system_timeserver - NTP address
pref_system_audiolanguage - Default audio language
pref_system_digitalsoundmode - Digital sound

Ids of appearance tab

pref_appearance_alpha - UI transparency
pref_appearance_anim - Animated UI
pref_appearance_listlooped - Looped channel list
pref_appearance_padding - Overscan

Ids of Network tab

pref_network_iface - Interface type (Eth/WiFi)
pref_network_wlan_ssid - WiFi Access point
pref_network_config - Config (DHCP/Manual)
pref_network_ip - IP-address
pref_network_mask - Mask
pref_network_gateway - Gateway
pref_network_dns1 - DNS1
pref_network_dns2 - DNS2

Ids of Display tab

pref_display_hdformat - HD format
pref_display_hdhdmienable - HDMI enable
pref_display_hdcomponentenable - Component enable
pref_display_sdformat - SD format
pref_display_sdrcaenable - RCA enable
pref_display_sdsvideoenable - S-Video enable
pref_display_aspect - Aspect ratio
pref_display_cec - HDMI-CEC

Ids of TV tab

pref_tv_streamtype - Stream type
pref_tv_udpxyaddress - UDPXY address
pref_tv_mpegts_buffer - MPEG-TS buffer
pref_tv_dvr_deviceid - DVR storage
pref_tv_timeshift_deviceid - Timeshift storage
pref_tv_autotimeshift - Autotimeshift
pref_tv_middleware - Content source
pref_tv_button_midd_setup - Content source setup

Ids of Security tab

pref_security_enable - Enable security
pref_security_timeout - Autoblock timeout
pref_security_tvfiltertype - Filtering type (black/white)
pref_security_operatorlock - Adult channels block
pref_security_allowwebapps - Enable/disable web apps
pref_security_allowapps - Enable/disable Android apps

<preferences>
  <pref_network visible="false" />
 
  <pref_tv>
    <pref_tv_streamtype visible="false" />
    <pref_tv_udpxyaddress visible="false" />
    <pref_tv_middleware disabled="true" />
  </pref_tv>
 
</preferences>

In this example: Network tab is totally hidden; in TV tab Stream type and UDPXY address are hidden; in TV tab Middleware change is prohibited.

tvip_provision.xml example

<?xml version="1.0"?>
<provision reload="3600"><!--Update time in seconds -->
 
 <!-- Update server setup -->
 <update_server name="update.tvip.ru" />
 
 <!-- Logo setup -->
 <logo url="http://operator.com/prov/logo.png" />
 
 <!-- Hide dvr app -->
 <features>
   <dvr enabled="false" />
 </features>
 
 <!-- UDP-proxy setup -->
 <tv_stream type="udpxy" server="login:pass@udpxy.operator.com" />
 
 <!-- M3U and EPG setup -->
 <tv_protocols default="m3u">
   <protocol type="m3u" m3u="http://operator.com/channels.m3u" epg="http://operator.com/epg.zip" />
 </tv_protocols>
 
 <!-- Add video source -->
 <mountpoints>
  <mountpoint  type="smb" mountname="SMB Share">
    <address value="192.168.1.1" />
    <folder value="Movies" />
    <password value="pass" />
    <username value="login" />
  </mountpoint>
 </mountpoints>
 
 <!-- CCTV Setup -->
 <cctv_sources>
  <source name="Cameras" url="http://cam.operator.com/cameras.m3u" />
 </cctv_sources>
 
 <!-- Disable network user-preferences. Middleware change restriction. -->
 <preferences>
   <pref_network visible="false" />
   <pref_tv>
     <pref_tv_streamtype visible="false" />
     <pref_tv_udpxyaddress visible="false" />
     <pref_tv_middleware disabled="true" />
   </pref_tv>
 </preferences>
 
</provision>
en/provisioning.1542110036.txt.gz · Last modified: 2018/11/13 14:53 by Alexander