SOS Projector Control
The newest Science On a Sphere (SOS) projector control debuted in the 5.2.0 release and is a refinement of the previous projector control. It provides improved user feedback and control of SOS projectors that use the “PjLink” or “PjTalk” protocols.
This software is automatically included with SOS during installation or upgrade, however the package is also available separately in its own debian package. This means that it is also available to previous SOS versions on Ubuntu 16.04.
Application LayoutPermalink to Application Layout
The application is split into two main interfaces: a control interface and a configuration interface. Tabs at the bottom of the application may be used to toggle between the two interfaces.
Control InterfacePermalink to Control Interface
The control interface is simple and provides feedback on each projector’s state. The components of the control interface are: a power switch, status indicators for each projector, and a button which may be used to refresh the projector states.
The projector status indicators use color to signal which of three possible states the projector is in:
- Yellow (Standby)
- The projector is in standby mode and ready to receive control commands
- Green (On)
- The projector is on and ready to receive control commands
- Red (Error)
- An error has been encountered with the last command sent to the projector
Typical reasons for errors include: no connection to the projector, the projector is rejection connections, the connection is timing out (default 3 seconds), or the incorrect port/protocol is being used with the projector.
Configuration InterfacePermalink to Configuration Interface
The configuration (config) interface is a tab where projector connection information may be specified. A default configuration is provided with the installation and the configuration consists of four PjLink projectors with host names “projector1”, “projector2”, “projector3”, “projector4”. This configuration should just work for most sites because those host names are correlated to the correct projector IP addresses in the “/etc/hosts” file. Some sites, however, may need to do additional configuration or revert to the previous projector control if their projectors do not support PjLink or PjTalk.
There are really only two types parameters for each projector: host parameters and protocol parameters. The host parameters specify how the projector will be identified, while the protocol parameters specify the communication protocol.
Host ParametersPermalink to Host Parameters
Under Host Parameters, the projector may be referred to by its hostname or by its IP address. To refer to a projector by hostname, select the Use hostname radio button and type in the hostname of the projector. To refer to a projector by IP address, select the Use IPv4 address radio button and use the four spin boxes to set each octet of the IP address.
For example, the typical IP address of projector1 is 10.1.1.71. You can refer to the projector by hostname projector1, or you could select the Use IPv4 address radio button and enter 10 1 1 71 into each spinbox, respectively. The configuration is equivalent, but it’s usually easier to remember machines by hostname that by IP.
Protocol ParametersPermalink to Protocol Parameters
Under Protocol Parameters, the PjLink or PjTalk protocol may be selected. Leaving the Port set to Auto (or 0) tells the controller to use the default port for the selected protocol. The default PjLink port is 4352 and the default PjTalk port is 53484.
Projector configurations may be updated using the Save button and deleted using the Delete button. New projector configurations may be added using the New Projector button. When the New Projector button is pressed, the config tab will add a new entry at the bottom of the tab and try to scroll down to it. An actual controller and status indicator will not be added until the configuration is successfully saved.
Only one entry per IP or hostname is allowed, however, there is no verification that checks whether or not a particular IP is associated with a hostname or a hostname with an IP.
Configuration FilePermalink to Configuration File
The SOS Projector Control loads and saves projector configurations to a file located at /etc/NOAA/sos-projector-control/sos-projector-control.conf. This file should not need to be hand edited. Changes made to the configuration file will persist across projector control upgrades.
NOTE: The configuration file will be removed if the the projector
control package is purged (via
sudo apt purge sos-projector-control). If you
would like to remove the projector control and keep your configuration file,
just remove the package (via
sudo apt remove sos-projector-control).
StartupPermalink to Startup
The installer will attempt to put desktop launchers on the desktops of the sos and sosdemo users. Double-clicking the SOS Projector Control desktop icon will launch the application.
When the SOS Projector Control is first started, it tries to obtain and display the status of each projector. If it determines that all the projectors are on, the power switch will automatically be moved to the On position. Otherwise, the power switch will remain in the Off position and each projector’s individual status will be displayed.
Thereafter, the projector control will try to keep the status indicators fairly current by checking the status of each projector every 90 seconds. The statuses can also be refreshed on demand with the Refresh Status button.
Command Line InterfacePermalink to Command Line Interface
The control may also be used from the command line. Opening a terminal, typing
launch_pj_control, and pressing Enter will start the application. Passing an
off to the application will make the application attempt
to turn on or off each projector in the config file, then exit. This is useful
for turning on and off projectors with the crontab.
For example, to send the “on” command to each projector in the config file, run:
To send the “off” command to each projector in the config file, run:
Using the projector control in the crontabPermalink to Using the projector control in the crontab
Using the projector control in the crontab is similar to running it from the command line. One difference is that you’ll need to use the full path of the executable and set the display environment variable to that of the desktop.
Since the desktop display is on X screen :0, the command becomes:
env DISPLAY=:0 /usr/bin/launch_pj_control
Therefore, if you would like to turn on your projectors every day at 7:30 and off at 5:30, add the following lines to your crontab.
# Turn projectors on at 7:30am 30 7 * * * env DISPLAY=:0 /usr/bin/launch_pj_control on > $HOME/soslogs/projector_ctl.log 2>&1 # Turn projectors off at 5:30pm Monday - Saturday 30 17 * * * env DISPLAY=:0 /usr/bin/launch_pj_control off > $HOME/soslogs/projector_ctl.log 2>&
Good references for crontab formatting can be found online, but contact us if you’re having issues just e-mail firstname.lastname@example.org.
Reverting to the Old Projector ControlPermalink to Reverting to the Old Projector Control
When upgrading from SOS 5.1.0 or 5.1.1, the new projector control installer will backup your old projector control desktop launcher before installing its own. In the event that the projector control doesn’t work with your projectors, you may revert to the previous projector control by opening a terminal and running the command:
mv ~/Desktop/.Projector_Control.desktop ~/Desktop/Projector_Control.desktop
The old desktop launcher should then appear on your desktop.
Known IssuesPermalink to Known Issues
- No title bar on application: sometimes when the application is started, there is no title bar. This prevents a user from moving or closing the window. To get the title bar to show up, toggle between the config and control tabs. This breaks that application away from the top of the screen
- Projector status indicators don’t show up in the same sequence as when they were added: When adding new projectors to the projector control, they will be appended to the end of the config tab and corresponding status indicators will be added to the next available position in the control tab. However, when the application is closed and re-opened, the status indicators are then in alphabetical order. This is due to the fact the the projector configurations are always saved alphabetically, then loaded in that order
- The projector control resizes when switching tabs: this is the intended behaviour. We try to keep the window small and unobtrusive when in the control tab, but expand it so that the configuration panel fits into view when in the config tab
- The projector control doesn’t look exactly like the screenshots: the application uses a framework that tries to take local operating systems preferences into account when displaying itself. The exact look of your projector control may vary according to those preferences
- Projector control is slow to start: this usually occurs if the the control cannot talk to the projectors. The control tries to update its status before showing itself and if the control can’t reach the projectors, a timeout must be overcome. This issue will be fixed in future versions