Эта страница является
переводом страницы
Universal import from JS. Перевод выполнен на 100%.
Universal import from JS
Universal import from JS is a capability to import drivers from js text format that contains json information structure. Json describes a list of drivers to import. In this file you can set definite connection parameters to a driver and create commands and feedback channels.
documentation was last updated on 26.11.2021
Examples of drivers:
A text editor is required for work. Notepad++ is a good solution with syntax highlighting.
Create a new file and fill it in according to the driver structure. The structure may change depending on the type of a driver. Different connection settings, subdevice settings, and settings device tags can be added.
Structure of Import File
Json file contains the following main sections:
1. Devices - main settings of a driver without which import is impossible,
2. Connection - parameters to connect to equipment,
3. Commands - parameters to set commands,
4. Feedbacks - parameters to set feedback channels.
Devices
The example contains a file with minimal settings to import MQTT driver to iRidium Studio.
Main driver settigns:
- Type - a unique numerical ID of a driver, this driver parameter is ID in xml;
- Name - a unique name of the driver;
- Protocol - protocol supported by equipment. The first in the list is used by default;
- Merge - merging drivers of one 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"
iRidium 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
Learn connection parameters of a required driver from xml file of the driver. Go to Devices folder (C:\Program Files (x86)\iRidium Ltd\iRidium Pro\Studio32\Devices) and open the driver file in a text editor.
"Connection" block must be added to the structure given above to set connection parameters of a driver.
They include Host and Port of equipment, and specific driver settings.
You can see a full list of connection parameters in the xml file of a driver in the block framed with “<Connections>...</Connections>”.
ID variable contains the name of a parameter.
Some names of parameters in the studio can differ from the names in the xml file.
Commands / Feedbacks
Each device in iRidium studio has commands and feedback channels. Enter a required number and fill in setting of each tag.
Each tag (channel or feedback) has 2 obligatory parameters:
- Direction - type of tag
- 1 - command;
- 2 - feedback.
- Name - a unique name of a command or a feedback.
There are also specific parameters for each driver.
They are written in the “Params” block.
You can see a full list of tag parameters in the xml file of a driver. Tag parameters are framed by “<Tags>...</Tags>”.
Caption variable contains the name of a tag parameter. Value variable is a unique ID of this parameter.
RootFolder
There is a capability in iRidium pro to create a separate folder where any commands, feedback channels, devices and subdevices can be placed.
Compulsory fields:
- Name - name of folder;
- Items - parameters of commands, feedback channels, devices or subdevices.
Driver import
1 Choose Script(*.js) in the import window.
2 Choose a required js file.
Examples of Drivers
Domintell
Creating a template file to import Domintell driver.
Connection
Connection parameters:
- Host - IP-address of a controller;
- Port - control port;
- Password - password for secure access;
- UpdateTime - frequency of data update (ms).
SubDevice
- Name - name of a subdevice;
- Module - supported device:
- Serial Number - a serial number.
Commands
Command parameters:
- Direction = 1 - commans;
- Name - name of register;
- Channel - number of channel;
- Command (CommandDampli in this example) - type of command.
List of Commands of Domintell Light Protocol:
| 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 - name of feedback;
- Channel - number of channel;
- Command (CommandDampliFeedback in this example) - type of feedback
- Property (Property3Item in this example) - additional parameters.
DuoTecno
Creating a template file to import Duo Tecno driver.
Connection
Connection parameters:
- Host - IP-address of a controller;
- Port - control port;
- Login - login to access a server.
SubDevice
- Name - name of a subdevice;
- NodeID - ID of a node (HEX format);
- UnitID - ID of a unit (HEX format).
Commands
Command parameters:
- Direction = 1 - command;
- Name - name of a command;
- Command - type of a command;
- Method (MethodSwitch in this example) - a used method
Feedbacks
Feedback parameters:
- Direction = 2 - feedback;
- Name - name of a feedback channel;
- Command (Switch Status in this example)- type of a feedback;
- Method - number of a method;
- UnitType (UnitTypeSwitch in this example) - type of a unit;
- Parameter - available additional parameters of this type of feedback;
- Value (Value3ItemFeedback in this example) - available input values.
EPSNET (UDP)
Creating a template file to import EPSNET (UDP). driver.
Connection
Connection parameters:
- Host - IP-address of a controller;
- Port - UDP control port, 61682;
- UpdateTime - frequency of data update (ms);
- DeviceAddress - address of a device.
Commands & Feedbacks
Parameters iof commands and feedback channels:
- Direction:
- 1 - command,
- 2 - feedback.
- Name - name of a register;
- Type - type of data;
- Register - type of register;
- Address - number of a register;
- Bit - the number of a bit in a byte (for Bool).
Lutron Homeworks QS (Beta)
Creating a file template to import Lutron Homeworks QS driver (Beta).
Connection
Connection parameters:
- Host - IP address of the controller;
- Port - connection port to the controller;
- Login - login to access the controller;
- Password - password to access the controller;
- Keep Alive - connection holding time in seconds.
Commands & Feedbacks
Parameters of commands and feedback channels:
- Direction:
- 1 - command,
- 2 - feedback channel.
- Name - the name of a command / a feedback channel;
- Command - a command that is call a required device (in the given example it is SHADEGRP = 6);
- IntegrationID - the address of a device (it is set beforehand in the Lutron designer configurator);
- Component - the number of a button on a control panel (for button panels);
- Action - a type of command (in the given example it is ActionSHADEGRP = 6):
- ActionDEVICE - allows to control device inputs, such as buttons and dry contacts.
- ActionOUTPUT - allows to control outputs such as dimmers and dry contacts outputs.
- ActionSHADEGRP - allows to control blinds.
- ActionHVAC - allows to control HVAC equipment.
- ActionAREA - allows to control zones.
- Value - a value that is sent to the channel. Types of values (in the given example the ValueInt32 type is used):
All possible values of this type can be found in the xml file of the driver. For example, for Command = DEVICE and Action = Set/Get LED State, there will be the following values:
MQTT
Creating a template file to import MQTT driver.
Connection
Connection parameters:
- MQTTVersion - version of a protocol on a controller версия протокола;
- 3 version of MQ Integrator SCADA Device Protocol (MQisdp),
- 4 version of MQTT protocol.
- ClientID - ID of a panel;
- KeepAlive - timeto hold connection in seconds;
- Clean - "clean start" flag, deletion of subscriptions when connection is broken:
- 1 - clean session,
- 0 - stable connections.
- Host - IP-address of a controller;
- Port - port to connect to a controller.
Commands
Command parameters:
- Direction = 1 - command;
- Name - name of a command;
- Topic - MQTT path;
- ValueType - type of value.
- QoS - quality of service, guarantee of message delivery from a publisher to a broker:
- At most once - no more than 1 time, without repetition, delivery is not guaranteed,
- At least once - one time and more, there can be repetitions, delivery is guaranteed,
- Exactly once - one time only, without repetition, delivery is guaranteed.
- Retain - saving a publication: a broker stores a retain-topic and when new subscrptions appear, the broker sends them with retain flag:
- 1 - turned on,
- 0 - turned off.
Feedback
Feedback parameters:
- Direction = 2 - feedback;
- Name - name of a command;
- Topic - MQTT path;
- ValueType - type of value.
SNMP
Creating a template file to import SNMP driver.
Connection
Connection parameters:
- Host - IP-address of a device;
- Port - connection port to a device to send data (it is 161 by default, the driver sends requests to an agent);
- LocalPort - connection port to a device to get data (It is 162 by default, an agent sends an answer to the driver);
- InitTagsAtStart - request at start (true/false);
- InitTagInterval - interval between tag requests. After a failed request a driver switches to request another tag;
- InitTagAttemptsCount - number of attempts to request each tag.
Commands
Command paramters:
- Direction = 1 - command;
- Name - name of a command;
- OID - numerical ID of an object;
- TypeCommand - type of command:
- Value Type - type of value:
- 2 - Int;
- 4 - String;
- 5 - Null;
- 6 - OID;
- 64 - IP4;
- 65 - Counter;
- 67 - Time;
- Community - sequence of symbols that shows belonging to a group, a sort of a password
Feedback
Feedback parameters:
- Direction = 2 - feedback;
- Name - name of a feedback channel
- OID - numerical ID of an object;
- TypeTag - type of feedback:
- Value = 0 - feedback to return a requested value,
- Trap = 1 - event feedback, it wors when something happens.
- IPAddres - IP-address;
- Community - sequence of symbols that shows belonging to a group, a sort of a password.
Virtual channels
Creation of a file tempate to import virtual commands and feedback channels in a server project.
Commands & Feedbacks
Parameters of commands and feedback channels :
- Direction:
- 1 - command,
- 2 - feedback channel.
- Name - the name of a command / a feedback channel.