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

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

    Содержание

    • 1 Creating Shared Data on the Server
      • 1.1 Description of example
      • 1.2 Creating and setting a server project
      • 1.3 Creating and setting panel projects
      • 1.4 Launching projects
      • 1.5 Synchronizing projects

    Creating Shared Data on the Server


    It is often necessary to control equipment of a smart home or a smart building from several smart phones or tablets. And there is a server in a project that is responsible for controlling equipment work 24/7 and for storing data in the database.

    Clients (smart phones and tablets) can have common access to the same data on the server, each client can change shared data and changes must be displayed on the server and other clients must see them. Clients can lose connection with the server, and in this case it is not possible to have the latest data. But when a client connected to the server, data in the client have to be updated automatically (have to be synchronized).

    Solution: In this case a project for a server is created and one or several panel projects are created. A server project is integrated in each panel project.


    Description of example


    Download a project example

    There are two fields on panel to enter time "Hours" and "Minutes". When Enter is pressed data are sent to virtual channels of iRidium server. Then virtual_to_virtual() script is launched by event, and the script writes received data in virtual tags. Time is displayed on all panels, that are subscribed to data in these tags. Besides, virtual tags are stored in the server database.

    Shared data(1).png

    Thus, each client (panel) can change time and all changes are stored in the database and are displayed on the screen of each client in real time.


    Creating and setting a server project

    1 Create a server project.

    2 Go to I/O tab and create the required number of virtual channels and virtual tags of shared data. Each channel must have a corresponding tag. Use the same name for corresponding channels and tags.

    Virtual.png

    3 Create a script for data exchange.

    function virtual_to_virtual(in_Type, in_Name, in_Value) {  
       IR.SetVariable("Server.Tags." + in_Name, in_Value);
       return in_Value;
    }

    More:Data exchange between a virtual channel and a tag..

    4 Select virtual_to_virtual() data exchange function in the Script Modifier parameter in the properties of virtual channels.

    Virtual channel params.png

    5 Set each virtual tag as required by the task.

    Virtual tag params.png
    • Access: Public
    • Persist: Yes
    • Store in DB: None / Signed 32bit / Float 64bit / String UTF-8
    • DB Save Strategy: Deadband / Interval


    More: Driver and server variables.

    You can store tags in the database but it is not required for creating shared data.

    6 Save a server project.


    Creating and setting panel projects

    1 Create a panel project.

    2 Add a driver to connect to iRidium server then indicate the file of a server project (a server project must be opened in iRidium studio at this moment).

    Project integration.png

    3 Select a server driver and Sync With Server Project button becomes available to get a list of all virtual tags of a server. Click this button.

    Sync with server project first.png

    More: Visualization of iRidium server control

    4 Set Save Value When Disconnected parameter - required behavior of virtual tags in panels when a server is disconnected: True - to remember the last tag value, False - to make the tag value empty.

    Feedback params.png

    5 Add graphic items:

    • items to enter data, for example, Edit Box,
    • items to display data, for example, Label (Type: Button, Hit: PassThrough).


    Shared data GUI(1).png

    6 Drag'n'drop virtual channels of "iRidium server" driver on graphic items for entering data and set them to work by Enter or Release event (depending on the type of graphic item).

    7 Drag'n'drop virtual feedback of "iRidium server" driver on display graphic items and set Text or Value property (depending on the type of graphic item).

    8 Enter server IP address.

    Iridium server address.png

    9 Save a project.

    You can create several panel projects you can also use one project on several devices - there will be no conflict.


    Launching projects

    1 Launch projects on devices in any order. You can use i3 pro Emulator and iRidium server for Windows.

    2 You can check how data are displayed in case a client is disconnected and connected again.

    3 You can also test stopping the server (close the server app) and then starting it again to make sure that data are stored (on condition that Persist = Yes).


    Synchronizing projects

    It's recommended first to create virtual channels and tags in a server project and then start using them in panel projects. But while creating a panel project changes in a server project can be made thanks to the following capabilities.

    • Updating virtual channels and tags in a panel project (synchronization of server and panel projects)

    If there are changes in the number of virtual channels and tags in a server project while panel projects are created, these changes are not displayed on a panel automatically, though they are intergrated in a project. To update the list of channels and tags, select the server driver in a panel project and "Sync With Server Project" button becomes available. Press it and the list of virtual channels and tags is updated.

    Sync with server project.png
    • Renaming channels and tags in a server project

    You can rename virtual channels and tags in a server project freely. After synchronization names are updated, and all connections set earlier on the panel side are saved.

    • Renaming the file of a server project

    After renaming the file of a server project open both projects in iRidium studio and then update Source Project parameter of the server driver in a panel project.

    Source project.png
    • Separate work with project files

    As server and panel projects are synchronized manually, it is possible to work with projects separately. For example, two developers can work with projects on different PCs. A server project is not required to launch a panel project.

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