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
    Перейти к: навигация, поиск
    Эта страница является переводом страницы Global Cache. Перевод выполнен на 100%.

    Other languages:
    English • ‎русский

    Содержание

    • 1 iRidium for Global Cache
    • 2 Description
    • 3 Connection
      • 3.1 Ways of connection to Global Cache
      • 3.2 Setting up Global Cache
      • 3.3 Connection to Global Cache
        • 3.3.1 Changing the connection settings
      • 3.4 Setting up outputs and commands
        • 3.4.1 IR output
        • 3.4.2 Sensor Notify
        • 3.4.3 Serial
        • 3.4.4 Relay
    • 4 Creating commands
      • 4.1 IR output
        • 4.1.1 Database of Global Cache IR commands
        • 4.1.2 Learning via GC-IRL IR Learner
        • 4.1.3 Conversion of HEX (CCF)
        • 4.1.4 Adding commands in Device Base
      • 4.2 Serial
        • 4.2.1 ASCII (string)
        • 4.2.2 HEX (hexadecimal)
        • 4.2.3 DEC (decimal)
        • 4.2.4 Adding commands in Device Base
      • 4.3 Relay
    • 5 Sending commands
      • 5.1 Sending commands from the IR output
      • 5.2 Sending commands from Serial output
      • 5.3 Sending commands to Relay
    • 6 Feedback
    • 7 Emulator: project testing
    • 8 Synchronization with control panels

    iRidium for Global Cache

    a set of tools for creating interfaces to control Global Cache equipment

    The documentation was updated on 19.7.2021

    training:
    webinars and video-lessons >>

    download:

    • iTach IP2CC (WF2CC) relay control
    • GC-100-12 relay control


    Description

    The iRidium driver for Global Cache network adapters enables sending of IR and RS232 commands received from control panels via TCP/IP. The product line also has dry contact modules and sensors.

    With the help of Global Cache you can control any equipment with IR sensors or control СОМ ports: DVD/BluRay players, commutators, matrix, preamplifiers, etc.

    Data received from the СОМ port of controlled equipment can be processed with the help of JavaScript in iRidium.


    Connection

    Equipment configuration and settings required for iRidium to control Global Cache equipment.


    Ways of connection to Global Cache

    Global Cache equipment includes modules with Ethernet, Wi-Fi, Ethernet + PoE. The general connection scheme:

    AV HowItWorks.png


    The line of supported equipment:

    GC-Image-Ico.png

    GC-100-06, GC-100-12, GC-100-18, GC-100-18R

    • Ethernet
    • СОМ port (1 or 2 pcs)
    • selfcontained IR output/input of the sensor (3 or 6 pcs)
    • output of dry contacts (3 pcs)
    GC-iTach-WF-Image.png
    GC-iTach-IP-Image.png

    iTach WiFi to IR / iTach TCP/IP to IR

    • Wi-Fi or Ethernet
    • selfcontained IR output/input of the sensor (3 pcs)
    GC-iTach-WF232-Image.png
    GC-iTach-IP232-Image.png

    iTach WiFi to SL / iTach TCP/IP to SL

    • Wi-Fi or Ethernet
    • СОМ port (1 pc)
    GC-iTach-WFRelay-Image.png
    GC-iTach-IPRelay-Image.png

    iTach WiFi to СС / iTach IP to СС

    • Wi-Fi or Ethernet
    • output of dry contacts (3 pcs)



    Setting up Global Cache

    With the help of the converter web-interface set up:

    1. Global Cache network configuration. It is required to set up the static IP-address
    2. the work mode of IR outputs (if there are any). Output 3,5mm can operate in the mode of an IR emitter, IR blaster and sensor
    3. properties of the СОМ-port in accordance with the settings of controlled equipment


    See video-lessons on setting up the Global Cache hardware part


    Connection to Global Cache

    Add the Global Cache driver in PROJECT DEVICE PANEL from DEVICE BASE

    GC-AddDriver.png

    Connection properties:

    • Host - the Global Cache IP-address
    • Port - the main port (4998). System data, IR commands, sensors data and relay commands go through it
    • Module Type - the converter model
    • Send Mode - the mode of connection to the converter
      • 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
    • Confirm IR - to send the next IR command only after sending the previous one
    • Script Mode - defines where to send commands
      • Direct and Script - to send commands directly to GC and duplicate them to scripts
      • Script Only - to send commands to scripts only (to the converter, commands will not be sent when clicking on the button)
    • Ping Time - (ms) to check for connection with GC with regular intervals. 0 - ping is disabled
    • Disable Queue - to disable the queue of command sending in iRidium for commands no to be accunulated 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 GC (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
    • Control Mode - the device work mode (for iTach only)
      • Standart Unit - control via IR with the help of IR emitters
      • Single LED / Dual LED - control of LED lighting through 3,5mm slots and the lighting controller (see iTach API)


    To connect via the Internet indicate the IP-address (domain name) of your Internet router in the Host string. Set up Port Forwarding on your router for remote control of equipment.

    You can learn the public IP-address of your router with the help of Internet services, for example [1].


    Changing the 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("Global Cache").SetParameters({Host: "192.168.0.100", Port: 4998, SendMode: IR.ALWAYS_CONNECTED, ScriptMode: IR.DIRECT_AND_SCRIPT, IrConfirm: 0, SerialPort1: 4999, SerialPort2: 5000});
    }
    function External_1() {
    IR.GetDevice("Global Cache").SetParameters({Host: "215.110.10.10", Port: 4998, SendMode: IR.ALWAYS_CONNECTED, ScriptMode: IR.DIRECT_AND_SCRIPT, IrConfirm: 0, SerialPort1: 4999, SerialPort2: 5000});
    }

    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.


    Setting up outputs and commands

    Depending on the Global Cache module type you have access to different sets of outputs:


    IR output

    The output for sending IR commands with the help of IR emitters and IR blasters.

    GC-DriverOutput.png
    Commandsettings GC.png

    Setting up IR outputs:

    • Mode - Global Cache 3,5mm outputs can operate in one of the following modes:
      • IR Output - the mode for sending IR commands via the IR emitter or IR blaster
      • Sensor Notify - the sensor mode
    • Frequency (Hz) - the frequency of sending IR commands from the selected IR output. It can be changed for the output, the folder with commands or for a separate command.

    Setting up IR commands:

    • Delay (ms) - the delay befor command sending, calculated from sending of the previous command on the output
    • Change Frequency - enables to select frequency of command sending: by default or unique for this command
      • Frequency (Hz) - the frequency of command sending if Change Frequency: True
    • Repeat - the number of times to repeat the IR command (repeated on the side of Global Cache)
    • Offset - it is used only when Repeat > 1 for IR commands with a preamble. The preamble is a command part which you do not have to repeat several times. Offset - it is preamble length measured in couples of pulse-pauses making up the IR command. It is always an odd number Это всегда нечетное число. See more in Global Cache API
    • Data - the IR command in the Global Cache format. If the command is added from the Global Cache database, the Data field is hidden


    Setting up feedback:

    • Feedback from IR outputs is not supported


    Sensor Notify

    The Sensor Notify output is available if you select "Mode: Sensor Notify" in the settings of the IR output of the Global Cache module. GC sensors can be connected to it.

    GC SensNotifySettings.png

    Setting up the output: select IR output ang change the Mode parameter:

    • Mode: Sensor Notify - use the output in Sensor mode


    Setting up feedback about the sensor state:

    • Use Timer - to send forced requests about the sensor state with the interval indicated in Timer (ms)
    • Timer (ms) - how often the request about the sensor state has to be sent


    Serial

    The output for sending commands to the equipment COM-port (RS232)

    GC COMOutSettings.png
    GC COMDataSettings.png

    Setting up RS232 outputs:

    • Port - the TCP port for sending commands which have to be sent from Global Cache via the RS232 output. Commands are sent to different ТСР ports so GC could determine the СОМ-port and their destination:
      • 4999 - Serial port 1 of GC-100-ХХ and iTach modules
      • 5000 - Serial port 2 of a GC-100-ХХ module

    Setting up RS232 commands:

    • Data - the data string to be sent via the СОМ-port. Data strings can be sent in the HEX, ASCII, DEC formats. The syntax of data formatting is described below


    Setting up feedback from RS232:

    • indicate the feedback channel name. You can send data to this channel only using JavaScript, which processes data received from equipment.


    Relay

    Dry conatacts (relays), which enable lock/unlock of equipment control contacts.

    GC ССCommandSettings.png

    Setting up the output:

    • not required


    Setting up commands:

    • not required. To lock/unlock a relay, send 1 or 0 on the module output with the help of the "Relay 1 (2)" command. The command can be sent with the help of Button or Trigger Button.


    Setting up feedback about the relay state:

    • Use Timer - to send forced requests about the relay state with the interval indicated in Timer (ms)
    • Timer (ms) - how often the request about the relay state has to be sent


    Creating commands

    Rules for formatting IR commands and data for sending them via RS232. Relay control.


    IR output

    Global Cache has to send IR commands converted in the format presenting them as a sequence of pulses and pauses of the IR signal. The database of IR commands built-in iRidium Studio stores the converted commands so it is easy to use.

    You can convert IR commands you cannot find in the database from the НЕХ (CCF) to Global Cache format with the help of iConvert.

    IR commands can be "learned" by reading them from an IR remote control directly in iRidium Studio or with the help of iLearn. The commands received in such way will be automatically converted in the required format.


    Where to find IR commands:

    • Commands in the Global Cache format are stored in the database of IR commands in iRidium Studio
    • HEX (CCF) commands are provided by equipment manufacturers. They can be found on special resources
    • GC-IRL IR Learnerallows you to learn IR commands from the original remote control



    Database of Global Cache IR commands

    The online database of Global Cache IR commands does not operate without connection to the Internet. The commands are saved in the special Global Cache format. They will not work with other TCP/IP-to-IR converters.

    GCDB 1.png
    GCD 11.png

    Click '"Update"' to upload the list of commands. Drag the folder with commands on the Global Cache IR output in your project. The command do not require any additional setting.

    • Brands - the equipment manufacturer
    • Device Types - the equipment category of the manufacturer
    • Codesets & Commands - the equipment models and sets of IR commands for their control



    Learning via GC-IRL IR Learner

    GC-IRL IR Learner is a device reading IR commands for Global Cache. It can be connected to the СОМ-port of your PC or the СОМ-port of Global Cache GC-100-06(12,18,18R). Via iTach IP2SL(WF2SL) learning with the help of GC-IRL is not supported

    Global Cache iTach IP2IR and WF2IR have built-in readers of IR commands. The emitter of the IR remote control had to be directed to the port of module reload. The reader converts commands in the Global Cache format and sends them to PC.


    Learning Presets.png
    1. Place the cursor on the Global Cache IR output in iRidium Studio
    2. Click "(+) > to add the folder" of IR commands
    3. Click "(+) > to add the command" a number of times equals to the number of buttons of the remote control
    4. Name the dded commands in accordance with the use of the buttons
    5. Select the first command in the folder and click "Learning..."
    6. Select the device type (Learner Type): GC-IRL > GC-IRL IR Learner, GC iTach > iTach IP2IR / WF2IR
    7. Select the learning interface and settings depending on the connection of the learner:
      1. TCP/IP, Port: 4998 - iTach IP2IR / WF2IR
      2. TCP/IP, Port: 4999 - СОМ1 GC-100-(06,12,18,18R)
      3. TCP/IP, Port: 5000 - СОМ2 GC-100-(12,18,18R)
      4. RS232 - if GC-IRL is connected to the СОМ-port of your PC
    8. Click the Learn button to start learning
    9. Direct the emitter of the IR remote control on the GC-IRL learner and click the button which corresponds to the current command name on the screen. If the learing is succesful the command name will be automatically substituted with the next one.


    Learning Presets LearningProcess.png

    If the command name in the window doesn’t change when you click the button on the IR remote control – the learning failed! To find the reason of the problem, use the program iLearn from Global Cache. It will show errors at connection. Check the connection with the converter.


    Conversion of HEX (CCF)

    Documentation for AV equipment cotains IR commands for the equipment in the HEX (CCF) format. They have to be converted into the Global Cache format and added to your custom database of IR commands.

    Commands can be converted with the help of iConvert. It provides conversion of IR commands to the Global Cache format from HEX (CCF). Example:


    Example of transferring IR commands for the Panasonic TV in the Global Cache database of IR commands:

    Documentation Panasonic Plasma TV Remote control (IR). The initial IR command in HEX (CCF):

    POWER ON
    0000 0071 0000 0032 0080 003F 0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 0010 0010 0010
    0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010 0010
    0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0010 0010
    0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030
    0010 0030 0010 0030 0010 0030 0010 0010 0010 0010 0010 0010 0010 0030 0010 0030 0010 0030 0010
    0030 0010 0030 0010 0010 0010 0030 0010 0A98
    

    It is converted with the help of iConvert:

    IConvert.png

    We have the command in the Global Cache format but it is not ready for use. You have to remove the IR command header which is automatically added by iRidium Studio:

    sendir,<mod-addr>:<conn-
    addr>,1,37000,<repeatcount>,1,128,63,16,16,16,48,16,16,256,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,48,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,48,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,48,16,48,16,48,16,48,16,48,16,16,16,16,16,16,16,
    48,16,48,16,48,16,48,16,48,16,16,16,48,16,2712
    
    • The red color indicates the command part which must NOT be copied in iRidium. It is parameters to the 6th comma
    • The blue color indicates the command part which must be copied in iRidium. It is the command body after the 6th comma
    • Save the parameter after the 3d comma, 37000 - the required frequency of command sending (Hz). The frequency has to be indivatd in the settings of the Global Cache IR output. If the frequency differs not more than 100 Hz, it can be brought to a common value for all commands on the output


    Save the blue part of the IR command in the database of IR commands (as at work with GC-IRL)

    AV IR Commands Adding Manually.png

    Add the IR device from the database in your project and indicate in the Frequency field of its settings the frequency we colpied from iConvert.


    Adding commands in Device Base

    In the general "DEVICE BASE" you can create the list of devices and commands for fast adding in any new iRidium project. You can create IR devices only in your custom databse as the standard one is not available for editing.

    Create a user database:

    AV Database New.png

    Add the IR device in it (it is not a physical device but a folder with a set of IR commands)

    AV Add IR Device.png

    In the Commands & Feedbacks tab create a list of empty IR commands, select their names:

    AV IR Device Settings.png
    1. Select the first command in the folder and click "Learning..."
    2. Select the device type (Learner Type): GC-IRL > GC-IRL IR Learner, GC iTach > iTach IP2IR / WF2IR
    3. Select the learning interface and settings depending on the connection of the learner:
      1. TCP/IP, Port: 4998 - iTach IP2IR / WF2IR
      2. TCP/IP, Port: 4999 - СОМ1 GC-100-(06,12,18,18R)
      3. TCP/IP, Port: 5000 - СОМ2 GC-100-(12,18,18R)
      4. RS232 - if GC-IRL is connected to the СОМ-port of your PC
    4. Click the Learn button to start learning
    5. Direct the emitter of the IR remote control on the GC-IRL learner and click the button which corresponds to the current command name on the screen. If the learning is successful the command name will be automatically substituted with the next one.


    The learned IR command will be written in the database with the semi-bold font. Close the database editor after saving all changes.


    Add the ready IR device in your project: select your database in the DEVICE BASE list and drag the IR device on the Global Cache IR output

    GC IRLearner-MyOwn-base.png

    Set up Frequency (Hz) - the frequency of command sending from the IR output: for the IR output or for a selected device.



    Serial

    The Serial output of Global Cache devices enables command sending via RS232. These commands cannot be learned. They have to be added in iRidium from the equipment documentation. RS232 commands can be stored in one of the following formats:

    • ASCII - string
    • HEX - hexadecimal
    • DEC - decimal


    iRidium has to determine the format of the command you added. That is why the command has to be formatted in accordance with the iRidium syntax.


    ASCII (string)

    Formatting ASCII strings in Serial output:

    • 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 on the Serial output:

    • 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 on the Serial output:

    • 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


    Adding commands in Device Base

    In the general "DEVICE BASE" you can create the list of devices and commands for fast adding in any new iRidium project. You can create RS232 devices only in your custom databse as the standard one is not available for editing.

    Create a user database:

    AV Database New.png

    Add the RS232 device in it (it is not a physical device but a folder with a set of commands)

    RS232 1.png

    In the Commands & Feedbacks tab create a list of commands:

    RS232 4.png

    Open Command Properties with double-clicking and add a command in the Command field:

    RS232 5.png

    Add a ready set of RS232 commands in your project: select your database in DEVICE BASE, drag the RS232 device on the Global Cache Serial output.



    Relay

    Dry contacts (relays), enable lock/unlock of equipment control contacts.

    Relay command are preset in the Global Cache driver. To lock and unlock relays, send 1 or 0 to the module output. Commands can be sent with the help of Button or Trigger Button:

    BUTTON

    It is a graphic item with 1 or 2 states. Buttons depending on settings can be fixed or not. Each pressing on Button initiates sending of the same set of commands assigned to it.


    1 Create a variable were a number or string has to be written. Set it up as it is shown in the instructions.

    2 Create a button and set it up as follows (see all settings):

    UImakeAbutton.png
    Type Button
    Feedback Reaction of the item on user pressings and receiving data from equipment
    • Momentary - the button sends values but does not display feedback
    • Channel - the button sends values and displays feedback
    • None - the button does not visually react on pressings or receiving of feedback
    • Invert Channel - the button sends values and dispalys feedback inversely (false - on, true - off)

    3 Drag the variable on the button and indicate the following in the dialog window:

    UIdragCommand.png
    Action Send Number - write numbers in the variable. You can switch to Send String for sending ASCII strings
    Event for Action Interface events connected to the button. When the event are activated the indicated value will be written in the variable
    • Press - send on pressing
    • Release - send on releasing the button
    • Hold - send in cycles on holding the button
    • Move - it does not work with Button


    You can use several events together. For example, send [ 100 ] on pressing and [ 0 ] on releasing.

    Value Values for writing in the variable. The button sends the same value written in Value
    Add a feedback channel (Create a feedback channel) Tick this if you want the button not only to write values in the variable but also change its state when receiving data from tthe variable. The received value will affect the button state (on/off) and it can be displayed in the button text field.

    4 Now the variable is connected to the button. You can see all relations in OBJECT PROPERTIES > Programming

    TRIGGER BUTTON

    Trigger switch with the help of the "Trigger Button" item allows to send 2 values indicated in Trigger Value 1 and Trigger Value 2 alternately. When there is feedback the trigger automatically takes the respective value and sends the value opposite to the current one on pressing. The trigger cannot be set up for working with 3 and more values.


    1 Create a variable which has to be switched between 2 values. Set it up as it is shown in the instructions.

    2 Create a button and set it up as follows (see all item settings):

    UImakeAtriggerButton.png
    Type Trigger Button
    Feedback Reaction on pressings and receiving data from equipment
    • Channel - switches the value and displays feedback (other types are not used)
    Trigger Value 1 / Trigger Value 2 the values which will be sent alternately when clicking the button, they depend on the variable type

    3 Drag the variable on the trigger, in the dialog window indicate:

    UIdragCommandToTrigger.png
    Action Send Token - send to the variable Value indicated in the graphic item properties (Trigger Value 1 or Value 2 depending on the current trigger state)
    Event for Action An interface event connected to the button. When the event is activated the indicated value will be sent to the variable
    • Press - send on press
    • Release - send on release



    For Trigger button you can use only one event at a time

    Add a feedback channel (Create a feedback channel) Tick this field as it is required for the button to know its current value and change it when receiving data from the variable and on clicking.

    4 Now the variable is connected to the trigger. You can see all relations in OBJECT PROPERTIES > Programming


    Displaying relay states:

    Graphic items can display values of variabls by changing their state or text:

    CHANGE STATE

    1 Set up the graphic item so it would display the received values:

    SetUpItemToDisplayValue.png

    Select in the General settings:

    Feedback: Channel (if 0 = false) or
    Feedback: Invert Channel (if 0 = true).

    This feedback type enables the item to process data received from variables

    2 Assign the equipment channel (Feedback) to the graphic item:

    SetUpItemToDisplayValue2.png

    Drag the feedback channel or the variable on the item, select In Text in the dialog window

    For correct work the item needs 2 states. The first one corresponds to the zero value, the second - to any value different from zero.

    The $V template added in the item text will enable output of received values in the item text.

    DISPLAY IN TEXT

    1 Drag the equipment channel (Feedback) to the graphic item:

    DragChannelToDisplayTxt.png

    Drag the feedback channel or the variable on the item, select In Text in the dialog window

    The item can have any number of states and settings. The value will be output in the text field of all item states.

    DragChannelToDisplayValue.png

    Add $V in the item text. Drag the feedback channel or the variable on the item, select In Value in the dialog window. It will enable output of the received whole number and ass any text to it.

    There are templates for outputting fractions and etc.:

    LIST OF TEMPLATES

    Template Function
    $V the integer part of the received value
    $F1 ... $F5 float value. From 1 to 5 - number of symbols after a point
    $F,1 ... $F,5 float value. From 1 to 5 - number of symbols after a comma
    $S current Item state number
    $X the value in the HEX type
    $$ the $ symbol
    $P (levels only) the current value in percentage of Level maximum
    $H (levels only) the upper Level value
    $A (levels only) the upper value minus the lower value of Level
    $L (levels only) the lower Level value
    $R (levels only) the Level range: the upper value minus the lower value


    A template is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)

    • Download: templates of value output (0,7 Mb)



    Sending commands

    Sending commands from the IR output

    Sending of IR commands is possible only with the help of "Button" or via the script.


    1 To send a command once, assign it to the Press or Release event:

    AV IR Command Dragging to item.png

    2 To create a macro command, assign several commands to Press or Release:

    AV IR Command Action Dragging Macro.png

    You can add a delay between the commands - Delay() to regulate the speed of command sending

    3 To send a command in a cycle when holding the button, select Press and Hold:

    AV IR Command Hold Creating.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 To send a command in a cycle when holding the button using the Global Cache tools: indicate Repeat; 50 (or another big number), assign it to Press, assign the Stop IR command to Release.

    AV IR Command Hold+StopIR Creating.png

    When clicking on the button the GC IR emitter will start to execute the command the indicated number of times and will stop the command sending when you release the button. The operation is similar to the Hold command but required constant repeat of command sending to GC


    5 IR commands can be sent via JavaScript. In order to do that use the .Set and .Send methods from Drivers API:

    var device = IR.GetDevice("Global Cache");
    var CommandString = 'sendir,1:1,1,36127,1,1,96,31,17,16,16,16,16,32,16,32,49,32,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,17,16,16,16,16,16,32,16,16,16,16,16,16,16,16,32,32,16,16,16,16,16,16,16,16,32,17,16,16,16,16,16,32,16,4624';
    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
    });

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


    Sending commands from Serial output

    You can send RS232 commands with the help of "Button" or via the script.

    When sending data via the script, you can form a command with running values. For example, when controlling with Level: add the current position of the level slider in the command body and send it to equipment.


    1 To send a command once, assign it to the Press or Release event:

    AV GC232 Command Dragging to item.png

    2 To create a macro command, assign several commands to Press or Release:

    AV IR Command Action Dragging Macro.png

    You can add a delay between the commands - Delay() to regulate the speed of command sending

    3 To send a command in a cycle when holding the button, select Press and Hold :

    AV GC232 Command Hold Creating.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 RS232 commands can be sent via JavaScript. In order to do that use the .Set and .Send methods from Drivers API:

    var device = IR.GetDevice("Global Cache");
    var CommandString = "PON";
    var CommandName = "COMMAND 1";
     
    IR.AddListener(IR.EVENT_ONLINE , device, function() 
    {
        device.Set(CommandName, "");            // .Set command by name
        device.Send([CommandString, '\r\n'], 1);        // .Send command as string
        // device.Send([<data>], <transport_id>)
        // <data> - command string
        // <transport_id>  0 - port 4998, 1 - port 4999, 2 - port 5000
    });

    Sending commands to Relay

    Relays take values 0 - unlocked and 1 - locked. Commands can be sent with the help of

    BUTTON

    It is a graphic item with 1 or 2 states. Buttons depending on settings can be fixed or not. Each pressing on Button initiates sending of the same set of commands assigned to it.


    1 Create a variable were a number or string has to be written. Set it up as it is shown in the instructions.

    2 Create a button and set it up as follows (see all settings):

    UImakeAbutton.png
    Type Button
    Feedback Reaction of the item on user pressings and receiving data from equipment
    • Momentary - the button sends values but does not display feedback
    • Channel - the button sends values and displays feedback
    • None - the button does not visually react on pressings or receiving of feedback
    • Invert Channel - the button sends values and dispalys feedback inversely (false - on, true - off)

    3 Drag the variable on the button and indicate the following in the dialog window:

    UIdragCommand.png
    Action Send Number - write numbers in the variable. You can switch to Send String for sending ASCII strings
    Event for Action Interface events connected to the button. When the event are activated the indicated value will be written in the variable
    • Press - send on pressing
    • Release - send on releasing the button
    • Hold - send in cycles on holding the button
    • Move - it does not work with Button


    You can use several events together. For example, send [ 100 ] on pressing and [ 0 ] on releasing.

    Value Values for writing in the variable. The button sends the same value written in Value
    Add a feedback channel (Create a feedback channel) Tick this if you want the button not only to write values in the variable but also change its state when receiving data from tthe variable. The received value will affect the button state (on/off) and it can be displayed in the button text field.

    4 Now the variable is connected to the button. You can see all relations in OBJECT PROPERTIES > Programming

    TRIGGER BUTTON

    Trigger switch with the help of the "Trigger Button" item allows to send 2 values indicated in Trigger Value 1 and Trigger Value 2 alternately. When there is feedback the trigger automatically takes the respective value and sends the value opposite to the current one on pressing. The trigger cannot be set up for working with 3 and more values.


    1 Create a variable which has to be switched between 2 values. Set it up as it is shown in the instructions.

    2 Create a button and set it up as follows (see all item settings):

    UImakeAtriggerButton.png
    Type Trigger Button
    Feedback Reaction on pressings and receiving data from equipment
    • Channel - switches the value and displays feedback (other types are not used)
    Trigger Value 1 / Trigger Value 2 the values which will be sent alternately when clicking the button, they depend on the variable type

    3 Drag the variable on the trigger, in the dialog window indicate:

    UIdragCommandToTrigger.png
    Action Send Token - send to the variable Value indicated in the graphic item properties (Trigger Value 1 or Value 2 depending on the current trigger state)
    Event for Action An interface event connected to the button. When the event is activated the indicated value will be sent to the variable
    • Press - send on press
    • Release - send on release



    For Trigger button you can use only one event at a time

    Add a feedback channel (Create a feedback channel) Tick this field as it is required for the button to know its current value and change it when receiving data from the variable and on clicking.

    4 Now the variable is connected to the trigger. You can see all relations in OBJECT PROPERTIES > Programming

    To send commands to relays via JavaScript, use the example: For commands to Relay it is required to indicate the relay state:

    IR.GetDevice("Global Cache").Set("Relay 1", 1) 
    // close Relay 1
    IR.GetDevice("Global Cache").Set("Relay 1", 0) 
    // open Relay 1


    Feedback

    Feedback can be received only from relays, sensors and RS232. Feedback via RS232 can be received and processed only with the help of JavaScript.


    Sensor Notify, Relay

    Sensors and relays send in iRidium values 1 - locked, 0 - unlocked. The values can be output in the text of visually display on items.

    AV Sensor State In Value.png

    Graphic items can display values of variabls by changing their state or text:

    CHANGE STATE

    1 Set up the graphic item so it would display the received values:

    SetUpItemToDisplayValue.png

    Select in the General settings:

    Feedback: Channel (if 0 = false) or
    Feedback: Invert Channel (if 0 = true).

    This feedback type enables the item to process data received from variables

    2 Assign the equipment channel (Feedback) to the graphic item:

    SetUpItemToDisplayValue2.png

    Drag the feedback channel or the variable on the item, select In Text in the dialog window

    For correct work the item needs 2 states. The first one corresponds to the zero value, the second - to any value different from zero.

    The $V template added in the item text will enable output of received values in the item text.

    DISPLAY IN TEXT

    1 Drag the equipment channel (Feedback) to the graphic item:

    DragChannelToDisplayTxt.png

    Drag the feedback channel or the variable on the item, select In Text in the dialog window

    The item can have any number of states and settings. The value will be output in the text field of all item states.

    DragChannelToDisplayValue.png

    Add $V in the item text. Drag the feedback channel or the variable on the item, select In Value in the dialog window. It will enable output of the received whole number and ass any text to it.

    There are templates for outputting fractions and etc.:

    LIST OF TEMPLATES

    Template Function
    $V the integer part of the received value
    $F1 ... $F5 float value. From 1 to 5 - number of symbols after a point
    $F,1 ... $F,5 float value. From 1 to 5 - number of symbols after a comma
    $S current Item state number
    $X the value in the HEX type
    $$ the $ symbol
    $P (levels only) the current value in percentage of Level maximum
    $H (levels only) the upper Level value
    $A (levels only) the upper value minus the lower value of Level
    $L (levels only) the lower Level value
    $R (levels only) the Level range: the upper value minus the lower value


    A template is entered into the text field of a graphic Item and can be combined with other text or symbols (comments, units of measurement)

    • Download: templates of value output (0,7 Mb)


    Serial

    The СОМ-port of the Global Cache module returns data about the state of the controlled equipment to iRidium. But they can be processed only with the help of JavaScript, as it is not known in advance what data will be received.

    See the guide on work with JavaScript and the API for controlling drivers.
    The feedback processing from GC COM-ports:

    IR.AddListener(IR.EVENT_RECEIVE_TEXT, IR.GetDevice("Global Cache"), function(text, id)
    {
       if (id == 1)
       {
          IR.Log("COM1 data: "+ text); 
       }
       else if (id == 2)
       {
          IR.Log("COM2 data: "+ text); 
       }
    });
    // id - is a transport id of GC device, 1 - COM port 1, 2 - COM port 2

    Ready drivers with feedback from AV equipment can be found on the web site, in the JS Modules section



    Emulator: project testing

    Emulator - an application launched in iRidium Studio to test the project work.

    An Emulator works only when you authorized with login and password from iRidium Mobile web site

    Emulator work modes see in iRidium Studio > Tools > Options > Emulator:

    • Client Fullscreen - start the Emulator in Full Screen mode (press Alt+F4 to Exit)
    • Client Sound On - switch sound in app
    • Show log at Emuator Start - open the log window automatically at Emulator start (you can also use F4)


    Path to the license.png

    Hot keys:

    • F4 - open the debug log
    • F5 - launch Emulator
    • F7 - open the app Menu to manage account and download projects from iRidium Cloud
    • F8 - open the settings (password: 2007)



    Synchronization with control panels

    Upload and launch of the iRdidium project on the control panel is performed with the help of the iRidium Transfer application, installed on your PC. You can also upload the project on the panel from the editor via Transfer.


    Use i3 pro for iOS, Android, Windows, Mac in Test Mode by downloading projects via iRidium Transfer (the possibility is available for integrators):

    Emulator

    iRidium for Windows

    iRidium for iOS

    iRidium for Android

    iRidium for Mac


    iRidium Transfer settings


    Commercial use of iRidium is possible only at download of visualization projects with the help of the iRidium Cloud service on the iRidium Mobile web site (see the instructions).

    iRidium Cloud can be set up only by a registered integrator. After the setting up he can invite end-users to control the automation object.

    Источник — «https://dev.iridiummobile.net/index.php?title=Global_Cache/en&oldid=114721»
    Категория:
    • Инструкции
    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