Universal import from JS
Universal import from JS lets you import drivers from a js text file containing a json data structure. Json describes the list of drivers to import. In this file, you can specify driver connection properties and create commands and feedbacks.
Documentation updated 01.01.2024
Driver examples:
You will need a text editor. One convenient option is Notepad++ with syntax highlighting.
Create a new file and populate it according to the driver structure. The structure can vary by driver type. Different connection, subdevice, and device tag settings can be added.
Import file structure
The Json file contains the following main sections:
- Devices - essential driver settings without which import cannot be performed,
- Connection - equipment connection parameters,
- Commands - command configuration parameters,
- Feedbacks - feedback configuration parameters.

Devices
This example creates a file with the minimum settings needed to import an MQTT driver into iRidi Studio.
Basic driver settings:
- Type - unique numeric driver identifier, represented by ID in the driver's xml file;
- Name - unique driver name;
- Protocol - protocol supported by the equipment. The first protocol in the list is used by default;
- Merge - merges drivers of the same type:
- 1 - merge,
- 0 - do not merge.
Type for JSON
- Alexa ID="1"
- Google Home ID="2"
- YandexAlice ID="4"
- ZWave ID="5"
- DuoTecno ID="6"
- ELKO EP iNels ID="7"
- iNels RF ID="8"
- KNX Baos kBerry ID="9"
- KNX IP Baos 771-774,777 ID="10"
- KNX IP Router ID="11"
- KNX LMx ID="12"
- Global Cache ID="13"
- Larnitech ID="14"
- iRidi Server ID="15"
- KNX IP Baos 770 ID="16"
- Lutron ID="17"
- SNMP ID="18"
- HDL ID="19"
- Velbus ID="20"
- Domintell ID="21"
- Helvar Net 8 bit device ID="22"
- Helvar Net 16 bit device ID="23"
- Modbus ASCII ID="24"
- Modbus RTU ID="25"
- Modbus TCP Server ID="26"
- Modbus TCP ID="27"
- BACNet ID="28"
- Custom ID="29"
- 1-Wire ID="30"
- Crestron ID="31"
- EPSNET ID="32"
- Beckhoff ID="33"
- MQTT ID="34"
- CustomHttp ID="35"
- AMXDevice ID="36"
- Virtual ID="37"
- Clipsal Gate ID="38"
- Clipsal ID="39"
- SIP ID="40"
- Custom Network ID="41"
- CustomHttp Network ID="42"
- YandexAlicePlatform ID="43"
- Sonos ID="44"
- Modbus TCP Server (Slave mode) Network ID="46"
- Modbus ASCII Network ID="47"
- Modbus TCP Network ID="48"
- Modbus RTU Network ID="49"
- TestDevice ID="50"
- AppleTV ID="51"
- ControlArt ID="52"
Connection
Obtain the driver connection parameters from its xml file. Open the Devices folder (C:\Program Files (x86)\iRidium Ltd\iRidium Pro\Studio32\Devices) and open the driver file in a text editor.
To merge drivers of the same type, specify identical Connection parameters
To specify driver connection parameters, add a "Connection" block to the structure shown above.

It includes the equipment Host and Port, as well as driver-specific settings.
The complete list of connection parameters is available in the driver's xml file, in the block delimited by "...".

- The ID variable contains the parameter name.
- Some parameter names in Studio may differ from those in the xml file.
Commands / Feedbacks
Each device in iRidi Studio has commands and feedbacks. Add the required number and configure each tag.

Each tag (channel or feedback) has two required parameters:
- Direction - tag type
- 1 - command;
- 2 - feedback.
- Name - unique command or feedback name.
There are also driver-specific parameters, specified in the "Params" block. The complete list of tag parameters is available in the driver's xml file. The tag parameters are delimited by opening and closing "...".

The Caption variable contains the tag parameter name. The Value variable is the unique identifier of this parameter.
RootFolder
iRidi Pro lets you create a separate folder containing any commands, feedbacks, devices, and subdevices. Required fields:
- Name - folder name;
- Items - command, feedback, device, or subdevice parameters.

Importing a driver
-
Select Script (*.js) in the import window.
-
Specify the path to the required js file.

Driver examples
Domintell
Creating a file template for importing a Domintell driver.
Example:Domintell
Connection
Connection parameters:
- Host - controller IP address;
- Port - control port;
- Password - password for protected access;
- UpdateTime - data update frequency (ms).
SubDevice
- Name - subdevice name;
- Module - supported device:


- Serial Number - serial number.
Commands
Command parameters:
- Direction = 1 - command;
- Name - register name;
- Channel - channel number;
- Command (CommandDampli in this example) - command type.

Domintell Light Protocol command list:
| Command | Value | Description |
|---|---|---|
| None | - | change the output |
| %I | - | set the output |
| %O | - | reset the output |
| %D | + | decimal dimmer/volume value assignment |
| %P | + | simulate a push on a input (1 - begin shot push, 2 - end shot push, 3 - begin long push, 4 - end long push) |
| %I%D | + | increase dimmer/volume value by step of decimail percent |
| %O%D | + | decrease dimmer/volume value by step of decimail percent |
| %DB | - | execute a Start dim on a dimmer output |
| %DE | - | execute a Stop dim on a dimmer output |
| %M | + | set Temperature mode |
| %A | + | sound Auxiliary selection 1-4 - AUX1-4, 5 - Tuner |
| %F | + | decimail Tuner Frequency in Mhz (1015000 = 101.5 Mhz, multiple of 500) |
| %R | + | set regulation mode |
| %U | + | set Coling Setpoint (decimal T value) |
| %T | + | set Heating Setpoint (decimal T value) |
| %H | + | shutters goes High |
| %L | + | Shutters goes Low |
Feedbacks
Feedback parameters:
- Direction = 2 - feedback;
- Name - feedback name;
- Channel - channel number;
- Command (CommandDampliFeedback in this example) - feedback type;
- Property (Property3Item in this example) - additional parameters.

