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

    Содержание

    • 1 iRidium for Ajax
    • 2 Description
    • 3 Tested Equipment
    • 4 Advantages
    • 5 Connection
      • 5.1 Getting JSON file
      • 5.2 Work in iRidium studio
        • 5.2.1 Adding Ajax Network Driver
        • 5.2.2 Setting Commands and Feedback Channels
      • 5.3 Devices
        • 5.3.1 Notification
        • 5.3.2 Hub
        • 5.3.3 Door Protect
        • 5.3.4 Motion Protect
        • 5.3.5 Group
        • 5.3.6 MotionCam
        • 5.3.7 Dual Curtain Outdoor
        • 5.3.8 MotionCam Outdoor
        • 5.3.9 Leaks Protect
        • 5.3.10 Motion Protect Plus
        • 5.3.11 Motion Protect Outdoor
        • 5.3.12 Door Protect Plus
        • 5.3.13 WallSwitch
        • 5.3.14 Socket
        • 5.3.15 Relay
        • 5.3.16 Motion Protect Curtain
        • 5.3.17 HomeSiren
        • 5.3.18 Keypad
        • 5.3.19 Keypad Plus
        • 5.3.20 StreetSiren
      • 5.4 Setting Notification List Feedback
      • 5.5 Setting Arm Malfunction List Feedback
      • 5.6 Example of setting push-notifications

    iRidium for Ajax

    A set of tools to create control interfaces using a driver for Ajax security system.
    Support of the driver is paused!

    The documentation was updated on 12.8.2022

    Use the following example of a project to learn about driver capabilities.

    • download a server project
    • download a panel project

    Description

    iRidium for Ajax is a set of tools that allows to create an interface to conrol Ajax security system.

    iRidium for Tion allows control panels (iOS, Android, Windows, Mac) to connect to equipment via a cloud by manufacturers of Ajax (works via HTTP).

    The driver is meant only for a server project.

    Ajax hub does not have to be in the same local network with iRidium Server. You can know the state of the security system on a remote object if you have internet access.

    You can connect several Ajax hubs to an account in the Ajax security system app for different objects.

    Tested Equipment

    Hub, Hub Plus, Hub 2, Hub 2 Plus (including control of a hub via groups), Door protect, Motion protect, Space Control, Door Protect Plus, Motion Protect Plus, MotionCam, MotionCam Outdoor, MotionProtect Outdoor, Motion Protect Curtain, LeaksProtect, Socket, WallSwitch, Relay, Dual Curtain Outdoor, StreetSiren, HomeSiren, KeyPad, Keypad Plus, Button, Double Button, Tag, Pass.

    Advantages

    • Intrusion detection sensors, fire detectors, leakage sensors and relays to control power supply of devices remotelly can be easilty added to Ajax systems. You can buy required devices and add them to the system yourself. Sensors are connected with the help of a mobile app in several clicks.
    • The distance between the hub and sensors can be up to 2 000 meters in an open space. This figure reduces in apartments and offices due to walls, floors and partitions. Before installing sensors you can test radio connection with the help of Ajax Security Systems app, to find out the signal level.
    • Ajax sensors are powered by batteries unlike devices in wired systems. For the batteries to work as long as possibly the company developed a special energy efficient prorocol. It used the battery very efficiently and it can last up to 7 years.
    • Digital algorithms in Ajax sensors detect movements of a person. If a pet is shorter than 50 sentimeters and lighter than 20 kilograms, the sensors won't be activated by it .
    • Ajax continues to secure a house in the autonomous mode (without internet access) like other professional security systems: sensors send data to the hub and if there is an emergency, a siren is activated.
    • Your house is secure even if there is a power failure. All Ajax sensors work from batteries and the hub has a back-up battery. It provides up to 16 hours of reliable work. When the power is back on, the hub will chanrge the battery automatically.


    Connection

    Do the following to connect to Ajax equipment:

    1 Download Ajax Security System app. It is available in Google Play and App Store;

    2 Register an account in the app, add Ajax devices and devide them into groups (if necessary). You'll use the login and password of your Ajax account when you add a driver to your project in iRidium Studio;

    3 Create a server object with a required license in your account at iridi.com website.

    4 Get a JSON file with a list of devices. You have to log in website and fill in all required fields.

    5 Import a JSON file to iRidium Studio.

    6 Assign a server project to a panel one and set the logic of your project and a user interface.

    7 When the project is ready, upload it to the cloud object created earlier.


    The initial request of 1 device takes 1 seond, thus, it takes about 1 minute to request 60 devices.


    Missed nofitications are not diplayed at the app start.


    Feedbacks of devices states are requested when the server is started and then every 10 minutes (it allows not to overload the cloud service with requests even when a project is large and there several hubs in it). Notifications and alarms come with about a10-second delay. In case if a device is connected with a notification or an alarm, it is requested sooner to get the latest information about it.


    Some feedback channels do not work if there is no Notification subdevice. Do not delete it for correct work of the driver.


    Getting JSON file

    1 Create a cloud object with a required license in your account at iridi.com website.

    Ajax8.png

    2 Follow the link iridi.com.

    3 Choose i3pro and a third-party manufacturer which devices you want to add to yout project (in our cases it is Ajax Smart Home Security).

    Ajax0.png

    3 Log in with your integrator's account from Ajax website.

    Ajax1.png

    4 Choose an object created earlier in the list and click Link.

    Ajax2.png

    5 Enter the Ajax Network name in the window that appears and confirm linking (Link object Ajax_cloud with Ajax Systems).

    Ajax3.png

    6 A token of devices is formed on the page, click Download json for iRidium Studio to get a JSON file.

    Ajax4.png

    If too much time has passed after authorization on Ajax service and no linking has been done (JSON file is not downloaded), follow the link again and repeat actions described earlier.

    Work in iRidium studio

    Adding Ajax Network Driver

    1 Create a server project iRidium studio. Click Universal import from JS (*.js, *.json) and choose a saved JSON file.

    Ajax5.png

    2 Choose devices you want to add to the project.

    Ajax9.png

    3 The driver will all devices will appear int he driver tree.

    Ajax7.png

    Settings of the driver:

    • Log Level - the level of logging;
    • Keep Alive - interval to check TCP connection. If there is no answer to Keep Alive request, the driver will be forced to the turned off state;
    • Token - token of the driver (filled in automatically during import);
    • Driver Version - a version of the driver.
    AjaxSubdevice.png

    Settings of devices

    • Name - the name of a device (names in iRidium studio can differ from names in the server web-interface);
    • Driver Type - Ajax Network;
    • Device ID / Group ID - ID of the device / group (filled in automatically during import);
    • Device Type - a type of the device (Hub, Door Protect, Motion Protect, Notification, Group);
    • Use Local Time :
      • False - use London time zone;
      • True - use time of the server.


    Setting Commands and Feedback Channels

    SendRecieve.png

    Synchronize the server project with the panel on and set Commands and Feedbacks to control equipment from a graphic interface. To send a command, drag'n'drop it on a graphic item and enter a value that must be sent. To display a value from a feedback channel, drag'n'drop Feedback on a graphic item and choose how to display a value.


    Read more about work with graphic items in the "Types of graphic items" article.

    You'll find information about supported Ajax devices, their commands and feedback channels below.


    Devices

    Notification

    Command / Feedback Input / expected values Description
    Command:
    Clear Notification List any value Clear the current list of notifications.
    Feedback:
    Notification List json A list of notifications.

    When the server is offline, notifications won't come. You'll get only those notifications, which events happened when iRidium server was online.

    It is not recommended to delete this subdevice from the project. Some feedback chanels in other subdevices depend on the work of notifications.

    Last Notification Message String Text of the last notification.
    Last Notification Time String Time of last notification.
    Last Notification Color int 0-4 Color indication of notifications. The color is defined by Ajax depending on the importance of a message: 1 - grey, 2 - green, 3 - orange, 4 - red. 0 - means that there is no message, "transparent" color.


    Hub

    Command / Feedback Input / expected values Description
    Command:
    Arm/Disarm 0 / 1 Arm a security more \ Disarm a security mode (Arm - 1. Disarm - 0).
    Night Mode 0 / 1 Turn on / off a night mode.
    If a mode to control groups is not turned on, Night Mode can be used only to turn on (to turn off the mode, the system must be armed or disarmed). In a group mode it works like 0/1.
    Group Mode On/Off 0 / 1 A mode to control groups (On - 1, Off - 0).

    Groups are set in the Ajax app and they must be formed before importing a JSON file.

    The group mode can be turned on and off only if the Hub is disarmed

    Panic! any value Alarm button.
    Feedback:
    Arm/Disarm 0 / 1 The state of the security mode (Arm - 1. Disarm - 0).
    Night Mode 0 / 1 Night mode (On - 1, Off - 0).
    Group Mode 0 / 1 A mode to control groups (On - 1, Off - 0).
    Battery 0-100 Per cent of the hub battery level.
    Online 0 / 1 Online \ Offline of the hub ( 0 - offline, 1 - online).
    Tampered 0 / 1 The state of the hub top (0 - Not tampered, 1 - tampered).

    The system will be armed despite the warnings.

    To display errors in a list, use the following manual on using a feedback channel Arm malfunction list.

    Door Protect

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 Online \ Offline of the device (0 - offline, 1 - online).
    Temperature value Temperature in degrees Celsius.
    Tampered 0 / 1 The state of the protective top (0 - Not tampered, 1 - tampered).
    Battery 0-100 Per cent of the sensor battery level.
    Open/Close 0 / 1 The State of the door sensor (0 - Opened, 1- Closed).


    Motion Protect

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 Online \ Offline of the device (0 - offline, 1 - online).
    Temperature value Temperature in degrees Celsius.
    Tampered 0 / 1 The state of the protective top (0 - Not tampered, 1 - tampered).
    Battery 0-100 Per cent of the sensor battery level.
    Motion 0 / 1 The state of the motion sensor (0 - not detected, 1 - motion detected).


    Group

    Command / feedback Input / expected values Description
    Command:
    Arm/Disarm 0 / 1 Arm / Disarm a group of devices (0 - disarm, 1 - arm).

    Groups of devices must be created and set in the app before import!

    Feedback:
    Arm/Disarm 0 / 1 The state of a device group (0 - disarm, 1 - arm).


    MotionCam

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of device top (0 - not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battety level of the sensor.
    Motion 0 / 1 Motion sensor (0 - not detected, 1 - motion is detected).

    To diplay photos made when a motion sensor was activated, read the following manual on using notifications of the Photo type.

    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).


    Dual Curtain Outdoor

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of device top (0 - not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battety level of the sensor.
    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not arme in night mode,
    1 - armed in night mode).
    Motion Left 0 / 1 Motion on the left (0 - not detected, 1 - motion is detected).
    Motion Right 0 / 1 Motion on the right (0 - not detected, 1 - motion is detected).
    Detector View Blocked Left 0 / 1 Error of blocking the left sensor
    (0 - sensor is not blocked,
    1 - left sensor is blocked).
    Detector View Blocked Right 0 / 1 Error of blocking the right sensor
    (0 - sensor is not blocked,
    1 - right sensor is blocked).


    MotionCam Outdoor

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.
    Motion 0 / 1 Motion sensor (0 - not detected, 1 - motion is detected).

    To diplay photos made when a motion sensor was activated, read the following manual on using notifications of the Photo type.

    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).
    Detector View Blocked 0 / 1 Error of blocking sensor
    (0 - sensor is not blocked,
    1 - sensor is blocked).


    Leaks Protect

    Command / Feedback Input / Expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battety level of the sensor.
    Leaks Detection 0 / 1 Leakage sensor (0 - no leakage, 1 - leakage is detected).

    To diplay photos made when a motion sensor was activated, read the following manual on using notifications of the Photo type.

    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).


    Motion Protect Plus

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.
    Motion 0 / 1 Motion sensor (0 - not detected, 1 - motion is detected).
    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).


    Motion Protect Outdoor

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.
    Motion 0 / 1 Motion sensor (0 - not detected, 1 - motion is detected).
    Detector View Blocked 0 / 1 Error of blocking sensor
    (0 - sensor is not blocked,
    1 - sensor is blocked).


    Door Protect Plus

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of the device (0 - offline, 1 - online).
    Temperature фтн value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the protective top (0 - Not tampered, 1 - tampered).
    Battery 0-100 Per cent of the sensor battery level.
    Open/Close 0 / 1 Door sensor open/closed (0 - Closed, 1- Open).


    WallSwitch

    Command / feedback Input / expected values Description
    Command:
    On\Off 0/1 Wall switch (0 - turn off, 1 - turn on).
    Feedback:
    On/Off 0 / 1 Wall switch (0 - off, 1 - on).
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Voltage any value Supplied voltage.
    Electric Energy Consumed any value Power consumption of a device in kWh.


    Socket

    Command / feedback Input / expected values Description
    Command:
    On\Off 0/1 Socket (0 - turn off, 1 - turn on).
    Feedback:
    On/Off 0 / 1 Socket (0 - off, 1 - on).
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Voltage any value Supplied voltage.
    Electric Energy Consumed any value Power consumption of a device in kWh.


    Relay

    Command / feedback Input / expected values Description
    Command:
    On\Off 0/1 Relay (0 - turn off, 1 - turn on).
    Feedback:
    On/Off 0 / 1 Relay (0 - off, 1 - on).
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Voltage any value Supplied voltage.


    Motion Protect Curtain

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.
    Motion 0 / 1 Motion sensor (0 - not detected, 1 - motion is detected).
    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).


    HomeSiren

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.
    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).


    Keypad

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.


    Keypad Plus

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.


    StreetSiren

    Command / Feedback Input / expected values Description
    Feedback:
    Online 0 / 1 State of equipment (0 - offline, 1 - online).
    Temperature any value Temperature in degrees Celsius.
    Tampered 0 / 1 State of the device top (0 - Not tampered, 1 - tampered).
    Battery 0 - 100 Per cent of the battery level of the sensor.
    Arm in Night Mode 0 / 1 Arming in night mode
    (0 - not armed in night mode,
    1 - armed in night mode).


    Setting Notification List Feedback

    1 Create Advanced list graphic item. It will be in a future list where notifications will be stored. For convenience an Advanced list in the vertical orientation can be created.

    2 Create a popup (list template) and fill it in with the following items:

    • Multistate level - it displays color indication of notifications (0 - leave transparent, 1 - grey, 2- green, 3 - orange, 4 - red).
    • Label 1 - it displays time when a notification came.
    • Label 2 - it displays the text of notifications.
    Ajax11.png

    3 Open theTemplate setting tab in the settings of Advanced list , click Add and choose a template popup for notifications that you prepared earlier.

    Ajax12.png

    4 Choose the added popup and write type in the Code field - Code: type.

    Ajax13.png

    5 To set a template, open it with a double click. Then add labels to the template. Enter event in the Type field. Then add the following labesl with requierd tokens: Item 1.Value, Item 2.Text, Item 3.Text.

    After adding labels, write a Value to each of them. To write in the Value lines, double-click on the label line. Value labels:

    • Item 1.Value - eventType,
    • Item 2.Text - text,
    • Item 3.Text - time.
    Ajax14.png

    6 After setting labels and templates, assign Notification List feedback channel to Advanced List. To do it, click on the Advanced List, go to Data source in the list settings. Choose Driver > Feedbacks > Notification List. Setting a list with notifications is completed.

    Ajax10.png


    If you plan to useMotionCam or MotionCam Outdoor devices in your project, to support viewing photos made when a motion sensor is activated, create a template-popup. Set it to appear when a notification comes from devices with a camera. Follow the steps below to do it:

    1 Create a template-popup for notifications with display of photos. The previous template for notifications can be used. Only add to it a button to open a popup with a fram-by-frame animation from the camera.

    Ajax20.png

    2 Create a popup where frame-by-frame animation will be displayed. To display a series of photos, use Multistate button.

    Ajax21.png

    3 Set a required speed of frame animations in the Time up parameter of theMultistate button item.

    Ajax22.png

    4 Program a button in the notification template to open a popup with frame animation. The action can be assigned to Press or Release.

    Ajax23.png

    5 Add the following script to your project:

    var g_oMultistatePopup = IR.GetItem('VideoPopup'); // popup where your multistate elemnt is located
    var g_oMultistateElement = g_oMultistatePopup.GetItem('Video'); // your multistate element
     
    IR.AddListener(IR.EVENT_LIST_ITEM_CHANGE, IR.GetItem("Main").GetItem("List notification"), function(itemID, subItemID, event_type, object, index) {
        switch(event_type) {
            case IR.EVENT_LIST_ITEM_RELEASE:
                {
                    var data = JSON.Parse(IR.GetVariable("Drivers.iRidium Server.Ajax Network.Notification:Notification List"));
                    var photos = data[index].photos;
                    if(photos) {
                        g_oMultistateElement.Visible = true;
                        var item = g_oMultistatePopup.GetItem('Multistate AJAX Photo');
                        if(item)
                            IR.DeleteItem(item);
                        item = g_oMultistateElement.Clone('Multistate AJAX Photo');
                        g_oMultistateElement.Visible = false;
                        for(var i = 0; i < photos.length; i++) {
                            //IR.Log(photos[i]);
                            if(item.GetState(i)) {
                                item.GetState(i).ImageStretch = 2;
                                item.GetState(i).Image = photos[i];
                            } else {
                                item.CreateState();
                                item.GetState(i).ImageStretch = 2;
                                item.GetState(i).Image = photos[i];
                            }
     
                        }
                        IR.SetTimeout(2000, function() {
                            item.Feedback = 3; // feedback ON for multistate to work
                        });
                    }
                    break;
                }
        }
    });


    Setting Arm Malfunction List Feedback

    The feedback is meant to display a list of problems when the hub is in the armed mode. The feedback works if "Checking system integrity" function is turned on in the hub settings of Ajax app.

    To get a list of error when arming a system, do the following steps:

    1 Create a popup. This popup will be a dialogue window that appears when a problem is found.

    2 Place Advanced list' item on the popup:

    3 Choose 'Arm Malfunction List feedback as a source of data':

    Ajax15.png

    4 Create a template-popup for a malfunction message. The popup must contain a graphic item that will display the text of the message.

    Ajax16.png

    5 Double click on Advanced list. Click on + and choose your template-popup for notifications . Find the Code: field and enter type:

    Ajax17.png

    6 Open the template settings by double-clicking on the name of your template-popup.

    7 Click + to add a new object.

    8 Choose the Text property of the graphic item on the template-popup that will be used to display the text of the message.

    9 Enter text' to the right of the path to the text property of the item. Enter malfunction in the Type fieldog of the bottom of the window'.

    Ajax18.png

    10 ClickОК to finish setting a list of malfunctions.

    11 Use the following script to call a popup with a formed list:

        var HubName = "Cottage Hub"
        var MalfunctionListPopup = IR.GetPopup("Arm malfunction list Hub ")
     
    IR.AddListener(IR.EVENT_TAG_CHANGE , IR.GetDevice("iRidium Server"), function(name,value)
    {
        //Arm Malfunction List
        if (name == "Ajax Network.Notification:Last Notification Message" && (value.indexOf("armed w") != -1) && (value.indexOf(HubName) != -1))
        {
                IR.ShowPopup(MalfunctionListPopup.Name)
        }
    })



    Example of setting push-notifications

    You can set push-notifications to be sent to your smartphone or tablet (available for iOS and Android). It is required for instant notification of users in case an alarm system goes off or if there are any other urgetn notifications of the Ajax system.

    Last Notification Color feedback channel is responsible for the color of the notification. If it is required to get Push-notifications only in case when the alarm goes off, replace value >= 3 with value == 4 in the fifth line.

     IR.AddListener(IR.EVENT_START, 0, function () {
        IR.AddListener(IR.EVENT_TAG_CHANGE , IR.GetDevice("Ajax Network"), function(name,value)
        {        
            IR.Log( "~~~TagChange: " + name + " - " + value);
            if (name == "Notification:Last Notification Time")
            {
     
                IR.SetTimeout(100, PushAlarm)
            }        
        })
    });
    function PushAlarm() 
    {
        if (IR.GetVariable("Drivers.Ajax Network.Notification:Last Notification Color") == 4)
            {
                var message = IR.GetVariable("Drivers.Ajax Network.Notification:Last Notification Message");
                IR.SendPush(message, "", 1, status, this , 1);
            }
    }
    function status (object) {
        IR.Log('Status of Push: ' + object.Error + ' - ' + object.ErrorDescription);
    }

    Read more about setting push-notifications in the Push-notifications article.

    Источник — «https://dev.iridi.com/index.php?title=Ajax/en&oldid=123054»
    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