User Guide for the “Exchange Rates” Widget

Материал из SmartPlayer

Situation Description

The SmartPlayer team has developed a widget that allows users to upload a file with currency rates to the SFTP server and send specific rates to selected devices. The ability to choose particular devices for transmitting rates was added as part of the widget’s improvement.

Widget Functionality

This widget works:

  • starting from the server application version: 2.151.1

Server Logic

The user uploads a file with price data to the SmartPlayer server via SFTP. The server receives, stores, and processes the information from the file. At regular intervals, data is resent (updated). The server parses the data into the widget, which displays it on devices.

Note: The updated widget has partially changed its implementation. The file placed on the server now includes the field "department". This field specifies the department name, which must also be entered in the device settings. Only devices that have the matching department name will receive the new pricing data. The "department" field value in the file and on the device must be identical — exactly matching in spelling and case.

Setting the “Department” Field

The user must transfer the "department" field value to the necessary devices that will later participate in the broadcast using the widget. To do this, go to the "Devices" section, select the required device, and double-click on it.

Example of the selected device in the “Devices” section of the personal account

After these steps, the device settings page will open. Find the “Branch Code” field and enter the value exactly as it appears in the “department” field of the server file, then save the settings.

Example of the “Branch Code” field in device settings

If this device is linked to a broadcast using the Exchange Rates widget, it will receive only the relevant data for that department.

Currency Report Export

The user can export a currency report in the SmartPlayer personal account. To do this, one of the following two roles is required:

  1. Administrator.
  2. Administrator (Currency Report Broadcast).
Файл:Роль пользователя для отчётов.png
Example of a role in the personal account

The report itself can be exported by navigating to the “Reports” section and selecting the “Currency Report” category.

Example of the “Reports” section and “Currency Report” category

You can learn more about how this section works here.

Adding the Widget to the Personal Account

To add this widget to the personal account, the user must request an archive from the technical support team. It will be provided as a .zip file.

Example of the widget provided as a .zip archive

After that, the user must log in to the personal account and go to the “Content” section.

Example of the “Content” section in the personal account

In the “Content” section, drag the widget from local storage into the personal account. Once uploaded, the widget will appear in the content list.

Example of the widget uploaded into the SmartPlayer personal account

Widget Configuration

After uploading the widget, to begin configuration, double-click on the widget icon. This action will open the main page.

Example of the widget’s main page

On the widget’s main page, two buttons are available:

  1. “API” button.
  2. “Settings” button.
Example of the icons for accessing widget settings

"API" Button

When clicking the "API" button, a modal window opens showing information about the resources required for the widget to function properly. This section also contains a general description of the API’s purpose and operation principles.

Example of information in the modal window

The main parameters for the resources include:

  • Name — resource name.
  • Method — the type of method used (GET).
  • Requires authorization — whether authorization is required.
  • Server address — the URL of the server providing data.
  • API address — displays the name of the JSON file containing pricing data.
  • “Check connection” button — tests the connection and displays a numerical status code.

You can close this window by clicking the standard icon in the upper-right corner.

"Settings" Button

On the settings page, the user must configure the following widget parameters:

  • Widget background — allows you to set a background color using a palette.
  • Background image — select a background image from the SmartPlayer personal account.
  • Data refresh rate from the Central Bank — specify a value (in seconds) for data updates.
  • Logo — select an image from the personal account to use as the widget’s logo.
  • Text in the right part of the widget footer — enter a message text.
  • Font size in the right part of the widget footer — input a value or move the slider to adjust text size.
  • Price display formatting — select a formatting option from the list.
  • Placeholder image — select an image from the personal account to use as a placeholder.
  • “Display placeholder” checkbox — enables/disables the placeholder. When active, the placeholder image is always shown.
  • “Display placeholder when there is no connection to the remote server” checkbox — enables/disables the placeholder when no server connection exists.
  • Time after which to hide prices and show the placeholder — set a time (in seconds) after which the placeholder will be displayed.
  • “Quote change animation” checkbox — enables/disables animation when exchange rates update.
  • Language selection — choose one of the available languages: Russian, English, Spanish, Portuguese, Kazakh.
Example of configurable widget parameters

Finalizing Widget Configuration

After completing configuration, the user must click the “Apply Settings” button in the bottom-right corner of the screen.

Example of the “Apply Settings” button

Then, the widget will expand to full screen, and the user must click the “Save” button at the bottom center.

Example of the “Save” button

Uploading and Downloading Settings

While interacting with the widget, the user can upload or download its configuration. Each action is performed via separate icons in the widget interface, located at the bottom center.

Example of the icons in the widget settings interface

Adding the Configured Widget to a Broadcast

To fully understand how this functionality works, the user should launch a broadcast with a schedule and add this widget as content. To review the previously described steps for creating a broadcast and schedule, it is recommended to check the following Wiki SmartPlayer articles:

Video Tutorial

User Guide for the “Exchange Rates” Widget

Additional Information

If this article does not help you use the functionality as intended or if questions remain after reading it, you can ask them in the "Discussions" section at the top of the page.

Example of the “Discussions” tab on the wiki page

Additional information can also be found on the page Как взаимодействовать пользователю с разделом "Обсуждения"