Wiren Board Software/en: различия между версиями

Материал из Wiren Board
м (FuzzyBot переименовал страницу Программное обеспечение Wiren Board/en в Wiren Board Software/en без оставления перенаправления: Часть переводимой страницы Программное обеспечение Wiren Board.)
(Новая страница: «We also maintain our own debian repository releases.contactless.ru, which contains packages developed specially for the controller. By default, this repository is…»)
(не показана 41 промежуточная версия 3 участников)
Строка 1: Строка 1:
<languages/>
<languages/>
Wiren Board offers both ready web-interface and capabilities for its development. Source code of all software is open.
== Web-interface ==
[[Special:MyLanguage/Файл:Веб-интерфейс - главная.png|thumb|500 px|Web-interface Main Page]]
[[Special:MyLanguage/Wiren Board 4|Wiren Board 4]] features built-in, local web-interface. This is a convenient way to control connected devices and monitor connected sensors.
=== How to enter the interface ===
Just enter IP address of the controller into address line of your browser. Ref. also the article [[Special:MyLanguage/Как узнать IP-адрес контроллера|How to know IP-address of the controller]].
=== What to do with the interface? ===
* control the connected devices
* read the sensors
* assemble devices and sensors into panels (Dashboards)
Подробнее смотрите здесь - [[Wiren Board 4:Веб-интерфейс|Wiren Board 4:Web-interface]]


== Wiren Board software architecture ==
== Wiren Board software architecture ==


   
[[Special:MyLanguage/Файл:MQTT.png | thumb | 600px]]
 
=== Operating system ===
 
