Skip to main content

iRidi API. Drivers

Functions, methods, and properties for working with equipment configured in the project: creating and managing drivers, sending commands, and processing incoming data

Methods​

IR is a global object containing all iRidi API functions and constants. Its driver methods let you create a driver and access a driver in an iRidi project. Many methods operate on a reference to an existing driver.

You can enter a driver, command, feedback, or token reference manually, or obtain it by dragging the item into the JS editor (see instructions.

IR.CreateDevice​

Create a driver in the iRidi project. Only AV & Custom Systems drivers can be created this way. Other drivers must first be added to the project from the database. Attention! In iRidium V2, this function used a different syntax. iRidi V3 supports the old syntax, but its use is not recommended.

Syntax

IR.CreateDevice(type, name, {properties})

InputValueDescription
typeIR.DEVICE_CUSTOM_TCPtype: object
driver type
name"AV Driver 1"type: string
unique driver name
propertiesHost: '192.168.0.47', Port: 80type: array
comma-separated driver parameters
Output
Object[object DevicePrototype]type: object
reference to the driver as an object

Example

IR.AddListener(IR.EVENT_START,0,function() {
var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_TCP, "AV Device (TCP)",
{Host: "192.168.0.47",
Port: 80,
SSL: false,
SendMode: IR.ALWAYS_CONNECTED,
ScriptMode: IR.DIRECT_AND_SCRIPT,
SendCommandAttempts: 0,
ConnectWaitTimeMax: 3000,
ReceiveWaitTimeMax: 5000,
Login: "admin",
Password: "admin"
});
IR.Log(driver); // [object DevicePrototype]
});

Notes

Tip
  • the set of parameters differs between drivers
  • if a parameter is omitted, its default value is used (for example, you can specify only Host and Port when creating a driver)
  • the driver will not be created if you attempt to create it before the application startup event IR.EVENT_START.
  • if you create a driver after application startup rather than on IR.EVENT_START, you must call .Connect() for that driver to connect to the equipment. Drivers created at application startup connect automatically. If necessary, they can be disconnected using .Disconnect().
  • creating a driver takes some time, so data cannot be sent through it during the first few milliseconds; send data on IR.EVENT_ONLINE.

AV & Custom Systems parameters​

AV & Custom Systems (TCP):


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_TCP, "AV Device (TCP)",
{Host: "192.168.0.47",
Port: 80,
SSL: false,
SendMode: IR.ALWAYS_CONNECTED,
ScriptMode: IR.DIRECT_AND_SCRIPT,
SendCommandAttempts: 0,
ConnectWaitTimeMax: 3000,
ReceiveWaitTimeMax: 5000,
Login: "",
Password: "",
DisableQueue: false
});

AV & Custom Systems (UDP):


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_UDP, "AV Device (UDP)",
{Host: "192.168.0.47",
Port: 80,
LocalPort: 80, // port on iRidium side for data receiving
Group: null, // null - broadcast, "host" - multicast group
Multicast: false, // false - broadcast, true - multicast (if multicast group added)
ScriptMode: IR.DIRECT_AND_SCRIPT
});

AV & Custom Systems (HTTP):


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_HTTP_TCP, "AV Device (HTTP)",
{Host: "192.168.0.47",
Port: 8080,
SSL: false,
Login: "",
Password: "",
DisableQueue: false,
SendCommandAttempts: 0,
ConnectWaitTimeMax: 3000,
ReceiveWaitTimeMax: 5000,
UserAgent: ""
});

AV & Custom Systems (RS232):


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_SERIAL, "AV Device (RS232)",
{PortName: "\\\\.\\COM1", // double slash "\\" will be converted
// to single slash "\". Result: "\\.\COM1"
BaudRate: 9600,
DataBits: 8,
Parity: 0,
StopBits: 0,
Use485: false // works with RS485, not RS232
});

AV & Custom Systems (TCP Server):


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_SERVER_TCP, "iRidium TCP Server",
{Port: 2323,
MaxClients: 10 // maximum of clients connected at the same time
});

To create a server with SSL, enable SSL after creating the driver using SetParameters


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_SERVER_TCP, "iRidium TCP Server",
{Port: 2323,
MaxClients: 10 // maximum of clients connected at the same time
});
driver.SetParameters({SSL:3});

Note

A server with SSL can run only on iRidi Server

AV & Custom Systems (UDP Server):


var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_SERVER_UDP, "iRidium UDP Server",
{Port: 2323,
MaxClients: 10, // maximum of clients connected at the same time
ClientTimeOut: 100 // (ms) when the Client will be disconnected if it doesn't send data
});

Constants in driver settings​

Send Mode

  • IR.ALWAYS_CONNECTED = 0; - the driver remains connected and can receive and send data.
  • IR.CONNECT_WHEN_SENDING = 1; - the driver connects when sending, then disconnects; it can only send data.

Script Mode

  • IR.DIRECT_AND_SCRIPT = 0; // Commands can be sent through scripts and through editor channels
  • IR.SCRIPT_ONLY = 1; // Commands can be sent only through scripts

Background Mode

  • IR.BACKGROUND_OFF = 0; // The driver runs only while the application is in the foreground
  • IR.BACKGROUND_ON = 1; // The driver runs while the application is in either the foreground or background

IR.GetDevice​

Access any driver in the iRidi project. Works with all drivers, not only those created using IR.CreateDevice.

Syntax

IR.GetDevice(name)

InputValueDescription
name"Driver 1"type: string
driver name in the iRidi project
Output
Object[object DevicePrototype]type: Object
driver reference

Example

var myDriver = IR.GetDevice("AMX");
var myDriver1 = IR.GetDevice("HDL-BUS Pro Network (UDP)");
IR.Log(myDriver); // [object DevicePrototype]
IR.Log(myDriver1); // [object DevicePrototype]

Notes

Tip

HDL, Domintell: use the network name "HDL-BUS Pro Network (UDP)" / "Domintell Network (UDP)", not the name of an individual device on the network.

