Commands are sent to devices at the IP address and port specified. It is recommended to use the pre-defined command section associated with the device, rather than manually entering commands throughout your project.
You can access the pre-defined commands module using the
Commands can be organised into folders - there is a default folder called
Commands which can be renamed, and new folders can be created using the
New Folder button. The last folder selected will be the one that
new commands are added to - whether individually, or using the import methods discussed below.
Every command has the following:
Command Name - this is the name given to the command, for convenience. Command names must be unique within a device, even if they are in different folders. There is an optional
Name Prefixfield which can be used. This simply includes the prefix before the entered command name when adding / editing - for example if the prefix was
TV1_and the command name was
POWERONthen the command name would become
TV1_POWERONwhen added. This is particularly useful when importing command files, to ensure that command names remain unique & are named logically, by using the prefix which is added to the start of each imported command name.
Command Data - this is the actual data which is sent to the device across the IP network when the command is executed. Command data may be entered in ASCII (text) format, and/or hexadecimal byte format, see below.
Adding / Editing Commands
To add a command, enter the command name / data and click
Add. To edit an existing command, select the command, edit the name/data and click
DemoPad maintains an online forum which contains many command files for different equipment. HDMI Matrices, amplifiers, IR commands for TVs etc are all there. In most cases the recommended approach is to obtain a pre-saved command file & import it into your project (or to use a pre-saved Device, which would already have the commands entered). If however you need to enter commands manually, it is necessary to discuss the various command protocol notation which is common in the industry.
ASCII (text) commands - these are usually easily recognised as being textual in nature, for example the command:
PWR ON(which is an Epson projector power on command) or
@MAIN:PWR=On(which is a Yamaha amplifier power on command) are both examples of text commands. Typically, such text commands require a carriage return (hex 0D) and/or line feed (hex 0A) character at the end, which forms part of the command. The default command suffix for the device of
Byte based commands - Byte based commands are entered in hexadecimal (hex) format with a
\xpreceding an uppercase 2 digit representation of the byte value. For example, an uppercase
Mis transmitted as a hexadecimal byte
4D(please refer to ascii character codes online) which is written in DemoPad as
\x4D. There is no difference between using the character
Min a command, or using
\x4D- the exact same data is transmitted.
However, some device commands contain byte values which do not represent characters, hence they have to be written in
\x format, eg
Hex values are sometimes written differently in protocol documents, here are some examples & how they should be entered in DemoPad:
0x02 0x05 0xfe 0x34 or
02 05 FE 34 or even
should all be entered as
You may also see these common text representations of certain characters:
\r both usually mean:
\x0D (carriage return)
\n both usually mean:
\x0A (line feed)
Altering Commands with Find / Replace
It is possible to alter one or more commands with the Find/Replace function. A typical example might be to alter an IR code to emit out of a different port. If we take the following IR command for a TV POWER ON:
This is an IP command to be sent to a Global Cache IP2IR device which instructs it to emit an IR code. The numbers in the command represent the IR code frequency, repeat count, and specific IR pulses to be sent.
sendir,1:2 part of the command tells it to use port 2. If we wanted the code to be emitted out of port 3, we would need to change the command to say
sendir,1:3 at the beginning.
Rather than making this change individually on each command, we can instead use the checkbox against several commands (or an entire command folder) and then use Find/Replace to replace all occurrences of
sendir,1:3. This will alter all the checked commands at the same time.
Saving / Importing Command Files
Once you have entered commands for a particular device, it is advisable to save the command file for use in other projects, or to upload to our forum for other users to utilise. Either select one or more commands / folders
with the checkboxes, or select none to save everything, and choose the
Export to file option. This will save a file of type
.dc1 which is the DemoPad command file format.
To import a
.dc1 file containing commands, use the
Import from File option. Before doing so, select the command folder you wish the commands to be imported into, and it is recommended that you use the
to ensure all the commands starts with the same text - making them unique, and descriptive. Note if you attempt to import any commands which have the same name as existing commands within the device,
even if the commands are in different command folders, then the command data for those commands will be overridden with the imported command data. You will be prompted that this is about to happen, and have the option
of cancelling the operation if desired.
Importing Text Command Files
It is also possible to use the
Import txt File option to import a text file containing the commands. The command file must be in the format:
[[Command Name]][TAB][Command Data] [[Command Name]][TAB][Command Data] [[Command Name]][TAB][Command Data]
- Note the command name must actually be in [ ] brackets.
This is the same format that the iLearn software from Global Cache exports learned IR commands, making it convenient to import from there, though you can create your own files if you wish.
It is also possible to import from Global Cache's Control Tower IR database, by creating a text file containing the email which is sent from the Control Tower system and also using the
Import txt File option -
the file will be recognised as having come from Global Cache & will be imported.