This is an old revision of the document!
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/
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****
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.
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.
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" />
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"/>
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="" />
<restart value="reboot" />
value attribute could be:
shell - reinit application.
reboot - STB reboot.
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:
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.
<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.
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.
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.
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).
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>
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.
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:
<tv_protocols default="jsonapi"> <protocol type="jsonapi" server="http://api.domain.com" /> </tv_protocols>
URL of the API server is defined by server attribute.
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.
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.
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"
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> <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”
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> <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>
To force some settings to apply use attribute force with value=“true”
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>
Base scheme colors:
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_casual | CL_CONTRAST_MAIN | 1,00 | general color for the elements on top of the main color |
CL_text_on_main_casual | CL_on_main_casual | 1,00 | base text color, that is displayed on top of the main color |
CL_text_on_main_active | CL_on_main_casual | 1,00 | active/selected text color, that is displayed on top of the main color |
CL_text_on_main_dimmed | CL_on_main_casual | 0,55 | dimmed text color, that is displayed on top of the main color |
CL_on_background_casual | CL_CONTRAST_BACKGROUND | 1,00 | base text color, that is at the center or inside a table |
CL_text_on_background_casual | CL_on_background_casual | 1,00 | base text color inside a table |
CL_text_on_background_active | CL_on_background_casual | 1,00 | active/selected text color inside a table |
CL_text_on_background_dimmed | CL_on_background_casual | 0,55 | dimmed text color for inactive elements in tables and some secondary text |
CL_wallpaper | CL_BACKGROUND | 0,90 | background color for most of UI widgets |
CL_fade | CL_BACKGROUND | 0,90 | video overlay color for the fullscreen elemens |
CL_additional | CL_BACKGROUND | 0,40 | additional color for active widgets and active table columns |
CL_bgr_color | CL_MAIN | 1,00 | color of the background image in the Home screen (when no video) and for some other elements |
CL_bumper | CL_MAIN | 0,94 | color of top and bottom “panels” |
CL_header | CL_bumper | – | background color of the elements at the top of the screen |
CL_footer | CL_bumper | – | background color of the elements at the bottom of the screen |
CL_popup | CL_MAIN | 1,00 | color of dialog windows, extended settings and system messages |
CL_popup_contrast | CL_CONTRAST_MAIN | 1,00 | content color inside dialog windows |
CL_plate | CL_MAIN | 1,00 | “Plates” (Home screen elements, VoD elements, etc.) color |
CL_plate_contrast | CL_CONTRAST_MAIN | 1,00 | context (text, buttons) color inside “plates” |
CL_selector | CL_SECOND | – | selector color for the active/selected control elements, cursor, active buttons, etc. |
CL_empty | CL_SECOND | 1,00 | color of inactive part of a progress bar |
CL_inactive | CL_SECOND | 0,35 | color for disabled UI elements (buttons) |
CL_full | CL_CONTRAST_MAIN | 1,00 | color of active part of a progress bar |
CL_button_selected | CL_selector | 1,00 | color of a selected button |
CL_button_casual | CL_selector | 0,35 | color of a disabled button |
CL_on_button | CL_on_background_casual | – | text and icon color for a button |
Preinstalled scheme names are the following:
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.
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.
<system_locks> <sysinfo_del locked="true" /> </system_locks>
<system_locks> <reset locked="true" /> </system_locks>
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>
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"
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.
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
pref_appearance_alpha - UI transparency
pref_appearance_anim - Animated UI
pref_appearance_listlooped - Looped channel list
pref_appearance_padding - Overscan
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
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
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
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.
<?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>