The following methods can be applied to a driver reference obtained using IR.GetDevice.

.Connect​

Establish a connection to the equipment

Syntax

IR.GetDevice(name).Connect()

| Input | Value | Description |

Output
successtype: Boolean
success

Example

IR.GetDevice("AV & Custom Systems (TCP)").Connect();

Notes

Tip

a connection is established automatically after the driver is created

.Disconnect​

Disconnect from the equipment

Syntax

IR.GetDevice(name).Disconnect()

InputValueDescription
name"Driver 1"type: string
driver name in the iRidi project
Output
successtype: Boolean
success

Example

IR.GetDevice("AV & Custom Systems (TCP)").Disconnect();

.Send​

This method works only with AV & Custom Systems and Global Cache drivers. It sends an arbitrary set of data (string, number, array) to the equipment

Syntax

  • IR.GetDevice(name).Send([data])
  • IR.GetDevice(name).Send(array)
  • IR.GetDevice("Global Cache").Send([data], transport)
InputValueDescription
name"Driver 1"type: string
driver name in the iRidi project
dataa, b, ctype: string
list of variables or strings: instructions to send
array[a, b, c]type: array
array of variables or strings: instructions to send
transport0type: number
transport identifier. Used with Global Cache to send data to a specific destination:
* 0 - port 4998 (IR commands, relays, sensors, system)
* 1 - port 4999 (COM 1)
* 2 - port 5000 (COM 2)
Also used on iRidi Server and in the Custom TCP Server driver. Selects which connected client receives the data: 0 - all, 1..n (client ID received in IR.ACCEPT_CLIENT) - a specific connected client
Output
successtype: Boolean
success

Example

// AV & Custom Systems (TCP, UDP, RS232)
IR.GetDevice("AV Device").Send(['instruction', '\r\n']);


// AV & Custom Systems (HTTP)
// <Type or request>,<URI>,<Data> devided by "," so u cannot use "," inside of <URI> and <Data>
IR.GetDevice("AV Device").Send(['GET,URI']); // GET
IR.GetDevice("AV Device").Send(['POST,URI,Data']); // POST
IR.GetDevice("AV Device").Send(['PUT,URI,Data']); // PUT


// Global Cache:
// IR.GetDevice("Global Cache").Send(<DATA>, <TRANSPORT ID>)
IR.GetDevice("Global Cache").Send(['setstate,1:1,1', '\r\n'], 0)
// iRidium Server:
// IR.GetServer().Send(<DATA>, <TRANSPORT ID>)
IR.GetServer().Send(['command', '\r\n'], 1)

Notes

Tip

HTTP: when sending a command to an HTTP driver, begin with the request method: GET, POST, PUT, followed by a comma and the command URI, then Data for POST and PUT. Commas cannot be used within URI or Data. If your protocol uses commas in HTTP commands, send them through AV & Custom Systems (TCP), constructing complete requests. Global Cache: always specify the transport ID to which the data should be sent

.SendEx​

This method works only with AV & Custom Systems (HTTP) drivers. It sends an array of data to the equipment with a reference to the parent object (execution context). SendEx can include events that pass information about their operation to functions. These events let you monitor data received from the HTTP server and process the various stages of interaction with it.

Syntax

IR.GetDevice(name).SendEx(params, context)

InputValueDescription
name"Driver 1"type: string
driver name in the iRidi project
params{a, b, c}type: object
parameters to send
contextthistype: object
object (this) for the function call
Output
-

Example

//Example 1:

var context = {
appleCount: 10,
key: 777,
}

var params = {
Type: "POST",
Url: "/html/login",
Data: ["Password=2007&name=authform&Login=admin"],
Headers: {"Content-Type": "application/x-www-form-urlencoded"},
cbReceiveText: function(text, code, headers) {IR.Log("cbReceiveText "+text+code+headers); IR.Log(this.key)},
cbReceiveData: function(data, code, headers) {IR.Log("cbReceiveData "+data+code+headers);},
cbReceiveCode: function(code) {IR.Log("cbReceiveCode "+code);},
cbReceiveKey: function(key,value) {IR.Log("cbReceiveKey "+key+value);},
cbReceiveStartBody: function(stream) {IR.Log("cbReceiveStartBody "+stream);},
cbReceivePartBody: function(stream) {IR.Log("cbReceivePartBody "+stream);},
cbReceiveEndBody: function(size) {IR.Log("cbReceiveEndBody "+size);},
cbTimeOut: function() {IR.Log("cbTimeOut");},
cbReceiveStream: function(stream, code, headers) {IR.Log("cbReceiveStream "+stream+code+headers);}
}

IR.GetDevice("Server REST").SendEx(params, context)

//Example 2:

IR.GetDevice("Server REST").SendEx({
Type: "GET",
Url: "/json/ok/server/channel",
Headers: {"Cookie":"ir-session-id=o8lKdEvw2ZlU"},
cbReceiveText: function(text, code, headers) {IR.Log("cbReceiveText "+text);}
});

Params

The parameters to send are specified using the following variables:

