Logo Logo en
  • iRidi Pro
    Основные компоненты
    • Приложение i3 Pro
    • iRidi Pro Server
    • iRidi Studio
    • iRidium studio v. 1.3.8 (устаревшая версия)
    Java Script в iRidi
    • Руководство
    • Справочник
    • Примеры
    • JS драйвера
    другие
    • Личный Кабинет
    • iRidium Cloud
    • iRidium Transfer
    • Push-уведомления
    • Лучшая практика
    Лицензирование
    • Лицензирование и передача проекта
    • Оффлайн-лицензирование
    • Активация iRidi Pro Server
  • Продукты
    i3 lite
    • Приложение i3 lite
    • Регистрация и лицензирование
    • Сервер
    • Модули
    KNX Home Server
    • Приложение i3 KNX
    • KNX Home Server
    BUS77 HOME SERVER
    • Приложения Bus77 Home и Bus77 Lite
    • Bus77 Home Server
    Решения
    • BYOD - решение для гостиниц
    • Портал жителя - решение для МКД
    iRidi SCADA
    • iRidi SCADA
  • Bus77
    НАСТРОЙКА BUS77
    • Основы Bus77
    • Приложения Bus77 Home и Bus77 Lite
    • Работа с драйвером Bus77 в iRidi Studio
    • Настройка шины Bus77 в iRidi Studio
    ПРОТОКОЛ BUS77
    • Характеристики CAN (Bus77)
    • Описание протокола
    • Исходники на GitHub
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
  • Поддерживаемое оборудование
    Драйверы
    • Список драйверов
    • ProAV драйвера
    • AV & Custom Systems
    • JS драйвера
    • Сторонние драйвера и фриланс
    Протоколы и интерфейсы
    • Голосовое управление
    • 1-Wire
    • BACnet IP
    • Bus77
    • KNX
    • KNX IP BAOS
    • Weinzierl kBerry
    • Microsoft Exchange
    • Modbus
    • MQTT
    • NFC
    • ODBC
    • Onvif
    • SIP
    • SNMP
    • Wake On Lan
    • Z-Wave
    • ZigBee
    Производители
    • AMX
    • AVCiT
    • Beckhoff ADS
    • Biamp Tesira
    • Bluesound
    • Casambi
    • BSS Harman
    • Clipsal
    • ControlArt 7Port
    • Crestron
    • DigiBird
    • Domintell
    • Duotecno
    • EIDE
    • EPSNET
    • Global Cache
    • HDL Buspro
    • Helvar
    • IEAST
    • INELS BUS
    • INELS Wireless
    • Intesis
    • Kleger
    • Kramer VIA
    • Kramer 3000
    • Larnitech
    • Legrand Netatmo
    • LG TV
    • Lutron
    • Lutron Homeworks QS
    • MyHome
    • Nest
    • Novastar
    • Panasоnic PTZ
    • Philips Dynalite
    • PJLink
    • Satel
    • SamsungTV
    • Sonos
    • Somfy
    • SpinetiX
    • Televic Conference
    • TIS
    • Tion
    • URRI
    • Velbus
    • Velocio
    • Vinteo
    • WyreStorm
    • WiiM
    • Xicato
    • Yamaha
    • ZONT
    • Z-Wave.me
    Протестированное оборудование
    • Панель HDL S57
    • Панель HDL S10
    • SIP-домофон
    • Akuvox
    • Arlight
    • Divus
    • QBic TD-1050 PRO
    • QBic TD-1060 Slim
    • QBic TD-1070
    • Sigur
    • Uni-Ubi
    • Velocio
  • Оборудование iRidi

    Серверы
    • HS Сервер
    • ProAV Control Processor Basic
    • ProAV Control Processor Advanced
    • Спецификация контроллеров UMC
    • Настройка контроллера UMC C2
    • Настройка контроллера UMC C3
    • Настройка контроллера HDL IntelliCenter 2 (UMC C4)
    Модули расширения
    • I-PX-RS1
    • I-PX-RS4
    • I-PX-IR3
    KNX
    • KNX Home Server
    • KNX IP Interface
    Панели управления
    • iRidium Panel 7
    • Touch Panel P3
    • Touch Panel P6
    • Touch Panel P8
    • Touch Panel P10
    • Tabletop Touch Panel 10
    • AV Remote Control
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
    • Differences
iRidium mobile web-site
Содержание
    Инструменты‌
    • Сведения о странице
    • Постоянная ссылка
    • Версия для печати
    • Спецстраницы
    • Связанные правки
    • Ссылки сюда
    Login / Create Account
    Материал из for iRidium developers
    Перейти к: навигация, поиск
    Эта страница является переводом страницы AV & Custom Systems. Перевод выполнен на 100%.


    Содержание

    • 1 iRidium for AV & Custom Systems
    • 2 Description
    • 3 Connection
      • 3.1 Ways of Connection
        • 3.1.1 AV & Custom Systems (Client)
        • 3.1.2 AV & Custom Systems (Server)
        • 3.1.3 Change of Connection Settings
      • 3.2 Setting up Commands
        • 3.2.1 AV & Custom Systems (TCP, UDP, RS232)
        • 3.2.2 AV & Custom Systems (WebSocket)
          • 3.2.2.1 ASCII (string)
          • 3.2.2.2 HEX (hexadecimal)
          • 3.2.2.3 DEC (decimal)
        • 3.2.3 AV & Custom Systems (HTTP)
          • 3.2.3.1 GET Method
          • 3.2.3.2 POST and PUT Methods
        • 3.2.4 AV & Custom Systems (SSH)
      • 3.3 Custom TCP, UDP, HTTP Network
    • 4 Sending Commands
    • 5 Feedback
    • 6 Copying Data
    • 7 Saving and Using a Created Driver

    iRidium for AV & Custom Systems

    a set of tools for creating equipment control interfaces via TCP, UDP, WebSocket, HTTP(s), RS232. It allows you to set up a custom list of commands and get feedback with the help of JavaScript

    The documentation was updated on 21.6.2024

    training:
    webinars and video-lessons >>

    download:

    • List of ready solutions made on the basis of AV & Custom Systems


    Description

    iRidium can send ASCII, DEC, HEX commands via TCP, UDP, WebSocket, HTTP(s), RS232 and get feedback from equipment with the help of JavaScript. You can set up commands to equipment without scripts but feedback is set up with scripts.

    Set up commands to any equipment for which there is no support in iRidium at the moment. For example: Home Theater, Multi-room, TV, DVD/BluRay players, iTunes, XBMC, commutators, matrix, preamplifiers. You can control equipment directly via Wi-Fi, Ethernet or via IP-to-RS232, IP-to-IR converters (such as Global Cache).


    Licensing of iRidium for AV & Custom Systems (more):

    • Deivice License Pro (AV & Custom Systems) - a license for one control panel. It enables sending of commands and processing of data from equipment to which you connect using AV & Custom Systems drivers.


    If you need to connect several control panels to equipment but the equipment has limitations for the number of concurrent connections, use iRidium Server

    Connection

    Equipment configuration and settings required for iRidium to control equipment via IP.


    Ways of Connection

    Depending on the way of control supported by your equipment, you can select a AV & Custom Systems driver and set it up for work with a particular device.


    AV & Custom Systems (Client)

    The list of AV & Custom Systems drivers includes the drivers for Client part are able to connect to automation system or server to send commands and receive data

    HowItWorksTCP.png


    Select a driver depending on the way of control:
    • AV & Custom Systems (TCP)
    • AV & Custom Systems (UDP)
    • AV & Custom Systems (HTTP)
    • AV & Custom Systems (SSH)
    • AV & Custom Systems (RS232)
    • AV & Custom Systems (WebSocket)


    Connection properties for AV & Custom Systems (TCP):

    • Host - the IP-address of domain name
    • Port - the TCP connection port
    • Mode - the mode of connection to equipment
      • Always Connected - connected constantly
      • Connect when Sending - connected only at the moment of command sending. Feedback does not work but commands can be sent from different devices not occupying the connection
    • SSL - to enable/disable SSL
    • Auth type - authorization type:
      • Basic - uses unencrypted base64 encoding,
      • Digest - encryption of credentials;
    • Script Mode - defines where to send commands
      • Direct and Script - to send commands directly to equipment and duplicate them to scripts
      • Script Only - to send commands to scripts only (commands will not be sent when clicking on the button)
    • Disable Queue - to disable the queue of command sending in iRidium for commands no to be accumulated when having problems with sending. 0 - false, 1 - true
    • Send Command Attempts - the number of attempts to send a command if there was no delivery confirmation, 0 - not to repeat the sending
    • Wait for Connection - (ms) the time for waiting for connection (then reconnect)
    • Wait for Data - (ms) the time for waiting for response from equipment (then repeat the request and check the connection). Set 0 if you need the driver always connected to equipment even there is no data received from

    Connection properties for AV & Custom Systems (UDP):

    • Host - the IP-address of domain name
    • Port - the UDP connection port
    • SSL - to enable/disable SSL
    • Auth type - authorization type:
      • Basic - uses unencrypted base64 encoding,
      • Digest - encryption of credentials;
    • Script Mode - defines where to send commands
      • Direct and Script - to send commands directly to equipment and duplicate them to scripts
      • Script Only - to send commands to scripts only (commands will not be sent when clicking on the button)
    • Local Port - the UDP port opened on the control panel side (data from controlled equipment will come here). It can be different from the external port (opened on the equipment side)
    • Multicast - to use the mode of multicast
      • Group - the multicast group


    Connection properties for AV & Custom Systems (HTTP):

    • Host - the IP-address of domain name
    • Port - the TCP connection port (usually 80)
    • Login / Password - the login and password for SSL
    • SSL - to enable/disable SSL
    • User Agent - the user name used by iRidium
    • Auth type - authorization type:
      • Basic - uses unencrypted base64 encoding,
      • Digest - encryption of credentials;
    • Script Mode - defines where to send commands
      • Direct and Script - to send commands directly to equipment and duplicate them to scripts
      • Script Only - to send commands to scripts only (commands will not be sent when clicking on the button)
    • Disable Queue - to disable the queue of command sending in iRidium for commands no to be accumulated when having problems with sending. 0 - false, 1 - true
    • Send Command Attempts - the number of attempts to send a command if there was no delivery confirmation, 0 - not to repeat the sending
    • Wait for Connection - (ms) the time for waiting for connection with equipment (then reconnect)
    • Wait for Data - (ms) the time for waiting for response from equipment (then repeat the request and check the connection). Set 0 if you need the driver always connected to equipment even there is no data received from

    Connection properties AV & Custom Systems (SSH):

    • Host - the IP-address of domain name
    • Port - the TCP connection port
    • Login / Password - the login and password for SSL
    • Wait for Connection - (ms) the time for waiting for connection with equipment (then reconnect)
    • Wait for Data - (ms) the time for waiting for response from equipment (then repeat the request and check the connection). Set 0 if you need the driver always connected to equipment even there is no data received from
    • Script Mode - defines where to send commands:
      • Direct and Script - to send commands directly to equipment and duplicate them to scripts
      • Script Only - to send commands to scripts only (commands will not be sent when clicking on the button)
    • Disable Queue - to disable the queue of command sending in iRidium for commands no to be accumulated when having problems with sending. 0 - false, 1 - true
    • Use PTY - is a pair of pseudo-device endpoints (files) that establish an asynchronous bi-directional communication channel (IPC) (with two ports) between two or more processes. Master provides facilities by which the terminal emulator process controls the slave. The slave device emulates a hardware text terminal device.
      • True in EVENT_RECEIVE_TEXT shows the current status of the terminal line and the data packets received from the equipment.
      • False in EVENT_RECEIVE_TEXT shows only data packs received from the hardware.


    Connection properties for AV & Custom Systems (RS232):

    • Port - the СОМ-port number
    • Baud Rate - the speed of data exchange
    • Data Bits - the number of information bits in a frame
    • Parity - the parity control.
    • Stop Bits - the stop bit in a frame

    In the web interface, stop bits are displayed as:

    iRidium studio: Web interface:
    1 0
    1,5 1
    2 2
    • Auth type - authorization type:
      • Basic - uses unencrypted base64 encoding,
      • Digest - encryption of credentials;
    • Script Mode - defines where to send commands
      • Direct and Script - to send commands directly to equipment and duplicate them to scripts
      • Script Only - to send commands to scripts only (commands will not be sent when clicking on the button)

    Connection properties for AV & Custom Systems (Serial):

    • Host - the IP-address of domain name;
    • Used with iRidi device - sets the host for the corresponding equipment (if this parameter is selected, the Host line will be inactive);
    • Baud Rate - the speed of data exchange with the controller;
    • Data Bits - the number of information bits in a frame;
    • Parity - the parity control;
    • Stop Bits - the stop bit in a frame (1; 1,5; 2);

    In the web interface, stop bits are displayed as:

    iRidium studio: Web interface:
    1 0
    1,5 1
    2 2
    • HRDW Flow control is a flow control mechanism that is part of the RS232 standard. It uses two additional pins on the RS232 connector, RTS (Request to Send) and CTS (Clear to Send). These two lines allow the receiver and transmitter to notify each other of their status. Raising and lowering these lines allows device drivers that implement hardware flow control code to maintain a reliable data connection between the transmitter and receiver. The advantage of this approach is that data corruption during transmission does not affect the flow control mechanism (as in Xon/Xoff). The parameter is displayed when "Used with iRidi device" = ProAV Processor Basic COM 1 (RS-232).
    • Script Mode - defines where to send commands.

    Connection parameters of AV & Custom Systems (WebSocket):

    • Host - IP-address or domain name.
    • Port - TCP connection port (usually 80).
    • SSL - turn on/off SSL.
    • Path - path to resource.
    • Headers - non-compulsory field to add keeys to the heading. Several keys can be written separated with line break.

    AV & Custom Systems (Server)

    You can use the AV & Custom Systems drivers outside of the main list for creation of free configured TCP or UDP Server. It is possible to create such Serever only with JavaScript methods.

    See the info about driver creation with help of JavaScript in iRidium.

    Example of AV & Custom Systems (TCP Server) driver creation.


    Change of Connection Settings

    You need the possibility to change connection properties when you disconnect from the Wi-Fi network of the automation object and start using 3G or another Wi-Fi network. To maintain control of the object you need to switch from the local to public IP-address of the Internet router.

    The switch is not automatic. You have to select the connection mode. For remote acces you have to make ports for controlling the automation system public. In order to do that you have o set up the Port Forwarding service on your Internet router. VPN can provide protected connection.


    1 Download the template (*.js) (right-click button: "Save object as ..."), add the template in the script editor with the buttonIcon Scripts.png (+) Add Script from file


    2 Set up script properties as it is shown in the example:

    function Internal_1() {
    IR.GetDevice("AV & Custom Systems (TCP)").SetParameters({Host: "192.168.0.100", Port: 8080, SendMode: IR.ALWAYS_CONNECTED, ScriptMode: IR.DIRECT_AND_SCRIPT, DisableQueue: false, SendCommandAttempts: 0, ConnectWaitTimeMax: 0, ReceiveWaitTimeMax: 0});
    }
    function External_1() {
    IR.GetDevice("AV & Custom Systems (TCP)").SetParameters({Host: "215.110.10.10", Port: 8081});
    }

    Copy the driver name from Projeсt Device Panel - the list of properties has to be copied from the example.


    3 Select the button which will be responsible for the switch of Internal and External properties. Open Macros Editor for the Press event (Object Properties > Programming), select the Script Call command and add it by double-clicking on it. Select the name of the function which will be activated by the button:

    Script call internal-external.png

    Now each pressing on the button will apply the corresponding connection properties.

    Examples:

    //AV & Custom Systems (TCP)
    IR.GetDevice("AV & Custom Systems (TCP)").SetParameters({Host: "192.168.0.100", Port: 8080, SendMode: IR.ALWAYS_CONNECTED, ScriptMode: IR.DIRECT_AND_SCRIPT, DisableQueue: false, SendCommandAttempts: 0, ConnectWaitTimeMax: 0, ReceiveWaitTimeMax: 0, LogLevel: 0, BackgroundMode: 0});
     
    //AV & Custom Systems (UDP)
    IR.GetDevice("AV & Custom Systems (UDP)").SetParameters({Host: "192.168.0.100", Port: 6001, ScriptMode: IR.DIRECT_AND_SCRIPT, LocalPort: 8080, Group: "224.0.0.1", Multicast: 1});
     
    //AV & Custom Systems (WebSocket)
    IR.GetDevice("AV & Custom Systems (WebSocket)").SetParameters({Host: “192.168.0.100”, Port:80, Path:l_baseURL+"&token=" + l_Token, SSL: 0, Headers: “Sec-WebSocket-Extensions: client_max_window_bits”});
     
    //AV & Custom Systems (HTTP)
    IR.GetDevice("AV & Custom Systems (HTTP)").SetParameters({Host: "192.168.0.100", Port: 80, Login: "admin", Password: "pass", UseSSL: true, UserAgent: "iRidium", ScriptMode: IR.DIRECT_AND_SCRIPT, DisableQueue: false, SendCommandAttempts: 0, ConnectWaitTimeMax: 0, ReceiveWaitTimeMax: 0});
     
    //AV & Custom Systems (RS232)
    IR.GetDevice("AV & Custom Systems (RS232)").SetParameters({Port: 1, BaudRate: 19200, Bits: 8, Parity: "e", StopBit: 1, ScriptMode: 1});


    Setting up Commands

    AV & Custom Systems (TCP, UDP, RS232)

    Commands of AV & Custom Systems (TCP, UDP, RS232) have similar settings. They can send data strings in the HEX, DEC, ASCII formats to equipment.

    AV-TCP-CommandFeedback.png
    • Name - the command name. Using it, you can call commands from the script
    • Data - the data the command sends to the equipment. They can be writen in the HEX, DEC, ASCII formats. Rules for data forming change depending on the format
    • Disable Header - the professional setting for headers. It matters only when you create a device in the your database and indicate a preamble (the command part which will be added to any data input in the Data field) in its settings (see the database editor)


    Setting up feedback:

    • Name - the feedback channel name. Using the name, JavaScript can send data received from equipment into your graphic interface. All work with feedback is performed in scripts.


    Commands in the Data field have to be formmatted in accordance with the iRidium, syntax for the program to determine correctly how your data has to be sent (as strings, HEX codes or numbers):

    AV & Custom Systems (WebSocket)

    The driver is ussed to work with media devices Samsung TV-sets, series RU/R/Q*R(2019).

    Example:Samsung RU/R/Q*R

    AV & Custom Systems (WebSocket) commands can send a data string to equipment in the following formats HEX, DEC, ASCII.

    WebSocket.png
    • Name - name of a command. It can be used to call a command from the script;
    • Data - data that a commands sends to equipment. They can be written in HEX, DEC, ASCII formats. The syntax of data changes depending on the format;
    • Data type - type pf sent data:
      • Text - text data are received on the input, data are written according to iRidium syntax;
      • Bytes - byte data;
      • Value as text - receives numerical and text data including data from graphic items and sends them as text. When working via script .SendText() method is realized, it receives only text.


    Setting feedback:

    • Name - name of a feedback channel. JavaScript can send to a graphic interface data received from equipment using this name. All work with feedback is done via scripts.


    Commands in the Data field must be formed according to iRidium syntax for the program to determine correctly how your data must be sent (as a string, HEX code or number):

    ASCII (string)

    Formatting ASCII strings in the Data field:

    • include strings in 'single quotes'
    • in the string end add
      ,$0D - carriage return <CR>
      ,$0A - string end <LF>


    Formatting commands:

    In documentation: PWR01 <CR> VOLUME 50 <CR> <LF>
    Format: ASCII ASCII
    In iRidium (the Data field): 'PWR01',0x0D 'VOLUME 50',0x0D,0x0A


    Formatting the carriage return <CR> and sting end <LF>:

    In documentation: <CR> <CR> <CR> <LF> <LF> <LF>
    Format: HEX HEX DEC HEX HEX DEC
    In iRidium (the Data field): ,0x0D ,$0D ,13 ,0x0A ,$0A ,10


    HEX (hexadecimal)

    Formatting HEX symbols in the Data field:

    • Before each HEX symbol write 0x or $
    • Remove unnecessary indications before НЕХ codes, for example: 0Ah >> $0A
    • Separate НЕХ symbols with commas, delete all blank spaces
    • in the string end add
      ,$0D - carriage return <CR>
      ,$0A - string end<LF>


    In documentation: 16 8A FF 81 <CR> 19h EEh A1h 00h <CR> <LF>
    Format: HEX HEX
    In iRidium (the Data field): 0x16,0x8A,0xFF,0x81,0x0D $19,$EE,$A1,$00,0x0D,0x0A


    Formatting the carriage return <CR> and sting end <LF>:

    In documentation: <CR> <CR> <CR> <LF> <LF> <LF>
    Format: HEX HEX DEC HEX HEX DEC
    In iRidium (the Data field): ,0x0D ,$0D ,13 ,0x0A ,$0A ,10


    DEC (decimal)

    Formatting decimal numbers in the Data field:

    • separate numbers with commas, delete all blank spaces
    • in the string end add
      ,$0D - carriage return <CR>
      ,$0A - string end <LF>


    In documentation: 01 255 255 15 <CR> 01 10 25 255 <CR> <LF>
    Format: DEC DEC
    In iRidium (the Data field): 01,255,255,15,13 01,10,25,255,13,10


    Formatting the carriage return <CR> and sting end <LF>:

    In documentation: <CR> <CR> <CR> <LF> <LF> <LF>
    Format: HEX HEX DEC HEX HEX DEC
    In iRidium (the Data field): ,0x0D ,$0D ,13 ,0x0A ,$0A ,10

    AV & Custom Systems (HTTP)

    Commands of the AV & Custom Systems (HTTP) driver can be sent using one of the following methods:

    • GET - to get. To send the resource identifier: URI;
    • POST - to add, change, delete. To send a data unit;
    • PUT - to add, substitute. To send a data unit;
    • DELETE - delete the specified resource;
    • PATCH - partially change the resource.

    You can send the HTTP command from the items of your GUI project (see below).

    To send the HTTP command with JavaScript you can use the specialized method called .SendEx, or the methods .Set and .Send.


    GET Method

    Input the GET request in the URI window:

    • remove the part of the request with the resource IP-address and port for referring to the resource
    • add the request body in the URI window, including slash / in the beginning:
      • from the request httр://<host>:<port>/<url> leave only /<url> in the URI field of command settings


    In documentation: httр://192.168.0.100:81/cgi-bin/do?cmd=ir_code=B748BF00
    In iRidium (the URI field): /cgi-bin/do?cmd=ir_code=B748BF00
    GETrequestinGUI.png


    POST and PUT Methods

    Mark the valuable request parts and enter them in the URI and Data fields:

    • add the resource identifier in URI
    • add the request body in Data - it can be a big data unit. Include it in 'single quotes'


    Example 1:

    In documentation (POST): POST /YamahaRemoteControl/ctrl HTTP/1.1

    Accept: */*
    Accept-Language: ru
    Referer: http://192.168.10.102/
    Content-Type: text/xml; charset=UTF-8
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET
    CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; BRI/2)
    Host: 192.168.10.100
    Content-Length: 105
    Connection: Keep-Alive
    Cache-Control: no-cache
    Cookie: mstnc=1

    <YAMAHA_AV cmd="PUT"><System><Power_Control><Power>Standby</Power></Power_Control></System></YAMAHA_AV>

    In iRidium (the URI field): /YamahaRemoteControl/ctrl
    In iRidium (the Data field): '<YAMAHA_AV cmd="PUT"><System><Power_Control><Power>Standby</Power></Power_Control></System></YAMAHA_AV>'


    Example 2:

    In documentation (POST): POST /WAN/dvdr/dvdr_ctrl.cgi? HTTP/1.1

    User-Agent: MEI-LAN-REMOTE-CALL
    Host: 192.168.1.105
    Content-Length: 39

    cCMD_RC_POWER.x=100&cCMD_RC_POWER.y=100

    In iRidium (the URI field): /WAN/dvdr/dvdr_ctrl.cgi?
    In iRidium (the Data field): 'cCMD_RC_POWER.x=100&cCMD_RC_POWER.y=100'
    POSTrequestinGUI.png


    AV & Custom Systems (SSH)

    AV & Custom Systems (SSH) Driver Features and Functions

    Key Exchange Methods: ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group-exchange-sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1, diffie-hellman-group1-sha1, diffie-hellman-group-exchange-sha1

    Hostkey Types: ssh-rsa, ssh-dss

    Ciphers: aes256-ctr, aes192-ctr, aes128-ctr, aes256-cbc (rijndael-cbc@lysator.liu.se), aes192-cbc, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, arcfour, arcfour128, none

    MAC hashes: hmac-sha2-256, hmac-sha2-512, hmac-sha1, hmac-sha1-96, hmac-md5, hmac-md5-96, hmac-ripemd160 (hmac-ripemd160@openssh.com), none

    The formation and sending of commands to AV & Custom Systems (SSH) takes place using the command settings (Command и Add Line Feed), as well as using JavaScript.

    SSH1.png
    • Command - it’s the data that is transmitted to the hardware.
    • Add Line Feed - automatically transfers the line if a command is sent to the channel (0 - false, 1 - true).

    Javascript uses symbols ‘/n’ and 0x0A to translate a line:

    // Send: IR.GetDevice(name).Send([data])
    IR.GetDevice("AV & Custom Systems (SSH)").Send(['Command', '\n']);
    IR.GetDevice("AV & Custom Systems (SSH)").Send(['Command', 0x0A]);


    Custom TCP, UDP, HTTP Network

    Custom TCP Network, Custom UDP Network, Custom HTTP Network - is a way to organize your "AV & Custom Systems" drivers that have a same connection settings (Host and Port). This way allows you to create a single connection to equipment and add there many devices with the same commands and feedback. It is also give you a convenient access to devices and commands via the Java Script API. The AV devices inside of Network cannot have the same names, but the commands could be the same.

    To the Network you must add the device with the same type of transport that the Network has.

    AVCustumSystems1.png

    "Custom Network" driver will be available by name as the other drivers. The commands inside of Networ will be available as <device name>:<command name>

    For example: add the Custom TCP Network. Add the AV & Custom Systems (TCP) driver inside of Network and call it Device 1. Add the command Power On to this driver. Driver and commands will be available with Java Script as:

    // Set: IR.GetDevice(driver).Set(command, value)
    IR.GetDevice("Custom TCP Network").Set("Device 1:Power On", "")
     
    // Send: IR.GetDevice(name).Send([data])
    IR.GetDevice("Custom TCP Network").Send(['instruction', '\r\n']);


    Sending Commands

    You can send commands with the help of buttons or via the script.


    1 To send a command once, assign it to the When pressed or When released event:

    AVCustumSystems2.png

    2 To create a macro-command, add several commands to When pressed or When released :

    AVCustumSystems3.png

    A Delay() can be added between commands to control their speed of sending.

    3 To send a command in a cycle when holding the button, select When pressed and When held :

    AVCustumSystems4.png

    Hold settings are located in Object Properties > General:

    • Hold Time (ms) - the time after which Hold is activated when holding the item
    • Repeat Time (ms) - the interval for repeating commands from the Hold event.

    4 commands can be sent via JavaScript. In order to do that use the .Set(), .Send() or .SendEx() methods from Drivers API:

    var device = IR.GetDevice("AV & Custom Systems (TCP)");
    var HTTP_device = IR.GetDevice("AV & Custom Systems (HTTP)");
    var CommandString = 'comand data /1';
    var CommandName = "COMMAND";
     
    IR.AddListener(IR.EVENT_ONLINE , device, function() 
    {
        device.Set(CommandName, "");            // .Set command by name
        device.Send([CommandString,0x0D]);        // .Send command as string
        HTTP_device.SendEx({ 
          Type: "GET",        															
          Url:  "/command",
          Headers: {
            "Connection": "Close",
            "Accept-Language": "en",
            "Content-Type": "application/json",
            "Transfer-Encoding": "chunked",
            "Accept": "application/xml;"
          },
          cbReceiveText:   function(text, code, headers)    {IR.Log("cbReceiveText "+text);}
       });
    });

    Formatting of IR commands for the Send method is described in detail in iTach API.

    Feedback

    Feedback from equipment controlled with the help of AV & Custom Systems, can be received only with the help of JavaScript. it is conditioned by the fact that the program does not know to which equipment it will connect in advance. So it cannot determine the format and type of data which can be received.

    Functions used at procesing of incoming data are described in Drivers API. They work only with licenses which support feedback from script drivers ("Pro" licenses). In practice, a license activates work of listeners

    • IR.EVENT_RECEIVE_DATA - receiving data from devices in the byte format
    • IR.EVENT_RECEIVE_TEXT - receiving data from devices in the string format


    All the rest JavaScript methods and events work with any licenses.


    Example of processing incoming data with the help of JavaScript:

    var driver = IR.GetDevice("AV (TCP)");
    // IR.EVENT_RECEIVE_TEXT makes you able to parse incomming data from equipment 
    IR.AddListener(IR.EVENT_RECEIVE_TEXT, driver, function(text) 
    {
       // divide the received data by '\r\n' to get the separated strings
       var strings = text.split('\r\n');
       var string;
       while(string = strings.shift())
       {
    		// divide the string into parts with separator comma (it would be space or something else)
    		var parts = string.split(",");
    		switch(parts[0])
    		{
    		  // if the first part of devides string = "#OK"
    		  case "#OK":    
    			 // for equipment it means that we are ready to work
    			 IR.Log("Ready to control!");
    		  break;
     
    		  // if the first part of devides string = "#RID"
    		  case "#RID":
    		  // the second part should be "ALL", third part shouldn't be empty
    		  if (parts[1] == 'ALL' && parts[2]) 
    		  {
    			 //devide the third part into 12 parts to know the status on 12 variables we got in this feedback
    			 var slots = parts[2];
    			 for(var i = 0; i < 12; i++)
    			 {
    				var slot = parseInt(slots.substring(i, i+1));
    				a_dOutputs[i] = slot;
    				var fName = "OUT "+(i+1);   
    				// in AV driver we have a preconfigured Feedback channels with name OUT 1 ... OUT 12
    				//so we can write the received data in this feedbacks and display on items  
    				driver.SetFeedback(fName, slot);
    			 }
    		  }
    		break;
    		}	
    	}
    });


    Example of getting data in AV & Custom Systems (SSH):

    var driver = IR.GetDevice("AV & Custom Systems (SSH)")
    IR.AddListener(IR.EVENT_RECEIVE_TEXT, driver ,function(text) 
    {  IR.SetVariable("Drivers.AV & Custom Systems (SSH).AV Control Feedback", text); 
        IR.Log(text);
    });


    There are additional parameters of data packaging to connect AV & Custom Systems (Serial):

    Delimiter Properties.png

    Delimiter - it allows you to specify special characters, upon receipt of which the data will be packed into a string. As a delimiter you can specify a string consisting of any characters: single characters and their combinations. To process end-of-line characters in byte representation (0x0A, 0x0D), the delimiter must be specified in the formats: 0x0D, 0x0A | 0D, 0A | 0D 0A | 0D0A | 0D | 0A.

    Packet length - the parameter allows you to set a fixed packet length, specified in the number of string characters (by default 0 means the function is disabled). For example, if you set Packet Length to 6 characters, then every 6 characters received on the serial port will be packed into a separate string.

    Interval time (ms) - the parameter allows you to send data to the string if a pause is detected in the data stream. The pause duration is specified by the user in milliseconds (ms), by default 100 ms (a value of 0 means the waiting time is unlimited).

    All data received before a pause occurs in the stream equal to a user-specified value will be packed into a single separate string.


    When all three parameters or several of them are used simultaneously, data is packed into a string when one of the parameters is triggered. So if the specified data size was reached first, but the specified delimiter has not yet arrived, then the data will be generated according to the specified size, etc.

    Copying Data

    You can copy data from the AV & Custom Systems driver partly or completely and paste them in this project or in any other project.

    You can copy:

    • driver,
    • subdevices,
    • commands and feedbacks.

    To copy click the Right mouse button (Copy) or use Ctrl+C hot keys.

    To paste the copied items into the required area click the Right mouse button (Paste) or use Ctrl+V hot keys.

    AVCustumSystems6.png

    You can copy drivers from projects of the same or different types (panel / server projects).

    You can copy commands and feedbacks only from projects of the same type (panel or server projects) and paste them to the same drivers.

    When you copy tags, their relations with items are not copied. Only setting parameters are copied.


    Saving and Using a Created Driver

    The created AV & Custom Systems driver can be saved as a template in Images panel, drivers saved this way are located conveniently in one section that is available from the studio.

    1 Open Images section.

    2 Click left mouse button in a free area of a window with folders and create a new folder for future drivers (in our example it is AV & Custom Systems drivers).

    3 Hold left mouse button on the project folder in the panel to control pages and drag'n'drop it in the storage of the folder, named AV & Custom Systems drivers. Your driver is saved and will be available in future projects from this folder.

    AV save1.png


    To use a driver in a new project, drag'n'drop it to the workspace from the storage of the folder, named AV & Custom Systems driver.

    AV save2.png
    Источник — «https://dev.iridi.com/index.php?title=AV_%26_Custom_Systems/en&oldid=140530»
    About us
    Company
    Team
    History
    Philosophy
    Rewards
    Partnership
    Our partner
    Partnership Programs
    Apply for partnership
    products
    iRidium pro
    iRidium lite
    iRidium gate
    iRidium server
    Loads
    iRidium pro
    iRidium lite
    Other version
    Marketing materials
    Support
    On-line courses/Video
    Recommended equipment
    Other version
    iRidium pro
    Documentation
    FAQ
    Forum
    iRidium lite
    Documentation
    Forum
    Projects
    Standart projects
    Smart buildings
    Smart house
    Special solution
    Find a dealer
    News
    Youtube
    Twitter
    VK
    Logo
    contact@iridi.com
    +7 (499) 322-73-29

    Privacy policy