wb_editors
14 355
правок
(Новая страница: «To run the driver, edit the <code>/etc/wb-mqtt-serial.conf</code> file. An ordinary user can use the RS-485 method:RS-485:Настройка через веб-…») |
FuzzyBot (обсуждение | вклад) м (FuzzyBot переименовал страницу Драйвер wb-mqtt-serial/en в Wb-mqtt-serial driver/en без оставления перенаправления: Часть переводимой страницы Драйвер wb-mqtt-serial.) |
||
(не показано 6 промежуточных версий 2 участников) | |||
Строка 51: | Строка 51: | ||
=== | === The example of configuration for relay module [[WB-MRM2 Реле 2х канальное | WB-MRM2]] connected to the isolated Wiren Board 4 port (RS-485-ISO)=== | ||
<syntaxhighlight lang="javascript">{ | <syntaxhighlight lang="javascript">{ | ||
"ports": [ | "ports": [ | ||
{ | { | ||
"path" : "/dev/ttyNSC0", // | "path" : "/dev/ttyNSC0", //pseudofile corresponding to port | ||
"baud_rate": 9600, // | "baud_rate": 9600, //the port speed is 9600 for almost all devices, but check the documentation first | ||
"parity": "N", // | "parity": "N", //parity | ||
"data_bits": 8, // | "data_bits": 8, //the number of data bits in the parcel | ||
"stop_bits": 2, // | "stop_bits": 2, //number of stop bits. Parity, bits, and stop bits are also rarely changed | ||
"poll_interval": 10, // | "poll_interval": 10, //device polling interval on the port in milliseconds | ||
"devices" : [ | "devices" : [ | ||
{ | { | ||
"device_type" : "WB-MRM2", // | "device_type" : "WB-MRM2", ////device type recognized by driver | ||
"slave_id": 25 // | "slave_id": 25 //device address | ||
} | } | ||
] | ] | ||
Строка 71: | Строка 71: | ||
] | ] | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
For a complete list of supported device types, see[[Поддерживаемые устройства/en|Supported devices]], and also [https://github.com/contactless/wb-homa-drivers/blob/master/wb-homa-modbus/README.md#%D0%A2%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D0%B0-%D1%88%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD%D0%BE%D0%B2-device_type here]. | |||
=== | === An example of a configuration file for multiple connected devices === | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> |