Scheduled Applications

  1. Before starting, set the machine to log in automatically upon startup:Windows XP Auto Login
    • Click Start, click Run, and type control userpasswords2
    • Uncheck the "Users must enter a username and password to use this computer" check box.
    • Click Apply.
    • Enter the user name and password you wish to automatically log on with, and then click OK.
    • Click OK again and you're all done.
  2. Each machine should contain a folder named C:\BoxLab.
  3. The folder should have these files:
    • BoxLabSoftware (folder)
    • HandLens (folder)
    • Reboot.bat
    • ThreadedAudioZipper.bat
    • ThreadedVideoZipper.bat
    • TimeSynchronize.bat
    • EnableScheduledTasks.bat
    • DisableScheduledTasks.bat
  4. BoxLab Applications are set to run as Scheduled Tasks when the system detects that they are idle. The file "EnableScheduledTasks.bat" can be used to simultaneously activate all required programs in the Task Scheduler. Likewise, "DisableScheduledTasks.bat" is used to deactivate these programs all at once. Enabling and disabling tasks is helpful in debugging BoxLab applications; however, to prevent accidental disabling of tasks, it is recommended that you add the "EnableScheduledTasks.bat" to the system startup menu.
  5. To monitor whether a specific task is set to run, it may be convenient to create a shortcut to Scheduled Tasks on the system Desktop. You can accomplish this by opening the Control Panel, right clicking on Scheduled Tasks and selecting Create Shortcut.
  6. The Scheduled Tasks on the list includes:
    • ThreadedAudioZipper
    • ThreadedVideoZipper
    • TimeSynchronize
    • RunHL
  7. The ThreadedAudioZipper and ThreadedVideoZipper are job files that run the *.bat files in the C:\BoxLab folder. The corresponding *.py files are Python scripts that depend on the components installed under AudioVideo Capture. Be certain the corresponding *.bat files correctly references the installed location of the Python interpreter. The *.bat file is formatted as: "{python interpreter location}" "{script name}" "{data destination}" n {n+1 . . . }. The variable "n" is an integer referring to the device ID for the audio or video stream to be recorded. A theoretically unlimited number of sources is supported; in practice, however, only one or two is used. A sample batch file is shown below.
    • "C:\Python24\python" "C:\PlaceLab\" "E:\KioskData" 0
  8. TimeSynchronize.bat uses the Windows XP built in server time function to synchronize the clock times for each of the kiosks. This batch file should be scheduled to run every 10 minutes while the kiosks are online. The network route used for synchronization is the IP address of the master kiosk. A sample TimeSynchronize.bat file follows:
    • @ECHO OFF
    • rem Script to synchronize system time with Boxlab28 without any user prompts
    • rem run this on all BoxlabXX in windows scheduler every night
    • ECHO Attempting to synchronize clock...
    • ECHO
    • net time /set \\ /yes
  9. Reboot.bat can be used to shut down the system at a regular pre-determined time (typically around 4am). On the present kiosks, this task is not enabled because the boxlab machines are currently using a freeware program called "Switch Off." For informational purposes, a sample reboot.bat file is shown below:
    • @ECHO OFF
    • ECHO Attempting to restart computer...
    • shutdown -r -f -t 3
  10. Handlens(e) is the current implementation of the data collection and visualization software in use by BoxLab. It can be found in C:\BoxLab\Handlens. Handlens(e) should be set to run in data recording mode on each kiosk. Note that simply launching the Handlens(e).exe application is not sufficient to enable the feature. A batch file called RunHL.bat is provided to correctly launch Handlens(e) recording applications. Each kiosk must include a subfolder called "Templates" located in C:\BoxLab\Handlens. In this Templates folder there is a "default.tstp" that will redirect Handlens(e) to the desired runtime template specified as follows:
    • Templates\StandardRuntime.stp, Templates\ServerRuntime.stp, or etc.
  11. The template file is used to tailor file recording and data capture preferences to each kiosk. The xml nodes allow the administrator to enable or disable the recording, forwarding, and receiving of data from MITes, OneWire, RFID, and other sources. The local data node is used to determine if local recording is active and to specify the ports (and channels) used by the receivers. Forwarding of received sensor packets to the master kiosk can be enabled in this node by setting the TCP IP address and designated port number for the master kiosk. Under the remote data node, the master kiosk (and typically only the master kiosk) can be set to listen for sensor data forwarding on the ports configured on the non-master kiosks. For the machines to record data locally, the filesave setting must specify a root path to the folder where the data will be saved, and specific data types to be recorded must be set to true. The last setting to consider is the status report option under the processes node. The master kiosk (with an external internet connection) may be set to send hourly email reports to the researchers on the operating state of the kiosks.
  12. When deploying sensors in a new environment, make a *.jpeg floorplan file and use the SensorMapEditor to document the location, type, and ID of the sensors in use. This application can be used to export a *.smap file which is used by Handlens(e) to visualize the sensor data. This document must be placed in the Handlens\SensorMap folder.