DuoTecno
Creating a file template for importing a DuoTecno driver.
Example:DuoTecno
Connection
Connection parameters:
- Host - controller IP address;
- Port - control port;
- Login - server access login.
SubDevice
- Name - subdevice name;
- NodeID - node identifier (HEX format);
- UnitID - unit identifier (HEX format).
Commands
Command parameters:
- Direction = 1 - command;
- Name - command name;
- Command - command type;

- Method (MethodSwitch in this example) - method used.
Feedbacks
Feedback parameters:
- Direction = 2 - feedback;
- Name - feedback name;
- Command (Switch Status in this example) - feedback type;

- Method - method number;
- UnitType (UnitTypeSwitch in this example) - block type;
- Parameter - additional parameters available for this feedback type;
- Value (Value3ItemFeedback in this example) - available input values.

EPSNET (UDP)
Creating a file template for importing an EPSNET (UDP) driver.
Example:EPSNET
Connection
Connection parameters:
- Host - controller IP address;
- Port - UDP control port, 61682;
- UpdateTime - data update frequency (ms);
- DeviceAddress - device address.
Commands & Feedbacks
Command and feedback parameters:
- Direction:
- 1 - command,
- 2 - feedback.
- Name - register name;
- Type - data type;

- Register - register type;

- Address - register number;
- Bit - bit number in the byte (for Bool).
Lutron Homeworks QS (Beta)
Creating a file template for importing a Lutron Homeworks QS (Beta) driver. Example:Lutron Homeworks QS (Beta)
Connection
Connection parameters:
- Host - controller IP address;
- Port - controller connection port;
- Login - controller access login;
- Password - controller access password;
- Keep Alive - connection keep-alive time in seconds.
Commands & Feedbacks
Command and feedback parameters:
- Direction:
- 1 - command,
- 2 - feedback.
- Name - command / feedback name;
- Command - command used to address the required device (SHADEGRP = 6 in this example);

- IntegrationID - device address (configured beforehand in Lutron designer);
- Component - button number on the control panel (for button panels);
- Action - command type (ActionSHADEGRP = 6 in this example):
- ActionDEVICE - controls device inputs, such as buttons and dry contacts.

- ActionOUTPUT - controls outputs, such as dimmers and dry-contact outputs.

- ActionSHADEGRP - controls shades.

- ActionHVAC - controls HVAC equipment.

- ActionAREA - controls areas.

- Value - value sent to the channel. Value types (this example uses ValueInt32):

All possible values of this type are listed in the driver's xml file. For example, for Command = DEVICE and Action = Set/Get LED State, the values are:

MQTT
Creating a file template for importing an MQTT driver.
Example:MQTT
Connection
Connection parameters:
- MQTTVersion - protocol version on the controller;
- 3 - MQ Integrator SCADA Device Protocol (MQisdp) version,
- 4 - MQTT protocol version.
- ClientID - panel identifier;
- KeepAlive - connection keep-alive time in seconds;
- Clean - "clean start" flag, removes subscriptions when the connection is lost:
- 1 - clean session,
- 0 - persistent connections.
- Host - controller IP address;
- Port - controller connection port.
Commands
Command parameters:
- Direction = 1 - command;
- Name - command name;
- Topic - MQTT path;
- ValueType - value type.

- QoS - quality of service, message delivery guarantee from publisher to broker:
- At most once - no more than once, no duplicates, delivery is not guaranteed,
- At least once - one or more times, duplicates are possible, delivery is guaranteed,
- Exactly once - exactly once, no duplicates, delivery is guaranteed.
- Retain - retains the publication: the broker stores the retained topic and sends it to new subscribers with the retain flag:
- 1 - enabled,
- 0 - disabled.
Feedback
Feedback parameters:
- Direction = 2 - feedback;
- Name - feedback name;
- Topic - MQTT path;
- ValueType - value type.

SNMP
Creating a file template for importing an SNMP driver. Example:SNMP
Connection
Connection parameters:
- Host - device IP address;
- Port - device connection port for sending data (default 161; the driver sends requests to the agent);
- LocalPort - device connection port for receiving data (default 162; the agent sends a response to the driver);
- InitTagsAtStart - poll at startup (true/false);
- InitTagInterval - interval between tag polls. After an unsuccessful poll, the driver moves on to poll another tag;
- InitTagAttemptsCount - number of polling attempts for each tag.
Commands
Command parameters:
- Direction = 1 - command;
- Name - command name;
- OID - numeric object identifier;
- TypeCommand - command type:
- 0 - Get,
- 3 - Set;
- Value Type - value type:
- 2 - Int;
- 4 - String;
- 5 - Null;
- 6 - OID;
- 64 - IP4;
- 65 - Counter;
- 67 - Time;
- CommunityCommand - a character sequence indicating group membership, a form of password.
Feedback
Feedback parameters:
- Direction = 2 - feedback;
- Name - feedback name;
- OID - numeric object identifier;
- TypeTag - feedback type:
- Value = 0 - feedback returning the requested value,
- Trap = 1 - event feedback triggered when something happens.
- IPAddres - IP address;
- CommunityTag - a character sequence indicating group membership, a form of password.
Virtual channels
Creating a file template for importing virtual commands and feedbacks into a server project.
Example:Virtual
Commands & Feedbacks
Command and feedback parameters:
- Direction:
- 1 - command,
- 2 - feedback.
- Name - command / feedback name.