Jump to content

Data feed synchronization

From SpinetiX Wiki

Introduction

When using a data-driven widget with an external data source on more than one screen area of a multiscreen project, an additional level of synchronization is required because the remote web server may not respond to each player exactly at the same time. The solution is to use the synchronization variable available for Elementi X users, starting with Elementi 2015.

A synchronized retrieval of the data feed content can also be used in other cases than multiscreen content, for instance, when the bandwidth usage is important (e.g., 3G connection) or not all the devices have access to external networks.

Synchronization variable

Network API settings
Network API settings
Data Properties dialog in Elementi X
Data Properties dialog in Elementi X

To synchronize the retrieval of data feed content across multiple players with firmware 4.3.0 or later, respectively, Elementi 2018 or later, follow these steps:

  1. Synchronize the players, as explained on the Shared Variables page.
    Briefly, this involves generating a configuration file from one player, and applying it on the others.
  2. Open Elementi X and select one of the advanced data feed widgets.
  3. Click the Data Feed Properties button to edit the data source properties. Data Properties dialog opens.
  4. In the "Synchronize with variable" field, enter a unique name for a Shared Variable to be used for data synchronization.
  5. Set the 'Refresh' property to the frequency at which your data feed must be refreshed.

For players with firmware below 4.3.0, and before Elementi 2018, follow these steps:

Sync variable
Sync variable
  1. Make sure that all the HMP devices are using at least firmware 4.0.0; update the firmware otherwise.
  2. Select one player as the master.
  3. Make sure that the Network API is enabled.
  4. Write down its IPv4 address.
  5. Open Elementi X.
  6. Open the data-driven widget.
  7. Click the Data Feed Properties button to edit the data source properties. Data Properties dialog opens.
  8. In the "Synchronize with variable" (previously called "Sync variable") field, enter a string composed of the name of a Shared Variable, followed by "@IP_of_master_HMP" (e.g., "data@192.168.1.10").
  9. Set the 'Refresh' property to the frequency at which your data feed must be refreshed.

Note Note:
In the case of a multiscreen project, if you do not enter a Sync variable, you will receive this error message:

Synchronization variable required

Data feeds with a network source require a synchronization variable

Alternatives

  • A proposed workaround for this issue is to write a script that runs on just one device, which retrieves the data source content and updates a Shared Variable. The data source for the data feed widget can then be changed from the feed URL to the name of the Shared Variable, so that all the devices will look for and take the feed updates from this shared variable.
  • An alternative workaround is to set a fixed duration within the widget and set the widget layer duration to indefinite (i.e., the circular arrow icon is shown), so that it will be repeated forever. This is simpler to implement, but is less accurate, since the data feed content might be out of sync up to that iteration. Also, another negative effect is that at the end of the iteration, the data-driven widget will suddenly be restarted.