Home -> FPP plugins page -> commander.swf
This plugin is completely free for use in any context or connection.
commander.swf
FPP external plugin for keeping track of pano movement like panning, tilting and zooming. The plugin can then trigger actions with FPP commands or functions depending on how the viewer moves in the pano. This can also be combined with event timers to induce delayed actions. Also lack of user activity can be trapped to trigger actions.

Plugin parameters can be read from the FPP xml file or from an external xml file.

The following parameters are supported:

xmlfilexmlfile=commands.xmlread parameters from XML file
actionaction=...adds an action, see below for action format
activatedactivated=0starts or stops action checking
(0 or 1, anything else will toggle activation)
intervalinterval=100check interval (ms), default=200
removeremove=102remove a single or all action(s) (action-id or "all")
resetreset=allreset a single or all action(s) (action-id or "all")
enableenable=102enable a single or all action(s) (action-id or "all")
disabledisable=102disable a single or all action(s) (action-id or "all")
tracetrace=1prints debug info


NOTES:
Parameter names are not case sensitive ("XMLFile" is equal to xmlfile").

The following parameters can be updated dynamically from FPP:
action
interval
remove
reset
enable
disable
activated


"action" parameter format:
--------------------------

In FPP xml file:
action=id|enabled|panoname|delay:flag|pan:range|tilt:range|zoom:range|inactivity|repetition|commandIn|commandOut

In external xml file:

<?xml version = '1.0'?>
   <commander activate="1" interval="250" trace="0">
      <actions>
         <action 
            id="101" 
            enabled="1"
            repetition="1" 
            panoname="../stadshuset/img/stadshuset1" 
            pan="133:15" 
            tilt="0:30" 
            zoom="" 
            delay="10:2" 
            commandIn="global.showQmark()"
            commandOut="global.hideQmark()#activate=102"
         />
         <action 
            id="109" 
            inactivity="15"
            commandIn="global.panToExit()"
         />
         ...
         <action id="107" repetition="1" panoname="../stadshuset/img/stadshuset1" pan="133:15" 
            tilt="0:30" enabled="0" commandIn="global.showEmark()" 
            commandOut="global.hideEmark()#activate=103"
         />
         ...
      </actions>
   </commander>


The following subparameters/attributes are supported for an action:
idmust be a number (used as internal reference and to remove, reset, enable and disable an action
enabled0=action disabled, 1=action enabled (default=1)
repetitionnumber of times an action may be triggered (0-nnn, default=999)
panonamelimit action to this pano (same as hotspot "linked" parameter)
panlimit action to this pan range, format "pan:range", example: pan="130:20" will
trigger action in the pan range 110 - 150.
tiltlimit action to this tilt range, format "tilt:range", example: tilt="-10:20" will
trigger action in the tilt range -30 - +10.
zoomlimit action to this zoom range, format "zoom:range", example: zoom="1.5:0.5" will
trigger action in the zoom range 1.0 - 2.0.
inactivityaction will be triggered when no change in pan, tilt or zoom has been made in the
specified number of seconds. Normally not used together with other requirements.
delayvalue (in seconds) for delayed action, format "delay:flag". Can be used alone simply to delay an action,
or together with other attributes (pan, tilt, zoom).
flag, can be 0, 1 or 2 (default=0)
0: launch action with delay AFTER all other requirements are met
1: launch action after delay OR if other requirements are met (whichever happens first)
2: don't start checking other requirements UNTIL delay has passed
commandIncommand(s) to execute when an action is triggered
commandOutcommand(s) that will execute when action gets "untriggered", for
example when the user leaves the triggering pan range.

NOTE:
The command fields may consist of FPP commands and/or plugin dynamic parameters. Remember that
all FPP commands must come first and that parameter settings must start with a "#" (see examples
in plugin XML file).

As you can't use the &;= characters inside parameters in the FPP XML file, you have to encode them as follows:

& as %26
; as %3B
= as %3D


Version history:

1.21:
Fixed problem with panoName when a new pano is loaded.

1.20:
Implemented a more accurate timer function.

1.11:
Fixed bug when getting name of pano and "disableLoading=1" was used.

1.10:
Added "inactivity" parameter to trigger action when no change in pan, tilt or zoom has been made for a specified number of seconds.