Модуль расширения KNX (WBE-I-KNX)/en: различия между версиями
(Новая страница: «with:») |
(Новая страница: «Decrypting keys: {| class="wikitable" !Key !Function |- | -d /var/log/knxd.log | to go into the background and write to a log. |- | -e 1.1.255 |assigns KNX-addres…») |
||
Строка 45: | Строка 45: | ||
Decrypting keys: | |||
{| class="wikitable" | {| class="wikitable" | ||
! | !Key | ||
! | !Function | ||
|- | |- | ||
| -d /var/log/knxd.log | | -d /var/log/knxd.log | ||
| | | to go into the background and write to a log. | ||
|- | |- | ||
| -e 1.1.255 | | -e 1.1.255 | ||
| | |assigns KNX-address knxd equal 1.1.255 as the IP gateway. | ||
|- | |- | ||
| -E 1.1.10:30 | | -E 1.1.10:30 | ||
| | |specifies knxd to issue KNX addresses to nodes from the IP network in the range 1.1.10..1.1.30 | ||
|- | |- | ||
| -u /var/run/knx | | -u /var/run/knx | ||
| | |open local Unix socket | ||
|- | |- | ||
| -t 0xffe | | -t 0xffe | ||
| | |set the output mask of debug messages. | ||
|- | |- | ||
| -f 9 | | -f 9 | ||
| | |set max verbosity level | ||
|- | |- | ||
| -i | | -i | ||
| | |listen to the specified TCP port (default 6720). It is possible to register -i 6721 or other port. Not exclusive alternative -u | ||
|- | |- | ||
| -b ncn5120:/dev/ttyAPP2 | | -b ncn5120:/dev/ttyAPP2 | ||
| | |activate the ncn5120 driver on the port for MOD1 (when installing the module in the MOD 2 expansion slot, specify ttyAPP3) | ||
|- | |- | ||
| -T -R | | -T -R | ||
| | |activate gateway, tunnel mode (needed to work with ETS) | ||
|- | |- | ||
| -D | | -D | ||
| | |says knxd to announce themselves (Discovery) in the network | ||
|- | |- | ||
| -S | | -S | ||
| | |start the server (which responds to multicasts) | ||
|} | |} | ||
Версия 19:12, 1 июля 2019
Pinout
When ordering the expansion module together with the controller are installed other terminals (pictured).
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.
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/ttyAPP2 -D -T -R -S"
Decrypting keys:
Key | Function |
---|---|
-d /var/log/knxd.log | to go into the background 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 the IP network in the range 1.1.10..1.1.30 |
-u /var/run/knx | open local Unix socket |
-t 0xffe | set the output mask of debug messages. |
-f 9 | set max verbosity level |
-i | listen to the specified TCP port (default 6720). It is possible to register -i 6721 or other port. Not exclusive alternative -u |
-b ncn5120:/dev/ttyAPP2 | activate the ncn5120 driver on the port for MOD1 (when installing the module in the MOD 2 expansion slot, specify ttyAPP3) |
-T -R | activate gateway, tunnel mode (needed to work with ETS) |
-D | says knxd to announce themselves (Discovery) in the network |
-S | start the server (which responds to multicasts) |
Подробнее:
knxd --help
Работа
Для запуска KNX daemon, необходимо прописать строку в консоль: service knxd start
При необходимости перезапуска: service knxd restart
Для проверки статуса: service knxd status
Все логи хранятся в файле /var/log/knxd.log
При получении сообщения от KNX устройства данные публикуются в MQTT топик /devices/knx/controls/data на WirenBoard.
Для управления устройствами KNX необходимо отправлять команды в MQTT топик /devices/knx/controls/data/on .
Пример команды:
mosquitto_pub -h 192.168.0.10 -p 1883 -t /devices/knx/controls/data/on -m "g:0/0/1 GroupValueWrite 0x01"
Где:
-h 192.168.0.10 - IP-адрес контроллера с KNX
-p 1883 - порт MQTT
-t /devices/knx/controls/data/on - MQTT топик для выгрузки информации
-m "g:0/0/1 GroupValueWrite 0x01" - сообщение для KNX устройства
Подробнее о работе с данными KNX: wb-mqtt-knx (MQTT KNX Bridge)
Скрипт для wb-rules упрощающий обработку телеграмм: knx_group_addresses.js
При работе с ETS Важно: в “interfaces” ETS надо выбирать сам интерфейс ПК, через который происходит общение. Обращение с knxd в по юникасту (ip-адресу хоста с демоном) не даёт запрограммировать устройства. На иллюстрации стрелкой отмечено, какой способ взаимодействия с ETS работает: