Legacy HTTP API. Acclaim Lighting PHAROS VLC, PHAROS LPC X, PHAROS TPS, PHAROS EXT, PHAROS TPC, PHAROS LPC
광고
광고
Pharos Designer User Manual
Legacy HTTP API
Using the Legacy API, the following interaction between Custom web interfaces and the controller's project can be setup.
Firing Triggers
Custom web pages can trigger the Controller by creating a hyperlink to "/trigger/xyz", where "xyz" is the trigger number, as set in Triggers. Clicking on this hyperlink will fire the numbered trigger, if it exists, but will not cause the page to refresh so there is no need to use Java Script tricks to prevent the page from flickering.
By default, conditions are tested when firing a trigger in this way, but this can be disabled by specifying
"conditions=0" in the URL query string. For example, "/trigger/1?conditions=0" will fire trigger 1 regardless of whether its conditions are satisfied.
Firing Triggers With Variables
You can capture variables and inject them into the numbered trigger by specifying a "var" field in the query string.
The value of this field is expecting a comma-separated list of values, with each value in the format "abc:def" where
"abc" is the captured value and "def" is the range of the value (optional). If the value of "abc" is not a number, it is treated as 0. If value of "def" is not a number, it is treated as 255.
For example, the URL "/trigger/1?var=14" will fire trigger number 1 and will inject the value 14. If this trigger had a
Start Timeline action that expected a variable to select the timeline, then it would start timeline 14.
In another example, the URL "/trigger/2?var=50:100" will fire trigger number 2 and will inject the value 50. If the variable is used by an action that is expecting a value within a range, for example Set intensity expecting a level between 'off' and 'full', then the injected variable will be treated as 50% since 50:100 = 50%.
You can also inject multiple variables. For example, "/trigger/2?var=50:100,3,4:16" will inject 50 (50%), 3 and 4
(25%).
If you want to inject a string to a variable, for example if you want to set the contents of a text slot, the characters must be bound by double quotes ( " or %22 if using character escaping). To include a " in the injected string you must prefix it with a backslash. To include a backslash, write two backslashes. Here are some examples for injecting strings:
/trigger/1?var="hello" -> (hello)
/trigger/1?var=%22hello%22 -> (hello)
/trigger/1?var="hello \"world\"" -> (hello "world")
/trigger/1?var="hello\\world" -> (hello\world)
Anything after the closing " and before the next comma is ignored:
/trigger/1?var="hell"o,"world" -> (hell),(world)
If a closing quote is missing, the remaining string is used:
/trigger/1?var=1,"hello,2 -> (1),(hello,2)
Directly Controlling Outputs
Custom web pages can also directly control Timelines and Scenes without having to create triggers.
- 576 -
Legacy HTTP API
The options available are:
Start Timeline, Release Timeline, Pause Timeline, Resume Timeline, Start Scene and Release Scene
To perform these actions you can either type the URL directly into the address bar or set up a hyperlink with the relevant link:
Timelines
URL is of the form <ip_address>/timeline/<action>/<usernumber>
Possible actions are start, release, pause and resume. The release action also has an optional 'fade' field in the query string
Scenes
URL is of the form <ip_address>/scene/<action>/<usernumber>
Possible actions are start and release. The release action also has an optional 'fade' field in the query string
Examples
192.168,0.2/timeline/start/1
192.168.0.2/scene/release/2?fade=3
- 577 -
다운로드
광고