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

    Notification about incorrect work of climate control system

    This article describes a situation when the current temperature does not reach the set value for a long time. In this case a user must be informed about incorrect work of equipment.
    For example, a user must be notified if the difference between the current and the set temperature is more than 4 degrees for 4 hours.
    Here is a step by step instruction how to do it.
    1 Create a new project or open an existing one.
    2 Add a driver you'll work with and set it.
    3 Create feedback channels to display current and set temperatures.

    TempDeviation 1.png

    4 Create a new script and add to it the following:

    IR.AddListener(IR.EVENT_START,0,function() {
     
        var l_nIntervalMilsec = 1000*60*60*4; // conversion 4 hours to a miliseconds 
        var MinTempDeviation = 4; // Minimum temperature outflow
        var l_sDriverName = "KNX IP BAOS 770"; // The name of the driver used in the project.
        var l_sSetTemp = "SetTemp"; // Name of the feedback temperature setpoint
        var l_sTemp = "TempSensor"; // Name of the temperature sensor feedback  
     
        var l_nTimer = 0; // Number of seconds for the interval
        var l_nInterval = 0; // Interval
     
        // When the temperature arrives, we check if the temperature is higher than the set one, then we set the interval for counting 4 hours
        // Remove interval if everything is ok
        IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice(l_sDriverName), function(m_sName, m_sValue){
            if(m_sName == l_sTemp) {
                var m_nSetTemp =  IR.GetVariable("Drivers."+l_sDriverName+"."+l_sSetTemp);
                if(Math.abs(m_nSetTemp - m_sValue) > MinTempDeviation){
                    if(l_nInterval == 0){
                        SetInterval();
                    }
                } else {
                    if(l_nInterval != 0){
                        IR.ClearInterval(l_nInterval);
                        l_nInterval = 0;
                    }
                }
            }
         });
     
        // The function sets the interval in which the temperature will be compared.
        function SetInterval(){
            l_nInterval = IR.SetInterval(1000, function(){
                var m_nSetTemp =  IR.GetVariable("Drivers."+l_sDriverName+"."+l_sSetTemp);
                var m_nTemp =  IR.GetVariable("Drivers."+l_sDriverName+"."+l_sTemp);
                if(Math.abs(m_nSetTemp-m_nTemp) > MinTempDeviation){
                    l_nTimer++;
                    if(l_nTimer >= l_nIntervalMilsec){
                        Alarm();
                        l_nTimer = 0;
                    }
                }
            });
        }
     
        // The function that calls the necessary notification - inside this function you can use the necessary notification method 
        function Alarm(){
            IR.Log("Attention temperature difference of 4 degrees is kept for 4 hours");
        }
    });

    5 Write your values in the variables:

    • l_nIntervalMilsec - time interval in miliseconds
    • MinTempDeviation - difference between temperatures
    • l_sDriverName - name of driver used in the project;
    • l_sSetTemp - name of feedback channel, displaying the value of the set temperature
    • l_sTemp - name of feedback, displaying the value of the current temperature.

    6 Write a required notification means in the Alarm function. For example, Push-notifications can be used.

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