12 063
правки
(Новая страница: «DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:" with:») |
(Новая страница: «500px|EST Interface») |
||
(не показана 21 промежуточная версия этого же участника) | |||
Строка 39: | Строка 39: | ||
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: | 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"''' | '''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: | |||
{| 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) | ||
|} | |} | ||
More detailed: | |||
knxd --help | knxd --help | ||
== | == Operation == | ||
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''' | ||
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. | |||
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- | -h 192.168.0.10 - IP-address of the controller with KNX | ||
-p 1883 - | -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" - | -m "g:0/0/1 GroupValueWrite 0x01" - message for a KNX device | ||
Learn more about working with KNX data:[https://contactless.ru/wiki/index.php/MQTT_KNX_Bridge wb-mqtt-knx (MQTT KNX Bridge)] | |||
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] | |||
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: | |||
[[Файл:EtsInterface.png|500px| | [[Файл:EtsInterface.png|500px|EST Interface]] |
правки