ParameterValueDescription
Type"GET" / "POST" / "PUT"Request type.
Url"/html/login"Path to the requested object.
Data["Password=2007&name=authform&Login=admin"]Additional parameter available for POST and PUT requests.
Header{"Cookie":"ir-session-id=o8lKdEvw2ZlU"}Create standard and custom HTTP request headers.
cbReceiveDatacbReceiveData: function(data, code, headers){IR.Log("Получение данных в формате Data: Code ответа от сервера: " + code + " Данные: "+ data);}DATA receive handler, with parameters: data - data, code - server response, headers - headers.
cbRecieveTextcbReceiveText: function(text, code, headers){IR.Log("Получение данных в формате Text: \n Code ответа от сервера: " +code + "\n Данные: " + text + "\n Заголовки: " + headers);}TEXT receive handler, with parameters: data - data, code - server response, headers - headers.
cbRecieveKeycbReceiveKey: function(key, value){IR.Log("Заголовки : "+ key + "\n Значение заголовков: "+ value);},Header handler, with parameters: key - header, value - header value.
cbReceiveCodecbReceiveCode: function(code) {IR.Log("Code ответа от сервера: "+code);},Server response handler, with parameter: code - server response.
cbRecieveStartBodycbReceiveStartBody: function(){}Function called when stream processing starts.
cbRecievePartBodycbReceivePartBody: function(stream) {IR.Log("Получение данных в формате ByteStream(Обьект данных): "+stream);},Function for processing and receiving the stream body.
cbRecieveEndBodycbReceiveEndBody: function(size) {IR.Log("Размер полученого потока (Stream): "+size);} ,Function called when stream processing ends.
cbTimeOutcbTimeOut: function() {IR.Log("cbTimeOut: TimeOut")},Handler for a server response timeout.
cbRecieveStreamcbReceiveStream: function(stream, code, headers) { IR.Log("Получение данных в формате ByteStream: \n Code ответа от сервера: " +code + "\n Обьект данных: " + stream); }Stream handler.

The Headers: field of SendEx() lets you set standard and custom HTTP request headers. Some standard headers and their behavior in SendEx() are described below.

HeaderDefault value or exampleDescriptionCan be set (overridden) in HeaderHow to set (override)
Host192.168.0.100:123Host domain name and port of the requested resourcenoIn the Host and Port parameters of the AV & Custom Systems (HTTP) driver
ConnectionKeep-Alive or closeHTTP connection methodnoDetermined by KeepAliveOut passed to SendEx(): if KeepAliveOut = 0, the "Connection: close" header is sent; if KeepAliveOut > 0, the "Connection: Keep-Alive" header is sent
Transfer-EncodingchunkedSelf-determined request content lengthnoNot set; see Content-Length
Content-Length0Request content lengthnoNot set; calculated automatically from the request content
Authorization-Authorization datanoIn the Login and Password parameters of the AV & Custom Systems (HTTP) driver. Calculated automatically (Basic Authorization)
Content-Typeapplication/x-www-form-urlencodedRequest content typeYes-
Accept/List of acceptable resource formatsYes-
User-AgentiRidi Server/x.x.xList of client and component names and versions, with commentsYesIn the User-Agent parameter of the AV & Custom Systems (HTTP) driver

An example Header block is shown below:


IR.GetDevice("AV & Custom Systems (HTTP)").SendEx({
Type: "GET",
Url: "/device/http",
Headers: {
"Content-Type": "application/json",
"Accept": "application/xml",
"User-Agent": "Project Server v2.0",
"Accept-Language": "en",
"Set-Cookie": "parameter=1",
},
KeepAliveOut: 0; // used for "Connection: close" header
cbReceiveText: function(text, code, headers) {IR.Log("Header: "+headers);}
});

See the attached project for an implementation of this method in a driver:

Tip

.Set​

Execute a native driver command configured beforehand in the editor's command tree. You pass a value to the command just as when pressing a button in the interface. Works only with native drivers. A command can be activated by index (its position in the tree, starting at one) or by name. A command cannot be executed if it is not configured in the project tree.

Syntax

IR.GetDevice(driver).Set(command, value)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
command"Channel 1"type: string
command index or name, position in the tree starting at 1, number
value100type: string
number or string to pass to the command for sending to the equipment, number
Output
successtype: Boolean
success

Example

//KNX. 1 - first Commands in project Tree; 100 - value to send, "Dimming" - command name
IR.GetDevice("KNX Router (KNXnet/IP)").Set(1, 100);
IR.GetDevice("KNX Router (KNXnet/IP)").Set("Dimming", 100);


//Global Cahe. "Command 1" - name of command on GC output, "" - empty data
IR.GetDevice("Global Cache").Set("Command 1", "")


//HDL. "HDL-BUS Pro Network (UDP)" - name of network
//"Dimmer" - name of Device in Network, "Channel 1" - name of Channel, 100 - value to send
IR.GetDevice("HDL-BUS Pro Network (UDP)").Set("Dimmer:Channel 1", 100);


//Domintell. "Domintell Network (UDP)" - name of network
//"DDIM01" - name of Device in Network, "Channel 1" - name of Channel, 100 - value to send
IR.GetDevice("Domintell Network (UDP)").Set("DDIM01:Channel 1", 100);


//Set data to virtual tag in iRidium Server project
IR.GetDevice("iRidium server").Set("Virtual 1", 100);
//Set data to channel in iRidium Server project
IR.GetDevice("iRidium Server").Set("KNX Router.Address 1", 1);

Notes

Tip

HDL, Domintell: use the network name "HDL-BUS Pro Network (UDP)" / "Domintell Network (UDP)", not the name of an individual device on the network.

.SetFeedback​

Write a value to a driver feedback channel. The channel must already exist in Project Device Panel. Used to display equipment data received by scripts.

Syntax

IR.GetDevice(driver).SetFeedback(name, value)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
name"Channel 1"type: string
feedback channel name (Feedbacks)
value"data"type: string
string or number to write to the channel, number
Output
successtype: Boolean
success

Example

IR.GetDevice("MyDevice").SetFeedback("Value 1", 100);

.GetFeedback​

Read a value from a driver feedback channel. The channel must already exist in Project Device Panel. Used to access data previously written to the channel.

Syntax

IR.GetDevice(driver).GetFeedback(name)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
name"Channel 1"type: string
feedback channel name (Feedbacks)
Output
value"data"type: string, number
string or number read from the feedback channel

Example

IR.GetDevice("MyDevice").GetFeedback("Value 1"); // 100

.SetParameters​

Change the specified driver connection parameters for the controlled equipment. A typical example is switching between local and internet connections. Parameters can be changed selectively. The new connection settings do not change the driver's original parameters and are not retained when the application restarts. Every TCP, UDP, or HTTP driver has the standard parameters Host, Port, Login, Password (even if the driver does not use a login and password), as well as parameters specific to its type.

