Data feed synchronization
From SpinetiX Support Wiki
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 HMP exactly at the same time.
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 HMP devices have access to external networks.
To synchronize the retrieval of data feed content across multiple HMP devices, follow these steps:
- Make sure that all the HMP devices are using firmware 3.2 or later.
- Select an HMP as the master.
- Make sure that the Network API is enabled.
- Write down the IPv4 address of the master HMP.
- Open Elementi X.
- Open the data-driven widget.
- Click on the button to edit the data source properties. Data Properties dialog opens.
- In the "Synchronize with variable" (previously called "Sync variable") field, enter a string composed from the name of a Shared Variable, followed by "@IP_of_master_HMP" (e.g., "firstname.lastname@example.org").
- Set the 'Refresh' property to the frequency at which your data feed must be refreshed.
Synchronization variable requiredData feeds with a network source require a synchronization variable
- 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 on that layer (together with repeat 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 feed document will suddenly be restarted.