From SpinetiX Support Wiki
Summary information and/or updates to the documentation could be found on this page.
Pull Mode is one of the content management methods of the HMP whereby content stored on a remote web server is periodically published to the device. It can also be used to upload logs and previews to a remote WebDAV compatible web server.
When using the Pull Mode, the player is instructed to download content from a server at specific intervals. Each time the HMP will do the following:
- Connect to the specified web server.
- Compare the content on the web server with the content present on the local storage.
- Remove from the local storage all files that are no longer present on the web server.
- Download the new files and the modified ones to the local storage.
- The Etag and/or Last-Modified HTTP directives are used to determine if a file was modified or not - see Caching page for more details.
- Unmodified files will not be downloaded.
Note: The order of the last two steps can be changed using the option -deletelast .
- Updates of the content can be programmed at predefined times or under request (using RPC).
- The HMP will copy the content to its local storage, making the system resilient to network failures. Moreover, the uploading process was designed to work even for very poor connections. There is an initial 10 minutes time-out to establish the connection and later another 10 minutes time-out during the transmission of data.
- Content on HMPs behind firewall or NAT can be updated practically from anywhere.
- The Pull Mode mechanism can be used to upload logs and snapshot images to a remote web server for monitoring purposes.
Pull Mode and Fusion
When Fusion mode is enabled on the device, you can still use Pull mode (firmware 2.2.3 or later is required), thus allowing a mix of Fusion and externally managed content, however that content cannot be directly accessed from Fusion like any other media. Instead you need to reference such files within a custom skin, a custom slide template, an hypermedia project or any combination of these.
The default destination for a Pull operation is no longer the root folder, but a sub-folder named "publish". In case an ics file is used to control the Pull Mode, then make sure to specify the destination folder like this:
- Note: Using the manual settings to configure the publish action is currently not working. Use the ics method instead.
* See full article Bandwidth management.
Configure Pull Mode on HMP
Pull Mode must be enabled on the "Pull Mode" page from Control Center, using one of the three available options.
- Use the Manual settings section to configure the pull mode to run once per day:
- For scheduling a daily update of the project from the server:
- Enable "Automatically upload project to the HMP..." option.
- Enter the location of the project on the web server.
- Enter the daily update time.
- For scheduling a daily update of the HMP logs to the server:
- Enable "Automatically upload logs from the HMP..." option.
- Enter the destination of the logs on the web server.
- Enter the daily upload time.
- Specify if you want the "Accounting logs only" or "All logs" to be uploaded.
- For scheduling a daily update of the project from the server:
- For more complex schedules, use one of the iCalendar file sections: "From uploaded iCalendar file (ics)" or "From remote iCalendar file (ics)").
- See the section How to create an iCalendar file to control Pull Mode for more details.
- When using a remote ics file, the option "Check calendar every" can be used to specify the maximum duration after which the HMP will recheck the calendar for updates. Note that if there is an event during the time, the player will automatically check for updates before executing that event and the timer will be reset.
Configure Pull Mode on server
The publish action of Pull mode can be used with an WebDAV compatible server or with a standard HTTP server.
- A WebDAV compatible web server is recommended for use with Pull mode. Most popular web servers like Apache or Microsoft IIS do support WebDAV, but usually it must be enabled first. There are also some public WebDAV servers that can be used, like mydrive.ch.
- If WebDAV cannot be used, the HMP can pull from a plain HTTP web server as well, but since there is no standard method of listing the content of a repository using standard HTTP commands, a custom XML file describing the content of the repository must be available on the web server - please see the Pull mode XML file page for instructions on how to create this file.
- For firmware versions below 2.2.5 - if none of the above can be used, then it might be possible to pull from a plain HTTP web server without the XML descriptor file if the Directory Listing / Directory Browse is enabled. Please note that this solution should be used only for testing purpose and is not recommended for security and bandwidth reasons.
- Write access rights on the web server are only required if you are uploading the logs.
- The port used by pull mode is the one you have specified when entering the project source / log destination - in the absence of such port, then the default of the scheme is used, meaning 80 for http and 443 for https.
- Although an HMP can technically be used as a WebDAV server, this configuration is not recommended because:
- Also see the generic remarks when using Web servers.
For details on how to enable mod_dav module on Apache HTTP Server Version 2.2, see the official Apache Module mod_dav page.
- Internet Information Services (IIS) is included with all Professional versions of Windows, so it can be used for testing, usually without further installation. However, by default, IIS is heavily locked down with regard to WebDAV.
- For a full guide to setting up Microsoft IIS 7 as a Pull Mode source, see the Configuring IIS as server for Pull mode tutorial.
- IIS 7 introduced a new WebDAV stack which, among other changes, restricts WebDAV functions for unauthenticated (anonymous) users to PROPFIND.
- PUT, MKCOL, PROPPATCH, COPY, MOVE, DELETE, and WebDAV-based GET requests all require authentication (see this Microsoft page for more details).
- Ensure that SVG is listed in the allowed MIME types, and directory browsing is enabled if you are using log uploads.
- If using basic authentication, in the IIS site configuration ensure that only basic is enabled. Enabling multiple types will result in the HMP not being able to connect.
- See #Troubleshooting and common errors in Pull mode below for more tips. Also see the Web servers page for more general information.
To use the WebDAV-enabled public server mydrive.ch with pull mode, follow these instructions:
- Create an account with mydrive.ch
- Create a folder for the Projects to be pulled by the HMP (for instance MyProjectName)
- Upload all your content to the created folder (this step may be done directly from Elementi or HMD as explained in Publishing)
On the HMP:
- Go to the Network Credentials page of Control Center and add https://webdav.mydrive.ch/ as Server URI and your username and password.
- Go to the Pull mode page and configure the Project source to: https://webdav.mydrive.ch/MyProjectName/.
- It is often overkill to use a full enterprise-class, rackmounted server to host content for Pull mode. SpinetiX does not recommend specific NAS servers, but mid-range manufacturers such as QNAP and Netgear have performance NAS appliances which support WebDAV and are of a much more practical form factor than rack servers. They usually avoid unnecessary license costs.
Sample Pull Mode php servers
Also check the RPC management samples for the management of the HMP
SpinetiX is providing an automatic generation of XML description listing the content of a files folder (written in PHP) in order to make it easier for you to develop your own HTTP based Pull mode server.
- Make sure you read the README file before getting started!
SpinetiX is providing a server side application for managing and testing Pull mode functionality of HMP devices. Its purpose is to serve as an example and guide implementation for a simple Pull mode server for HMP devices based on a Database.
All pull mode server activity is done through an SQLite database.
- Make sure you read the README file before getting started!
Control the Pull mode with an ics file
An iCalendar file (.ics) can be used to accurately control the actions performed by the HMP when working in Pull mode, for instance to:
- Update the content of the HMP more (or less) than once per day and even from different locations.
- Schedule the update using complex recurring rules.
- Upload different files to a server: logs, snapshot images, report file.
- Enable the communication with a remote RPC server.
- Usually, it's easier to create the ics file within an application. In this case, if you want to see to contents of the ics file, simply open it within a text editor.
The ics file can be directly uploaded on the HMP (from Control Center) or it can be uploaded on a remote web server from which the HMP will be instructed to retrieved it.
- See Configure Pull Mode on HMP section above for more details.
Events and actions
Each action of Pull mode is described by an event (item, meeting) within the calendar file and this event must have a certain format.
The following iCalendar fields are used to define the action (in parenthesis the alternative names used within applications for these fields):
SUMMARY(also referred to as: Title or Subject) - specifies the action to be performed and can take one of the following values:
URL(also referred to as: URI, Location, Where) - specifies the URI of the action.
DTEND(also referred to as: From & To, Start Time & End time) - specifies the starting and ending date and time for the event (or for the first event of a series if the recurring rule is used).
RRULE- specifies the recurrence rule(s) applying to this event.
DESCRIPTION- specifies additional options for the upload or rpc actions.
- Other fields, such as:
UID, VTIMEZONE, PRIORITYetc., can also be used within the ics file.
Duration of an event
The duration of an event represents the time period between
DTEND, during which the player will try to execute the specified action (with other words, it's the validity period of the action, not the duration of the action itself, which can take far less or even more that the duration of the event).
- If the action is not successful for any reasons (for instance, the server cannot be contacted), the player will retry the same action until the
DTENDis reached; at that point the action is discarded even if the action has not been executed.
- Once the action is successful, the event is removed from the Pull mode queue (event if the
DTENDhas not been reached).
Note: If the player is restarted, the ics file controlling the Pull mode will be reprocessed, which means that some past events might be executed again if their
DTEND is still in the future.
When using recurrence rules, make sure that no more than 100 events are generated for any interval of 8 hours, for instance:
- In case of only one event / action, the repeating interval should not be less than 5 minutes.
- In case of two events, the repeating interval for each event should not be less than 10 minutes.
Note: A special care should be taken to avoid overlapping an event by the other events from its series.
- For instance, for an action than needs to be executed every two hours, the duration of the event should not be more than two hours, like in the following example:
DTSTART:20130101T000000 DTEND:20130101T010000 RRULE:FREQ=HOURLY;INTERVAL=2;WKST=SU
The publish action controls when the content of the device should be updated from a remote server. At the end of a successful publish action, the content of the device is an exact copy of the content on the server.
SUMMARYmust be set to publish.
URLmust point to the remote location (folder) of the files for an WebDAV server or to the xml file with the repository description for a standard HTTP server.
- The duration of the publish action is important in case of errors while downloading files. If an error occurs or the server cannot be reached, the Pull mode will retry the downloading process for the entire duration of the event.
To instruct the player to download / check for updates a project from SpinetiX server, each day starting at 6 AM (and up to 7 AM), the ics file would look like this:
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Spinetix.com/NONSGML Spinetix Control Center//EN BEGIN:VEVENT UID:14d64d53-a926-4a71-848d-c78452b195fe DTSTART:20130101T060000 DTEND:20130101T070000 RRULE:FREQ=DAILY;WKST=SU SUMMARY:publish URL: http://demo.spinetix.com/project/default/publish.xml DESCRIPTION:-deletelast END:VEVENT END:VCALENDAR
Note: See also the publish_screen feature.
The upload action can be used to upload different files (logs, snapshot images, report file) from the HMP to a remote server (usually a WebDAV enabled server, though a standard HTTP server can be used as well). This action doesn't effect in any way the content playing on the HMP.
SUMMARYmust be set to upload.
URLmust point to the remote location (folder) where the files will be uploaded. By default the Pull mode uses the
PUTcommand to upload files, but it can be changed to
POSTfor a regular HTTP server, using the
DESCRIPTIONfield contains the list of files to be uploaded (
<file_name> [destination_name]) and/or the options (
-format, -method <post|put>, -snapshot, -logs, -alllogs, -currentlogs, -pastlogs, -accounting, -report).
- The DESCRIPTION can contain multiple options separated with a '\n' line feed.
-contentoption is currently not working (this is a known issue).
To instruct the player to upload two log files to a server using a custom file name format, every two hours, the ics file would look like this:
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Spinetix.com/NONSGML Spinetix Control Center//EN BEGIN:VEVENT UID:14d64d53-a926-4a71-848d-c78234b195fg DTSTART:20130101T000000 DTEND:20130101T010000 RRULE:FREQ=HOURLY;INTERVAL=2;WKST=SU SUMMARY:upload URL: http://webdav.spinetix.com/logs/ DESCRIPTION:-format %s/%d-%n.%x\n-accounting\nhttp://localhost/log/warn.log END:VEVENT END:VCALENDAR
Using Pull mode in a pseudo-push scenario
In some rare scenarios, you may want to configure Pull mode to checks for updates very regularly (e.g. 5 mins). In a normal setup, this would consume many network resources and put unnecessary load on the HMP. To avoid this:
- Configure the HMP to use a dummy ICS file on your remote server for the Pull schedule.
- Configure the Check calendar every : to a small duration (1m or 5m for instance).
- The player will contact the server every time to check if the ICS file has been modified. It will use ETag and HEAD requests to check for a new file (see Caching page).
- By default the server will return an empty ICS file.
- To trigger a content Pull, change the ICS file on the server to add a single event taking place between some short time in the past, to a time in the future long enough for the Pull to complete (2 hours for instance).
- The event location should contain either the URI to the WebDAV server hosting the project, or to the XML describing the list of file to download if you are not using a WebDAV server.
- This way, the player does not need to check the its entire storage at the interval specified, unless the ics file has changed.
- The error "Could not read status line: connection was closed by server " means that the server is reachable but it is returning an error on the path being used. Check the capitalisation, spelling and syntax of the URL is correct.
404: File Not Founderrors: Ensure that the not-found file is added as a valid MIME type for the WebDAV server you are using.
- In most cases that's caused by IIS server not allowing the SVG files (the MIME type is: image/svg+xml).
- IIS returns "unauthorised" errors: Check that the user IIS_IUSR is added with Read permissions on the Virtual Directory you are using.
- Spaces in the path in Pull Mode may cause problems. Use underscores instead of spaces.