Device Commands

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 View/Edit button:

Pre-Defined Command Module

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.

Command Components

Every command has the following:

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 Update

Command Data

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.

However, some device commands contain byte values which do not represent characters, hence they have to be written in \x format, eg \xFE

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 0205fe34

should all be entered as \x02\x05\xFE\x34

You may also see these common text representations of certain characters:

<CR> or \r both usually mean: \x0D (carriage return)

<LF> or \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.

The 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:2 with 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 Name Prefix 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]

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.