iRule Device Upload
iRule Device Upload
This tutorial covers how to upload a single file that contains the commands for a single device. This tutorial refers to an example file that can be downloaded from the download page. The iRule file format is an XML file that can be edited from any text editor.
- Open text editor.
- Download example file.
- Open example file.
- Edit header information.
- Edit Device codes.
Step One: Open Text Editor
You can edit the file using any text editor. If you are on a PC we suggest using the Microsoft XML Notepad 2007 editor. You can download the XML editor from here.
Step Two: Download Example file
Download the example iRule Device XML file from downloads page. Open the iRule Device example file in a text or XML editor.
Step Three: Open File
Open example Device XML file.
Step Four: Edit Header
A properly formatted XML file will have two components: header information identifying the device and the codes associated with that device.The header information defines the Device characteristics and must be edited to describe the Device.
- id - under the Device you do not edit the id number. If you change the number to anything other than zero (the default number in the example file) your upload may fail.
- name - Please edit the name of the device to identify what it controls.
- type - By default the device type is Unknown Type. You can edit this from the Device list in the iRule Builder after you upload the Device.
- fixed - Do not edit this field, leave it as false.
- vendor - Edit this field to identify the vendor of the Device.
- model - Edit this field to identify the specific model or family of models that this Device controls.
Step Five: Edit Codes
Each Device can contain four types of codes: Gloabl Cache, Hex, Network and Database Codes. Each code type has specific formatting and should be used depending on the requirements of the Device to be controlled. You will need to edit the codes and enter the name of the command and the actual command.
- Global Cache Codes - These are IR codes that are formatted for the Global Cache lineup of Gateways. Please note that the command begins from the frequency. An example code looks like: 34500,1,1,34,48,24,12,24,960,24,12,24,960,24,12,24,960,24,12,24,960
- Hex Codes - These are IR codes in the Pronto learned code format. An example codes looks like: 0000 0073 0000 0014 0060 0020 0010 0020 0010 0010 0010 0010 0010 0020 0030 0010 0010 0020 0020 0010 0010 0010 0010 0020 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 09B7
- Network Codes - These are codes that are simply passed to a Gateway. These codes can be used to control both Ethernet IP devices as well as serial devices. These codes can be in either ASCII or hexadecimal format. Hexadecimal commands are notated by \x followed by two characters. As an example the hexadecimal command for Carriage return is \x0D
- Database Codes - These are IR codes used by iRule and are not open to end users.
Main Menu
iRule Newsletter
Follow Us
Last 2 tweets from iruleathome:
