Remote Control
If you do not have an
FIG. 47 Settings menu - Enable Network API
When enabling the network API via XPress, the TCP port number is also 1234.
This assumes that the control variable is the default name (“menu”) and you want to switch the content to one with the
ID equal to “P1”. \r\n means you send the characters with ASCII code 13 (CR) and 10 (LF) to terminate the command. This can be tested with the telnet utility, which sends this sequence when you press Enter.
The network API also supports setting shared variables via an HTTP GET request. This method does not allow persistent connections, but it is easier to access from a client scripting language supporting the XMLHttpRequest API, such as JavaScript in web browsers.
To generate a command equivalent to the one above, enter the following URL in a web browser:
Example: Testing
To test, publish the menu_media.svg template file to an
For more information on enabling the network API, please refer to the
While on the configuration home page (status), note the IP address. Assuming the IP address of the
telnet 192.168.1.10 1234 Trying 192.168.1.10...
Connected to
UPDATE "menu" "P1" ^]
telnet> quit Connection closed.
As soon as you hit enter after the update command, the display should switch for 5 seconds, then revert to the default page.
To test the HTTP GET method with the previous example, enter the following URL in a web browser:
http://192.168.1.10:1234/update?menu=P1
The GET method can also be embedded in an HTML page. The example below will let you switch the document each time you click on the button.
36 | Inspired XPress - Programming Guide |