WBE2-I-KNX KNX Extension Module/en: различия между версиями

(Новая страница: «copy the file to the controller [https://wirenboard.com/wiki/index.php/%D0%9F%D1%80%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80_%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2_%D0%B…»)
м (FuzzyBot переименовал страницу KNX Module for WB6 (WBE2-I-KNX)/en в WBE2-I-KNX KNX Extension Module/en без оставления перенаправления: Часть переводимой страницы KNX Module for WB6 (WBE2-I-KNX).)
Метки: правка с мобильного устройства правка из мобильной версии
 
(не показаны 34 промежуточные версии 1 участника)
Строка 42: Строка 42:
'''dpkg -i iridiumserver_1.3.0-15590_RPI.deb'''
'''dpkg -i iridiumserver_1.3.0-15590_RPI.deb'''


Зайдите на web интерфейс iRidium Server по ссылке '''''адрес_вашего_wirenboard:8888''''' и авторизуйтесь на сервере.
Go to the iRidium Server web interface via the link '''''your_wirenboard_address:8888''''' and log in to the server.


Далее при создании проекта добавте драйвер KNX Serial (UMC) и настройте его как показано ниже
Next, when you create the project, add the KNX Serial (UMC) driver and configure it as shown below


[[Файл:iridium_server_knx_serial_driver_settings.jpg|Файл:iridium_server_knx_serial_driver_settings.jpg]]
[[Файл:iridium_server_knx_serial_driver_settings.jpg|Файл:iridium_server_knx_serial_driver_settings.jpg]]


ипользуйте '''''/dev/ttyMOD2''''' если модуль установлен во второй слот расширения
use '''''/dev/ttyMOD2''''' if the module is installed in the second extension slot








==  Работа через MQTT  ==
==  Working via MQTT  ==


Необходимо зайти в консоль и установить пакеты [https://contactless.ru/wiki/index.php/MQTT_KNX_Bridge wb-mqtt-knx (MQTT KNX Bridge)], knxd, knxd-tools:
Go to the console and install the packages [https://contactless.ru/wiki/index.php/MQTT_KNX_Bridge wb-mqtt-knx (MQTT KNX Bridge)], knxd, knxd-tools:


'''apt-get update'''
'''apt-get update'''
Строка 61: Строка 61:
'''apt-get install knxd knxd-tools wb-mqtt-knx'''
'''apt-get install knxd knxd-tools wb-mqtt-knx'''


После установки необходимо отредактировать файл '''/etc/default/knxd''':
After installation, you must edit the file '''/etc/default/knxd''':


Замените строку:
Replace the line:


DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:"
DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:"
на :
with:


'''DAEMON_ARGS="-d /var/log/knxd.log -t 0xffe -f 9 -e 1.2.255 -E 1.1.10:30 -u /var/run/knx -i -b ncn5120:/dev/ttyMOD1 -D -T -R -S"'''
'''DAEMON_ARGS="-d /var/log/knxd.log -t 0xffe -f 9 -e 1.2.255 -E 1.1.10:30 -u /var/run/knx -i -b ncn5120:/dev/ttyMOD1 -D -T -R -S"'''
Строка 72: Строка 72:




На WB6, с новой версией прошивки для корректного запуска knxd необходимо исправить 2 файла:
On WB6, with the new firmware version to run knxd correctly, you need to fix 2 files:


/etc/knxd.conf - вторую строчку заменить на:
/etc/knxd.conf - replace the second line with:
KNXD_OPTS="-t 0xffe -f 9 -e 1.1.255 -E 1.1.10:30 -b ncn5120:/dev/ttyMOD1 -D -T -R -S"
KNXD_OPTS="-t 0xffe -f 9 -e 1.1.255 -E 1.1.10:30 -b ncn5120:/dev/ttyMOD1 -D -T -R -S"




/lib/systemd/system/knxd.service - Закоментить User и Group (поставить перед ними решетки, как показано ниже) , либо удалить эти строки:
/lib/systemd/system/knxd.service - comment User and Group (write # as shown below) or remove these lines:
#User=knxd
#User=knxd
#Group=knxd
#Group=knxd


после этого следует перезагрузить контроллер и всё должно заработать
after that, you should reboot the controller and everything should work






Расшифровка ключей:
Decrypting keys:
{| class="wikitable"
{| class="wikitable"
!Ключ
!Key
!Функция
!Function
|-
|-
| -d /var/log/knxd.log
| -d /var/log/knxd.log
| уйти в фон и писать в лог.
| to go into the background mode and write to a log.
|-
|-
| -e 1.1.255
| -e 1.1.255
|назначает KNX-адрес knxd равным 1.1.255, как IP-шлюзу.
|assigns KNX-address knxd equal 1.1.255 as the IP gateway.
|-
|-
| -E 1.1.10:30
| -E 1.1.10:30
|указывает knxd выдавать KNX-адреса узлам из IP-сети в диапазоне 1.1.10..1.1.30
|specifies knxd to issue KNX addresses to nodes from an IP network in the range of 1.1.10..1.1.30
|-
|-
| -u /var/run/knx
| -u /var/run/knx
|открываем локальный Unix-сокет
|opens local Unix-socket
|-
|-
| -t 0xffe
| -t 0xffe
|задаём маску вывода отладочных сообщений.
|set the output mask of debug messages.
|-
|-
| -f 9
| -f 9
|задать макс. verbosity level
|set max verbosity level
|-
|-
| -i
| -i
|указываем слушать TCP-порт (по умолчанию 6720). Можно прописывать -i 6721 или другой порт. Не исключающая альтернатива -u
|specify listen to TCP-port (default 6720). It is possible to register -i 6721 or other port. Not exclusive alternative -u
|-
|-
| -b ncn5120:/dev/ttyMOD1
| -b ncn5120:/dev/ttyMOD1
|активируем ncn5120-драйвер на порту для MOD1 (при установке модуля в слот расширения MOD 2 следует указать ttyMOD2)
|activate ncn5120 driver for port MOD1 (when installing the module into the extension slot MOD 2 it should be noted ttyMOD2)
|-
|-
| -T -R
| -T -R
|активируем режим шлюза, туннеля (нужно для работы с ETS)
|activate the gateway, tunnel mode (you need to work with ETS)
|-
|-
| -D
| -D
|говорит knxd оповещать о себе (Discovery) в сети
|says knxd to announce themselves (Discovery) in the network
|-
|-
| -S
| -S
|запускаем сервер (который отвечает на мультикасты)
|run the server (which responds to multicasts)
|}
|}


Подробнее:  
More detailed:  


knxd --help
knxd --help




==  Работа ==
==  Operation ==


   
   




Для запуска KNX daemon, необходимо прописать строку в консоль:  
To start KNX daemon, you need to write a line in the console:  
'''service knxd start'''
'''service knxd start'''


При необходимости перезапуска:  
Restart if necessary:
'''service knxd restart'''
'''service knxd restart'''


Для проверки статуса:  
To check the status:  
'''service knxd status'''
'''service knxd status'''






Все логи хранятся в файле '''/var/log/knxd.log'''
All logs are stored in the file '''/var/log/knxd.log'''


При получении сообщения от KNX устройства данные публикуются в MQTT топик '''/devices/knx/controls/data''' на WirenBoard.
When you receive a message from the KNX device, the data is published to the MQTT topic '''/devices/knx/controls/data''' in Wiren Board 6.


Для управления устройствами KNX необходимо отправлять команды в MQTT топик '''/devices/knx/controls/data/on''' .
To control KNX devices you need to send commands to MQTT topic '''/devices/knx/controls/data/on'''.


Пример команды:
An example of a command:


mosquitto_pub -h 192.168.0.10 -p 1883 -t /devices/knx/controls/data/on -m "g:0/0/1 GroupValueWrite 0x01"
mosquitto_pub -h 192.168.0.10 -p 1883 -t /devices/knx/controls/data/on -m "g:0/0/1 GroupValueWrite 0x01"


Где:  
Where:  


-h 192.168.0.10 - IP-адрес контроллера с KNX
-h 192.168.0.10 - IP-address of the controller with KNX


-p 1883 - порт MQTT
-p 1883 - MQTT port


-t /devices/knx/controls/data/on - MQTT топик для выгрузки информации
-t /devices/knx/controls/data/on - MQTT topic for uploading information


-m "g:0/0/1 GroupValueWrite 0x01" - сообщение для KNX устройства
-m "g:0/0/1 GroupValueWrite 0x01" - message for a KNX device


Подробнее о работе с данными KNX: [https://contactless.ru/wiki/index.php/MQTT_KNX_Bridge wb-mqtt-knx (MQTT KNX Bridge)]
Learn more about working with KNX data:[https://contactless.ru/wiki/index.php/MQTT_KNX_Bridge wb-mqtt-knx (MQTT KNX Bridge)]




Скрипт для [https://contactless.ru/wiki/index.php/%D0%94%D0%B2%D0%B8%D0%B6%D0%BE%D0%BA_%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB_wb-rules wb-rules] упрощающий обработку телеграмм: [https://gist.github.com/Yanni66/bc7604bb8646d52c9c864b4ca40c63b6 knx_group_addresses.js]  
Script for [https://contactless.ru/wiki/index.php/%D0%94%D0%B2%D0%B8%D0%B6%D0%BE%D0%BA_%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D0%BB_wb-rules wb-rules] упрощающий обработку телеграмм: [https://gist.github.com/Yanni66/bc7604bb8646d52c9c864b4ca40c63b6 knx_group_addresses.js]  






При работе с ETS '''Важно''': в “interfaces” ETS надо выбирать сам интерфейс ПК, через который происходит общение. Обращение с knxd в по юникасту (ip-адресу хоста с демоном) не даёт запрограммировать устройства. На иллюстрации стрелкой отмечено, какой способ взаимодействия с ETS работает:
When working with ETS, it''''Important''': in “interfaces” ETS, it's necessary to choose the interface of the PC through which communication occurs. Requesting knxd b by unicast (host ip address with daemon) does not allow to program the devices. In the illustration, the arrow indicates which method of interaction with ETS works:




[[Файл:EtsInterface.png|500px|Интерфейсы]]
[[Файл:EtsInterface.png|500px|EST Interface]]


Так же если вы пользователь Windows 8, 10 советуем отключить антивирусы и брандмауэр, так как они могут мешать работе ETS.
Also, if you are a user of Windows 8, 10, we advise you to disable antivirus and firewall, as they can interfere with the work of ETS.

Текущая версия на 15:25, 22 апреля 2021

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

Pinout

 
WBE2-I-KNX extension module
Terminal Function
O1 (Red) KNX (+)
O2 (n/a) n/a
O3 (Gray) KNX (-)

 


Configuration

You need to set the module type in the web interface, sectionConfigs => Hardware Modules Configuration: for Internal slot 1 (MOD1) or for Internal slot 2 (MOD2) depending on the KNX module position.

 


Working via iRidium Server

Download the latest version of the installation of a deb package signed the iRidium server for Raspbian Jessie with the PIXEL 0 and WB (gen 6) here iRidium Pro downloads

 

copy the file to the controller (detailed description of how to copy files to the controller) and install it by running the command

dpkg -i iridiumserver_1.3.0-15590_RPI.deb

Go to the iRidium Server web interface via the link your_wirenboard_address:8888 and log in to the server.

Next, when you create the project, add the KNX Serial (UMC) driver and configure it as shown below

 

use /dev/ttyMOD2 if the module is installed in the second extension slot



Working via MQTT

Go to the console and install the packages wb-mqtt-knx (MQTT KNX Bridge), knxd, knxd-tools:

apt-get update

apt-get install knxd knxd-tools wb-mqtt-knx

After installation, you must edit the file /etc/default/knxd:

Replace the line:

DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:" with:

DAEMON_ARGS="-d /var/log/knxd.log -t 0xffe -f 9 -e 1.2.255 -E 1.1.10:30 -u /var/run/knx -i -b ncn5120:/dev/ttyMOD1 -D -T -R -S"


On WB6, with the new firmware version to run knxd correctly, you need to fix 2 files:

/etc/knxd.conf - replace the second line with: KNXD_OPTS="-t 0xffe -f 9 -e 1.1.255 -E 1.1.10:30 -b ncn5120:/dev/ttyMOD1 -D -T -R -S"


/lib/systemd/system/knxd.service - comment User and Group (write # as shown below) or remove these lines:

  1. User=knxd
  2. Group=knxd

after that, you should reboot the controller and everything should work


Decrypting keys:

Key Function
-d /var/log/knxd.log to go into the background mode and write to a log.
-e 1.1.255 assigns KNX-address knxd equal 1.1.255 as the IP gateway.
-E 1.1.10:30 specifies knxd to issue KNX addresses to nodes from an IP network in the range of 1.1.10..1.1.30
-u /var/run/knx opens local Unix-socket
-t 0xffe set the output mask of debug messages.
-f 9 set max verbosity level
-i specify listen to TCP-port (default 6720). It is possible to register -i 6721 or other port. Not exclusive alternative -u
-b ncn5120:/dev/ttyMOD1 activate ncn5120 driver for port MOD1 (when installing the module into the extension slot MOD 2 it should be noted ttyMOD2)
-T -R activate the gateway, tunnel mode (you need to work with ETS)
-D says knxd to announce themselves (Discovery) in the network
-S run the server (which responds to multicasts)

More detailed:

knxd --help


Operation

To start KNX daemon, you need to write a line in the console: service knxd start

Restart if necessary: service knxd restart

To check the status: service knxd status


All logs are stored in the file /var/log/knxd.log

When you receive a message from the KNX device, the data is published to the MQTT topic /devices/knx/controls/data in Wiren Board 6.

To control KNX devices you need to send commands to MQTT topic /devices/knx/controls/data/on.

An example of a command:

mosquitto_pub -h 192.168.0.10 -p 1883 -t /devices/knx/controls/data/on -m "g:0/0/1 GroupValueWrite 0x01"

Where:

-h 192.168.0.10 - IP-address of the controller with KNX

-p 1883 - MQTT port

-t /devices/knx/controls/data/on - MQTT topic for uploading information

-m "g:0/0/1 GroupValueWrite 0x01" - message for a KNX device

Learn more about working with KNX data:wb-mqtt-knx (MQTT KNX Bridge)


Script for wb-rules упрощающий обработку телеграмм: knx_group_addresses.js


When working with ETS, it's Important: in “interfaces” ETS, it's necessary to choose the interface of the PC through which communication occurs. Requesting knxd b by unicast (host ip address with daemon) does not allow to program the devices. In the illustration, the arrow indicates which method of interaction with ETS works:


 

Also, if you are a user of Windows 8, 10, we advise you to disable antivirus and firewall, as they can interfere with the work of ETS.