Wiren Board runs under a standard configuration of Debian Linux 7.0. There is an [https://www.debian.org/ports/arm/ official version] of the system suitable for architecture of the used processor. That's why it is possible to find any package in the standard repository and install it by one command (apt-get install).
 
 
=== Repository and Git ===
 
We also maintain our own debian repository releases.contactless.ru, which contains packages developed specially for the controller. By default, this repository is listed in Wiren Board software image (file /etc/apt/sources.list).
 
Весь исходный код доступен на  [https://github.com/contactless/ Github]. Там можно почерпнуть примеры для разработки собственного ПО.
 
 
=== MQTT ===
 
Wiren Board использует очередь сообщений MQTT ([http://en.wikipedia.org/wiki/MQTT статья на википедии]) в качестве единого стандарта сбора информации с внутренних модулей (реле, АЦП и т.д.) и внешних устройств (датчиков 1-Wire, устройств Modbus). Для каждого такого модуля и внешнего совместимого устройства разработан "драйвер", который передаёт данные в систему сообщений MQTT и обратно. Веб-интерфейс тоже берёт данные из этой системы сообщений, и все изменения, внесённые через него (например, включить реле) он отправляет туда же. Через ту же очередь сообщений работает и движок правил.
 
 
Подробнее смотрите [[Special:MyLanguage/MQTT|MQTT]].
 
 
=== Веб-интерфейс ===
 
Подробнее см.  [[Wiren Board 4:Веб-интерфейс|Wiren Board 4:Веб-интерфейс]]
 
Веб-интерфейс работает непосредственно на Wiren Board. В качестве веб-сервера работает лёгкий [http://manpages.ubuntu.com/manpages/lucid/man1/webfsd.1.html webfsd]. Сам сайт написан на [https://angularjs.org/ AngularJS], сайт взаимодействует с MQTT через [http://en.wikipedia.org/wiki/WebSocket WebSocket].
 


[[File:DebianLinux.png | thumb | 600px | The structure of the controller software. The MQTT message queue in the center is used to exchange information between different parts of the software]]
=== Движок правил ===


Wiren Board runs under a standard configuration of Debian Linux 9 Stretch. There is an [https://www.debian.org/ports/arm/ official version] of the system suitable for architecture of the used processor.  That's why it is possible to find any package in the standard repository and install it by one command (apt-get install).
Можно создавать правила, например, "если значение с датчика температуры ниже 18С, включи нагреватель". Правила пишутся на языке Javascript. Подробнее смотрите
[[Special:MyLanguage/Движок правил wb-rules|Движок правил wb-rules]].


We also maintain our own '''debian repository''' ''releases.contactless.ru'', which contains packages developed specially for the controller. By default, this repository is listed in Wiren Board software image (file ''/etc/apt/sources.list'').


All the source code is available at [https://github.com/contactless/wirenboard/ | Github].There you can find examples for development of your custom software.
== Как работать с модулями контроллера и портами ввода-вывода из своих программ ==


[[MQTT/en | '''MQTT message queue''']] — is the "skeleton" of the Wiren Board software architecture. For basic information about MQTT see [http://en.wikipedia.org/wiki/MQTT Wiki].


Drivers responsible for the hardware capabilities of the controller (digital inputs, ADC, ...) and functions of external connected devices (for example, connected via RS-485 relay modules), record their status in the MQTT queue in the form of special messages. The web interface reads these messages and displays the status of the devices based on them.
=== [[Special:MyLanguage/GSM/GPRS|GSM/GPRS]] ===


If a button is pressed in the web interface, the web interface sends a message to the MQTT queue, the device driver receives it and sends a command to the device.


Web interface, rules engine and built-in drivers work via MQTT. If you develop your own software in addition to the preinstalled one, we advise you to use MQTT as well.
=== [[Special:MyLanguage/Wi-Fi|Wi-Fi]] ===


[[Файл:Веб-интерфейс - главная.png|thumb|500 px|Web interface home page]]
'''[[Веб-интерфейс Wiren Board/en|Wiren Board web interface]]''' works directly on the controller. It can:
*monitor and manage the status of the controller and connected devices
*connect devices to the controller
*configure the controller and update its software
*write rules on the built-in engine
*set up SMS and email notifications
*watch historical graphs of values of the parameters (e.g., temperature)


'''[[Движок правил wb-rules/en|WB rules engine]]''' allows you to create your own rules for the controller, for example: "If the sensor temperature is less than 18°C, turn on the heater." Rules are created via [[Special:MyLanguage/Веб-интерфейс Wiren Board|web interface]] and are written in a simple Javascript-like language.
=== [[Special:MyLanguage/RS-485|RS-485]] ===


To work with SCADA-systems you have:
* [[Zabbix support/en|Zabbix support]]
* [[Шлюз Modbus TCP/en|Modbus TCP gateway]]
* [[Драйвер SNMP/en|SNMP driver]]


[[Как разрабатывать ПО для Wiren Board/en|How to develop software for Wiren Board]] — this article is for programmers.
=== [[Special:MyLanguage/GPIO|GPIO]] ===


[[Обновление прошивки/en|Firmware update]]


'''[[Node-Red/en|Node-RED]]''' - is a visual programming tool.
=== [[Special:MyLanguage/Watchdog|Watchdog]] ===

Версия 16:08, 17 июля 2015

Другие языки:

Wiren Board offers both ready web-interface and capabilities for its development. Source code of all software is open.


Web-interface

thumb|500 px|Web-interface Main Page

Wiren Board 4 features built-in, local web-interface. This is a convenient way to control connected devices and monitor connected sensors.

How to enter the interface

Just enter IP address of the controller into address line of your browser. Ref. also the article How to know IP-address of the controller.


What to do with the interface?

  • control the connected devices
  • read the sensors
  • assemble devices and sensors into panels (Dashboards)


Подробнее смотрите здесь - Wiren Board 4:Web-interface


Wiren Board software architecture

thumb | 600px

Operating system

Wiren Board runs under a standard configuration of Debian Linux 7.0. There is an official version of the system suitable for architecture of the used processor. That's why it is possible to find any package in the standard repository and install it by one command (apt-get install).


Repository and Git

We also maintain our own debian repository releases.contactless.ru, which contains packages developed specially for the controller. By default, this repository is listed in Wiren Board software image (file /etc/apt/sources.list).

Весь исходный код доступен на Github. Там можно почерпнуть примеры для разработки собственного ПО.


MQTT

Wiren Board использует очередь сообщений MQTT (статья на википедии) в качестве единого стандарта сбора информации с внутренних модулей (реле, АЦП и т.д.) и внешних устройств (датчиков 1-Wire, устройств Modbus). Для каждого такого модуля и внешнего совместимого устройства разработан "драйвер", который передаёт данные в систему сообщений MQTT и обратно. Веб-интерфейс тоже берёт данные из этой системы сообщений, и все изменения, внесённые через него (например, включить реле) он отправляет туда же. Через ту же очередь сообщений работает и движок правил.


Подробнее смотрите MQTT.


Веб-интерфейс

Подробнее см. Wiren Board 4:Веб-интерфейс

Веб-интерфейс работает непосредственно на Wiren Board. В качестве веб-сервера работает лёгкий webfsd. Сам сайт написан на AngularJS, сайт взаимодействует с MQTT через WebSocket.


Движок правил

Можно создавать правила, например, "если значение с датчика температуры ниже 18С, включи нагреватель". Правила пишутся на языке Javascript. Подробнее смотрите Движок правил wb-rules.


Как работать с модулями контроллера и портами ввода-вывода из своих программ

GSM/GPRS

Wi-Fi

RS-485

GPIO

Watchdog