Syntax

IR.GetDevice(driver).SetParameters({Host: host, Port: port, <other>});

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
host"192.168.0.100"type: string
IP address or domain name for connecting to the equipment
port8080type: number
connection port
LogLevel4type: number
Log level. LogLevel
othertype: -
Output
successtype: Boolean
success

Example

IR.GetDevice("KNX").SetParameters({Host: "215.110.10.22", Port: 8080});

Notes

Tip

Current settings are available as Properties of the driver

.GetCookies​

Get the Cookies array through the AV & Custom Systems (HTTP) driver

Syntax

IR.GetDevice(driver).GetCookies()

InputValueDescription
driver"Driver 1"type: string
HTTP driver name in the iRidi project
Output
arraytype: array
Cookies array

Example

var num = IR.GetDevice("MyDevice").GetCookies()

.SetCookie​

Send a Cookie with the other header information through the AV & Custom Systems (HTTP) driver

Syntax

IR.GetDevice(driver).SetCookie(key, value)

InputValueDescription
driver"Driver 1"type: string
HTTP driver name in the iRidi project
keytype: string
key
valuetype: string
value
Output
successtype: Boolean
success

Example

IR.GetDevice("MyDevice").SetCookie("TestCookie", "value")

.GetLogin​

Get the connection login for any driver

Syntax

IR.GetDevice(driver).GetLogin()

InputValueDescription
driver"Driver 1"type: string
driver name
Output
login'admin'type: string
driver login

Example

var login = IR.GetDevice("MyDevice").GetLogin()
IR.Log(login) // admin

.GetPassword​

Get the connection password for any driver

Syntax

IR.GetDevice(driver).GetPassword()

InputValueDescription
driver"Driver 1"type: string
driver name
Output
login'admin'type: string
driver password

Example

var pass = IR.GetDevice("MyDevice").GetPassword()
IR.Log(pass) // password

.AddChannel​

function under development Add a channel to the driver

Syntax

IR.GetDevice(driver).AddChannel(name, data)

InputValueDescription
driver"Driver 1"type: string
driver name
name"Channel 1"type: string
command name
datatype: array
driver-specific data array
Output
-

Example

/* under development */

.AddTag​

function under development Add a feedback channel to the driver

Syntax

IR.GetDevice(driver).AddTag(name, data)

InputValueDescription
driver"Driver 1"type: string
driver name
name"Channel 1"type: string
feedback channel name
datatype: array
driver-specific data array
Output
-

Example

/* under development */

.AddRelation​

Create a Relation: a link between interface objects and drivers / variables / other objects.

Syntax

IR.AddRelation(source, destination)

InputValueDescription
source"Drivers.iRidium Server.Tags.KNX.1/0/1"type: string
data source
destination"UI.Popup 1.Item 1.Value"type: string
data destination
Output
-

Example

var from = "Drivers.iRidium Server.Tags.KNX.1/0/1";
var to = "UI.Popup 1.Item 1.Value";
IR.AddRelation(from, to);

.RemoveRelation​

Remove a Relation: a link between interface objects and drivers / variables / other objects.

Syntax

IR.RemoveRelation(source, destination)

InputValueDescription
source"Drivers.iRidium Server.Tags.KNX.1/0/1"type: string
data source
destination"UI.Popup 1.Item 1.Value"type: string
data destination
Output
-

Example

var from = "Drivers.iRidium Server.Tags.KNX.1/0/1";
var to = "UI.Popup 1.Item 1.Value";
IR.RemoveRelation(from, to);

.GetCommandsCount​

Get the number of commands configured in the driver

Syntax

IR.GetDevice(driver).GetCommandsCount()

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
Output
CommandsCount52type: number
number of device commands

Example

var num = IR.GetDevice("MyDevice").GetCommandsCount();
IR.Log(num); // number of commands

.GetCommandAtName​

Get data from the Data field of a driver command. The command is accessed by name.

Syntax

IR.GetDevice(driver).GetCommandAtName(name)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
name"Command 1"type: string
command name
Output
object[object Object]type: object
reference to the driver command
object.id1type: number
object property: numeric command identifier (starting at 1)
object.nameCommand 1type: string
object property: command name
object.data74,65,73,74type: array
object property: command Data field contents as a byte array

Example

var Command = IR.GetDevice("AV").GetCommandAtName("Command 1");
IR.Log("id: " + Command.id + ", name: " + Command.name + ", data: " + Command.data);
// id: 1, name: Command 1, data: 74,65,73,74

.GetCommandAtPos​

Get data from the Data field of an AV & Custom System (HTTP, TCP, UDP, RS232) driver command. The command is accessed by its position, starting at 0.

Syntax

IR.GetDevice(driver).GetCommandAtPos(position)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
position0type: number
command position (starting at 0)
Output
object[object Object]type: object
reference to the driver command
object.id1type: number
object property: numeric command identifier (starting at 1)
object.nameCommand 1type: string
object property: command name
object.data74,65,73,74type: array
object property: command Data field contents as a byte array

Example

var Command = IR.GetDevice("AV").GetCommandAtPos(0);
IR.Log("id: " + Command.id + ", name: " + Command.name + ", data: " + Command.data);
// id: 1, name: Command 1, data: 74,65,73,74

.GetFeedbacksCount​

Get the number of feedback channels configured in the AV & Custom System (HTTP, TCP, UDP, RS232) driver

Syntax

IR.GetDevice(driver).GetFeedbacksCount()

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
Output
FeedbacksCount52type: number
number of device channels

Example

var num = IR.GetDevice("MyDevice").GetFeedbacksCount();
IR.Log(num); // number of feedbacks

.GetFeedbackAtName​

Get data from the Data field of a driver feedback channel. The feedback channel is accessed by name or identifier.

Syntax

IR.GetDevice(driver).GetFeedbackAtName(name/ID)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
name/ID"Feedback 1"type: string
channel name / channel identifier/number
Output
object[object Object]type: object
reference to the feedback channel object
object.id1type: number
object property: numeric channel identifier (starting at 1)
object.nameCommand 1type: string
object property: channel name
object.data74,65,73,74type: array
object property: channel Data field contents as a byte array

Example

var Feedback = IR.GetDevice("AV & Custom System (TCP)").GetFeedbackAtName("Feedback 1");
IR.Log("id: " + Feedback.id + ", name: " + Feedback.name + ", data: " + Feedback.data);
// id: 1, name: Feedback 1, data: 74,65,73,74

.GetFeedbackAtPos​

Get data from the Data field of an AV & Custom System (HTTP, TCP, UDP, RS232) driver feedback channel. The command is accessed by its position, starting at 0. Syntax

IR.GetDevice(driver).GetFeedbackAtPos(position)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
position0type: number
channel position (starting at 0)
Output
object[object Object]type: object
reference to the driver channel
object.id1type: number
object property: numeric channel identifier (starting at 1)
object.nameCommand 1type: string
object property: channel name
object.data74,65,73,74type: array
object property: channel Data field contents as a byte array

Example

var Feedback = IR.GetDevice("AV & Custom System (TCP)").GetFeedbackAtPos(0);
IR.Log("id: " + Feedback.id + ", name: " + Feedback.name + ", data: " + Feedback.data);
// id: 1, name: Feedback 1, data: 74,65,73,74

.AddEndOfString​

Specify the string treated as the end of a message in the IR.EVENT_RECEIVE_TEXT listener. Works only with AV & Custom System (TCP, UDP, RS232). When transmitting large messages, devices split them into packets, so IR.EVENT_RECEIVE_TEXT receives the message in parts (packets). With this method, the script looks for the specified string in the packets and automatically combines all preceding packets into one message.

Important

This method does not work with the HTTP driver. For the HTTP driver, the recommended method is .SendEx, which can assemble data received in parts into a single message.

Syntax

IR.GetDevice(driver).AddEndOfString(string)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
string"happy"type: string
string marking the end of a message
Output
object[object Object]type: object
reference to the driver channel
resulttruetype: boolean
method result. Returns true if the input parameter is a string, or false for any other data type

Example

var driver = IR.GetDevice("TCP");
IR.AddListener(IR.EVENT_START,0,function()
{
IR.Log(driver);
driver.AddEndOfString("happy");
})

.AddEndOfData​

Specify the byte sequence treated as the end of a message in the IR.EVENT_RECEIVE_DATA listener. Works only with AV & Custom System (HTTP, TCP, UDP, RS232). When transmitting large messages, devices split them into packets, so IR.EVENT_RECEIVE_DATA receives the message in parts (packets). With this method, the script looks for the specified sequence in the packets and automatically combines all preceding packets into one message

Syntax

IR.GetDevice(driver).AddEndOfData(data)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
data0x0d,0x0atype: string
sequence marking the end of a message
Output
object[object Object]type: object
reference to the driver channel
resulttruetype: boolean
method result. Returns true if the input parameter is a byte array, or false for any other data type

Example

var driver = IR.GetDevice("TCP");
IR.AddListener(IR.EVENT_START,0,function()
{
IR.Log(driver);
driver.AddEndOfData([0x0d,0x0a]);
})

.GetChannelURI​

Access the Custom AV HTTP driver's URI field from JS. This lets you read the string directly from the URI field.

Syntax

IR.GetDevice("AV & Custom Systems (HTTP)").GetChannelURI("AV Control Command")

InputValueDescription
name"AV Control Command"type: string
command name
Output
URI in taghttp://YourURItype: string
URI string

Example

IR.AddListener(IR.EVENT_START,0,function()
{
var device = IR.GetDevice("AV & Custom Systems (HTTP)");
var URI = device.GetChannelURI("AV Control Command");
IR.Log("************ " + URI);
});

.SendText​

This method works only with AV & Custom Systems (WebSoket) drivers. It sends data (except arrays) to the equipment as text (string).

Input*ValueDescription
name"Driver 1"type: String - driver name in the iRidi project
context"Hello, world!" / 1234 / true, etc.type: object (not array) / number / string / boolean - data to send
Output
successtype: Booleansuccess

Code example:


// Для того что-бы скрипт сработал в проекте должен быть добавлен и настроен драйвер AV & Custom Systems (WebSoket)
var value = 8.2;
function test_runner() {
IR.GetDevice("AV & Custom Systems (WebSocket)").SendText(value); // на оборудование уходит "8.2"
IR.GetDevice("AV & Custom Systems (WebSocket)").SendText(Math.ceil(value)); // на оборудование уходит "9"
};
IR.AddListener(IR.EVENT_START, 0, function () {
IR.SetTimeout(10000, test_runner)
});

Converting data from the Data field​

The methods above return Data field contents in HEX format. To convert this data to an ASCII string, use the following:


// process an array of HEX bytes from Data field of Command or Feedback
function HexArrayToAsciiString(in_aArray)
{
// init string
var l_sStr = '';

// aray bypass
for(var i = 0; i < in_aArray.length; i++)
l_sStr += String.fromCharCode(parseInt(in_aArray[i], 16));

// return string in ASCII format
return l_sStr;
}
IR.AddListener(IR.EVENT_START, 0, function()
{
var l_pCommand = IR.GetDevice("Driver").GetCommandAtName(1);
IR.Log("data:" + HexArrayToAsciiString(l_pCommand.data)); // ASCII data
});

IR.GetDevices()​

Get an array of all drivers in the iRidi project.

Syntax

IR.GetDevices();

Output
Object[object DevicePrototype]type: Object
reference to the driver array

Example

var devices = IR.GetDevices();
var name_1 = devices[0].Name;
var name_2 = devices[1].Name;
IR.Log("First device: " + name_1);
IR.Log("Second device: " + name_2);

IR.IsModuleLicensed​

Checking whether a driver is licensed

Important

Attention! For this function to work with your driver, you must arrange driver support with us. To add your driver to the supported list, contact us at contact@iridiummobile.ru

Syntax

IR.IsModuleLicensed(ID)

InputValueDescription
ID452type: Number
driver type agreed with our company
Output
Resulttruetype: boolean
true - driver licensed, false - driver not licensed

Example

var hasLicense1= IR.IsModuleLicensed("6")   // AV & Custom Systems
var hasLicense2= IR.IsModuleLicensed("14") // AV & Custom HTTP

Events​

An event is a process exposed to scripts with an identifier for monitoring.

A listener is a function that executes when its specified event occurs

Add a listener using the method IR.AddListener

IR.AddListener(event, input, action);

  • event is the identifier of the event monitored by the listener
  • input is an input parameter required to create the listener. If there is no parameter, specify 0
  • action is an anonymous function or a reference to a declared function in which actions are performed
  • pointer is a pointer to the listener's invocation context (optional). You can access the context using the this operator. The context may change while the program is running

Example:


// выполнение функции внутри слушателя
IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("Driver"), function (name, value)
{
IR.Log("changes: "+name+" > "+value); // changes: Feedback 1 > 100
});

IR.EVENT_ONLINE​

Identifier of the event triggered when a connection to the equipment is established

Syntax

IR.AddListener(IR.EVENT_ONLINE, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction() {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
-

Example

IR.AddListener(IR.EVENT_ONLINE, IR.GetDevice("Global Cache"), function()
{
IR.Log("Device online");
});

IR.EVENT_OFFLINE​

Identifier of the event triggered when disconnected from the equipment

Syntax

IR.AddListener(IR.EVENT_OFFLINE, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction() {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
-

Example

IR.AddListener(IR.EVENT_OFFLINE, IR.GetDevice("Global Cache"), function()
{
IR.Log("Device offline");
});

IR.EVENT_TAG_CHANGE​

Identifier of the event triggered when a native driver's feedback channel status changes.

Syntax

IR.AddListener(IR.EVENT_TAG_CHANGE, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction(name, value) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
name"Feedback 1"type: string
name of the changed channel
value100type: number
new value

Example

// Subscribe to driver
IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("KNX Router (KNXnet/IP)"), function(name, value)
{
IR.Log(name+": "+value); // Feedback 1: 100
});
// subscribe to iRidium Server variables (in Server project)
IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetServer(), function(name, value)
{
IR.Log(name+": "+value);
});

Notes

Tip
  • For the AV & Custom Systems driver! Use IR.EVENT_RECEIVE_DATA or IR.EVENT_RECEIVE_TEXT to parse this driver's data
  • HDL: specify the HDL Network name instead of the driver name; by default, it is "HDL-BUS Pro Network (UDP)". The changed channel value is returned as "device:channel"; device is the HDL actuator name, and channel is the channel in that device's settings.
  • Domintell: specify the Domintell Network name instead of the driver name; by default, it is "Domintell Network (UDP)". The changed channel value is returned as "device:channel"; device is the Domintell actuator name, and channel is the channel in that device's settings.
  • IR.EVENT_TAG_CHANGE occurs:
    • whenever data is received (even if the value is unchanged) when accessing the driver directly through IR.GetDevice(),
    • only when data changes when accessing it indirectly through the server using IR.GetServer().

IR.EVENT_RECEIVE_DATA​

Identifier of the event triggered when an AV & Custom Systems driver receives data, outputting it as a byte array: an array of ASCII character codes. Works only with AV & Custom Systems.

Syntax

IR.AddListener(IR.EVENT_RECEIVE_DATA, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction(data) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
datatype: array
character array

Example

IR.AddListener(IR.EVENT_RECEIVE_DATA, IR.GetDevice("AV & Custom Systems (TCP)"), function(data)
{
IR.Log(data);
});

Notes

Tip

Works only with AV & Custom Systems.

IR.EVENT_RECEIVE_TEXT​

Identifier of the event triggered when an AV & Custom Systems driver receives data, outputting it as a string. Works only with AV & Custom Systems.

Syntax

IR.AddListener(IR.EVENT_RECEIVE_TEXT, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction(text) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
texttype: string
received data as a string

Example

IR.AddListener(IR.EVENT_RECEIVE_TEXT, IR.GetDevice("AV & Custom Systems (TCP)"), function(text)
{
IR.Log(text);
});

Notes

Tip

Works only with AV & Custom Systems.

IR.EVENT_ERROR​

Identifier of the event triggered when an HTTP request is sent to an unavailable resource, or a resource that is available but does not respond within the specified time. Outputs an error code

Syntax

IR.AddListener(IR.EVENT_ERROR, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("AV & Custom Systems (HTTP)")type: object
driver reference
functionfunction(transport_id, local_ip, local_port, host_ip, host_port, errorCode) {}type: function
anonymous function or function reference that processes the listener results
pointer-type: object
pointer to the object serving as the function context (optional)
Output
transport_id0type: number
transport identifier: 0 for any AV driver except Global Cache, where 0 - IR, system, 1 - COM1, 2 - COM2
local_ipt192.168.0.100type: string
local address of the command sender
local_port80type: number
local port of the command sender
host_ip200.200.10.10type: string
command recipient address
host_port80type: number
command recipient port
errorCode1type: number
error code:
* 1 - request could not be sent (resource unavailable)
* 2 - resource available, but no response received within the specified time

Example

var driver = IR.CreateDevice(IR.DEVICE_CUSTOM_HTTP_TCP, "AV Device (HTTP)", {
Host: "ResourceUnavailable.net", Port: 80
});
driver.SendEx({
Type: "GET", Url: "/request", Headers: {},
cbReceiveText: function(text, code, headers) {IR.Log("cbReceiveText (code) = "+code);}
});
IR.AddListener(IR.EVENT_ERROR, driver, function(transport_id, local_ip, local_port, host_ip, host_port, errorCode) {
IR.Log("IR.EVENT_ERROR (code) = "+errorCode);
});

Notes

Tip

IR.EVENT_CHANNEL_SET​

Identifier of the event triggered when a driver command is activated

Syntax

IR.AddListener(IR.EVENT_CHANNEL_SET, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction(name, value) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
name"Command 1"type: string
name of the activated command
value100type: number
Value written to the command when sending
data'string'type: string
value stored in the activated command's Data field - available only in AV & Custom Systems drivers

Example

IR.AddListener(IR.EVENT_CHANNEL_SET, IR.GetDevice("AV & Custom Systems (TCP)"), function(name, value, data) {
switch(name) {
case "Volume":
if (data) IR.Log("Volume set: " + data + " " + value)
else IR.Log("Volume set: " + value)
break;
case "Play":
IR.Log("Play")
break;
}
});

Notes

Tip

The event triggers only for AV & Custom Systems and Global Cache drivers

IR.EVENT_TAG_UPDATE_START​

The listener triggers when KNX bus polling starts

Syntax

IR.AddListener(IR.EVENT_TAG_UPDATE_START, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction(name, value) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)

Example

IR.AddListener(IR.EVENT_TAG_UPDATE_START, IR.GetDevice("KNX Router (KNXnet/IP) / Serial (UMC) 1"), function () {IR.Log("EVENT_TAG_UPDATE_START")});

IR.EVENT_TAG_UPDATE_END​

The listener triggers when KNX bus polling ends.

Syntax

IR.AddListener(IR.EVENT_TAG_UPDATE_END, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
driver reference
functionfunction(name, value) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)

Example

IR.AddListener(IR.EVENT_TAG_UPDATE_END, IR.GetDevice("KNX Router (KNXnet/IP) / Serial (UMC) 1"), function () {IR.Log("EVENT_TAG_UPDATE_END")});

UPnP​

.InvokeAction​

Send an instruction to a UPnP-capable device

Syntax

IR.GetDevice(driver).InvokeAction(action_name, service_type, [arguments, callback])

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
action_name"Play"type: string
command name
service_type"service:AVTransport:1"type: string
service used
argumentsInstanceID: 0, Speed: 1type: string
command argument list
callbacktype: object
callback function
Output
successtype: Boolean
success

Example

IR.GetDevice("Sonos").InvokeAction("Play", "service:AVTransport:1", {InstanceID: 0, Speed: 1});

.Subscribe​

Subscribe to an event from a UPnP-capable device

Syntax

IR.GetDevice(driver).Subscribe(service_type)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
service_type"urn:schemas-upnp-org:service:AVTransport:1"type: string
service used
Output
truetruetype: Boolean
success

Example

IR.GetDevice("Sonos").Subscribe("urn:schemas-upnp-org:service:AVTransport:1");

.Unsubscribe​

Unsubscribe from an event from a UPnP-capable device

Syntax

IR.GetDevice(driver).Unsubscribe(service_type)

InputValueDescription
driver"Driver 1"type: string
driver name in the iRidi project
service_type"urn:schemas-upnp-org:service:AVTransport:1"type: string
service used
Output
truetruetype: Boolean
success

Example

IR.GetDevice("BAOS").Unsubscribe("urn:schemas-upnp-org:service:AVTransport:1");

IR.EVENT_DEVICE_FOUND​

Identifier of the event triggered by an event on a UPnP device

Syntax

IR.AddListener(IR.EVENT_DEVICE_FOUND, 0, function, [pointer]);

InputValueDescription
functionfunction(name) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
name"Device"type: string
name of the discovered UPnP device

Example

IR.AddListener(IR.EVENT_DEVICE_FOUND, 0, function(name)
{
IR.Log(name);
});

IR.EVENT_RECEIVE_EVENT​

Identifier of the event triggered when an event is received from a UPnP device

Syntax

IR.AddListener(IR.EVENT_RECEIVE_EVENT, driver, function, [pointer]);

InputValueDescription
driverIR.GetDevice("MyDriver")type: object
reference to the UPnP driver
functionfunction(type, text) {}type: function
anonymous function or function reference
pointer-type: object
pointer to the object serving as the function context (optional)
Output
typetype: string
event type
texttype: string
message from the device

Example

IR.AddListener(IR.EVENT_RECEIVE_EVENT, IR.GetDevice("MyDriver"), function(type, text) {
IR.Log(text);
});

Properties​

Driver properties​

Driver connection parameters can be read as properties of the Driver object. To change connection parameters, use .SetParameters.

The main driver properties in an iRidi project are its name and type. These can be requested from any driver. :

driver.property

property:

PropertyExampleDescription
NameCrestron 1type: string
driver name
TypeCrestron (TCP)type: string
driver type. The exact type name is shown in Driver Type in the connection settings window
LogLevelDebugtype: number
logging level:
0 - Emergency
1 - Alert
2 - Critical
3 - Error
4 - Warning
5 - Notice
6 - Info
7 - Debug
8 - Never

var driver = IR.GetDevice("Crestron 1");
IR.AddListener(IR.EVENT_START,0,function()
{
var properties = driver.Name + " (" + driver.Type + ") created";
IR.Log(properties);
});

Other driver parameters are unique to the driver type. Their names can be found in the system menu or in the following list:

driver.property

AMX​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port1319numberconnection port
DeviceID10001numberunique AMX panel identifier
Loginadminstringsecure session login
Passwordadminstringsecure session password

AV & Custom Systems (UDP)​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port8080numberconnection port
LocalPort80numberlocal receive port (on the iRidi side)
Groupnullstringnull - broadcast, "host" - multicast group
Multicastfalsestringfalse - broadcast, true - multicast (if a group is specified)
ScriptMode0numbersend data directly to the driver and scripts (0), or only to scripts (1)

AV & Custom Systems (HTTP)​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port8080numberconnection port
SSLfalsenumbersecure connection
Loginadminstringsecure session login
Passwordadminstringsecure session password
DisableQueue0numberdo not queue commands if they could not be sent
SendCommandAttempts0stringnumber of retries if sending fails (0 - no retries, send once)
ConnectWaitTimeMax3000number(ms) connection timeout
ReceiveWaitTimeMax5000number(ms) response timeout
UserAgentiRidistringhow iRidi identifies itself to the HTTP server

AV & Custom Systems (RS232)​

ParameterValueTypeDescription
PortName\.\COM1stringCOM port name
BaudRate19200numberdata transfer rate
DataBits8numbernumber of data bits in a frame
Parityestringparity
StopBits1numberstop bit in a frame
Use4850numberuse RS485 transport

AV & Custom Systems (TCP Server)​

ParameterValueTypeDescription
Port8080numberconnection port
MaxClients10numbermaximum number of connected clients

AV & Custom Systems (UDP Server)​

ParameterValueTypeDescription
Port8080numberconnection port
MaxClients10numbermaximum number of connected clients
ClientTimeOut100number(ms) time after which a client is disconnected if it sends no data to the server

Clipsal​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port20023numberconnection port
ProjectPROJstringToolkit project name

Crestron​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port41794numberconnection port
NetID3numberIP ID (IP Net Address) of the panel from the SIMPL Windows project
TelnetPort41795numberTelnet connection port (system)
TelnetSSL1numberuse an SSL connection
TelnetLoginadminstringSSL login
TelnetPasswordadminstringSSL password

DVR​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port8080numberconnection port
Loginadminstringsecure session login
Passwordadminstringsecure session password

Domintell​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port17481numberconnection port
Passwordadminstringconnection password
PingTime1000number(ms) data refresh rate

EPSNET​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port61682numberconnection port
UpdateTime1000number(ms) data refresh rate
DeviceAddressstringnot used by default

Global Cache​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port4998numbersystem command transmission port - 4998
IrConfirm0numberconfirm IR command delivery
SerialPort14999numberCOM port 1 (serial 1), if present
SerialPort25000numberCOM port 2 (serial 2), if present
SerialPort30numberreserved
PingTime0number(ms) periodically check connectivity with GC. 0 - ping disabled
DisableQueue0numberdo not queue commands if they could not be sent
SendCommandAttempts0stringnumber of retries if sending fails (0 - no retries, send once)
ConnectWaitTimeMax3000number(ms) connection timeout
ReceiveWaitTimeMax5000number(ms) response timeout

HDL-Buspro​

ParameterValueTypeDescription
Host255.255.255.255stringIP address or domain name. In a local network, the broadcast address is 255.255.255.255
Port6000numberconnection port
SendTimeOut20number(ms) enforced interval between commands
ConnectMode0number0 - Local, 2 - Internet, 3 - Remote Server
LoginUserstringlogin (for Internet and Remote Server)
PasswordUserstringpassword (for Internet and Remote Server)
Projectir_projstringproject name (for Internet and Remote Server)
ExtendedPort6000stringserver port (for Remote Server)
Groupir_groupstringgroup (for Remote Server)

// Local (ConnectMode=0)
IR.GetDevice("HDL Buspro UDP").SetParameters({Host: "255.255.255.255", Port: 6000,
SendNeedConfirm: 0, SendTimeout: 20, ConnectMode: 0});

// Internet (ConnectMode=1)
IR.GetDevice("HDL Buspro UDP").SetParameters({Host: "215.110.10.10", Port: 6000,
Login: "User", Password: "User", SendNeedConfirm: 0, SendTimeout: 20, ConnectMode: 2,
Project: "ir_proj"});

// HDL Remote Server (ConnectMode=2)
IR.GetDevice("HDL Buspro UDP").SetParameters({Host: "215.110.10.10", Port: 9999,
Login: "User", Password: "User", SendNeedConfirm: 0, SendTimeout: 20, ConnectMode: 3,
ExtendedPort: 6000, Project: "ir_proj", Group: "ir_group"});

Helvar​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name (absent for Net Internal UDP)
Port50001numberconnection port

KNX​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port3671numberconnection port
ConnectionWaitTime120000number(ms) timeout after an unexpected connection loss: 60000 or 120000 ms (depending on the KNX interface)
SendWaitTime0number(ms) pause between sending commands to the bus, used to reduce bus load
PingTime60000number(ms) interval between Ping commands that check the router connection
Nat0numberNAT mode (enable when connecting over the internet or using multiple network interfaces)

KNX IP BAOS​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port12004numberconnection port
UpdateTime0number(ms) interval between Ping commands that check the router connection

Modbus​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port502numberconnection port
UpdateTime1000number(ms) data refresh rate

Modbus Serial​

ParameterValueTypeDescription
Port1numberCOM port number
PortName\.\COM1stringCOM port name
BaudRate19200numberdata transfer rate
DataBits8numbernumber of data bits in a frame
Parityestringparity
StopBits1numberstop bit in a frame
Use4850numberuse RS485 transport

SIP​

ParameterValueTypeDescription
Host192.168.0.100stringSIP server IP address or domain name
Port502numberSIP server connection port
CallerIDBenstringsubscriber alias
IDBennumber, stringsubscriber number
PasswordPwdnumber, stringsubscriber password
FirstRTPPort40000numberfirst port in the RTP range
LastRTPPort41000numberlast port in the RTP range
ToneDTMF1numbersend DTMF tones
ToneSIP0numbersend SIP tones
ExternalIPstringsubscriber external address
PCMU1numberenable or disable the codec
PCMA1numberenable or disable the codec
GSM1numberenable or disable the codec
H2631numberenable or disable the codec
H263_19981numberenable or disable the codec

iRidi Server​

ParameterValueTypeDescription
Host192.168.0.100stringIP address or domain name
Port30464numberconnection port
Loginadminstringsecure session login
Passwordadminstringsecure session password