WB-MIR v2 - Modbus IR Remote Control/en: различия между версиями

Новая страница: «== Images and drawings of the device == <!--{{WBPicturesNoDrawing|1}}--> {{WBPictures|1}}»
(Новая страница: «The WB-MIR v2 module requires an external IR transmitter (included). A 3.5 mm Jack is provided for connecting the transmitter.»)
(Новая страница: «== Images and drawings of the device == <!--{{WBPicturesNoDrawing|1}}--> {{WBPictures|1}}»)
 
(не показаны 23 промежуточные версии этого же участника)
Строка 17: Строка 17:
The WB-MIR v2 module requires an external IR transmitter (included). A 3.5 mm Jack is provided for connecting the transmitter.
The WB-MIR v2 module requires an external IR transmitter (included). A 3.5 mm Jack is provided for connecting the transmitter.


В версии прошивки 4.0.0 и выше возможно также конфигурирование 1-W входа устройства как счетного.
In the firmware version 4.0.0 and above, it is also possible to configure the 1-W input of the device as a counting one.


==Монтаж==
==Installation==
Модуль монтируется в непосредственной близости от устройства или внутри корпуса управляемого устройства, например, кондиционера. Если после монтажа планируется дальнейшее обучение или переобучение модуля, то ИК-приемник следует располагать в доступном месте. ИК-передатчик, вынесенный на проводе длиной ~140 см, крепится рядом с ИК-приемником управляемого устройства на двусторонний скотч (входит в комплект) таким образом, чтобы обеспечить устойчивую передачу ИК-команд управления, но сохранить возможность управлять устройством с пульта, не загораживая ИК-приемник устройства полностью.
The module is mounted in the immediate vicinity of the device or inside the housing of a controlled device, such as an air conditioner. If further training or retraining of the module is planned after installation, the IR receiver should be located in an accessible place. The IR transmitter, placed on a wire, ~140 cm long, is attached next to the IR receiver of the controlled device to a double-sided tape (included) so as to ensure stable transmission of IR control commands, but to retain the ability to control the device from the remote without blocking the IR receiver of the device completely.


== Технические характеристики ==
== Specifications ==
{| class="wikitable"
{| class="wikitable"
! style="text-align: center;" | Параметр
! style="text-align: center;" | Option
! style="text-align: center;" | Значение
! style="text-align: center;" | Value
|-
|-
! colspan="2" |Питание
! colspan="2" |Power
|-
|-
|Напряжение питания
|Supply voltage
|9 — 24 В постоянного тока
|9 — 24 V DC
|-
|-
|Потребляемая мощность
|Power consumption
|
|
0.1 Вт
0.1 W
|-
|-
|Дальнодействие передатчика
|Transmitter range
| <
| < 1m
|-
|-
| Внешние датчики
| External sensor
| Возможность подключения цифрового датчика температуры DS18B20.
| Digital temperature sensor DS18B20 can be connected.
|-
|-
!colspan="2" | '''Клеммники и сечение проводов'''  
!colspan="2" | '''Terminals and wire section'''
|-
|-
|| Рекомендуемое сечение провода с НШВИ, мм<sup>2</sup> || 0,75 — 1
|| Recommended wire cross-section with NSUI, mm<sup>2</sup>|| 0,75 — 1
|-
|-
|| Длина стандартной втулки НШВИ, мм || 8
|| Length of the standard sleeve NSUI, mm || 8
|-
|-
|| Момент затяжки винтов, Н∙м || 0,2
|| Torque of screws, N∙m || 0,2
|-
|-
! colspan="2" |Управление
! colspan="2" |Control
|-
|-
|Интерфейс управления
|Management interface
|RS-485
|RS-485
|-
|-
|Изоляция интерфейса
|Interface isolation
|Неизолированный
|Uninsulated
|-
|-
|Протокол обмена данными
|Communication protocol
|Modbus RTU, адрес задается программно, заводские настройки указаны на наклейке
|Modbus RTU, address is set by software, factory settings are indicated on the label
|-
|-
|Параметры интерфейса RS-485
|RS-485 interface parameters
|  
|  
скорость 9600 бит/с; данные — 8 бит; четность N; стоп-биты 2;  
speed 9600 bps; data bits 8; parity N; stop bits 2;  
Начиная с версии прошивки '''3.1.0''' параметры интерфейсы могут быть настроены программно:
Starting from firmware version '''3.1.0''' parameters interfaces can be configured programmatically:
*Скорость: 1200, 2400, 4800, 9600 (по умолчанию), 19200, 38400, 57600, 115200 бит/с <br>([[UART_Communication_Settings|Настройка параметров обмена данными по RS-485 для modbus-устройств Wiren Board]])
*Speed: 1200, 2400, 4800, 9600 (default), 19200, 38400, 57600, 115200 bit/s <br>([[UART_Communication_Settings/en|configure RS-485 communication parameters for Wiren Board modbus devices]])
*Данные: 8 бит
*Data: 8 bit
*Проверка чётности: нет (по умолчанию), 1 - нечётный (odd), 2 - чётный (even)  
*Parity check: none (default), 1 - odd (odd), 2 - even (even)  
*Стоповых бит: 2 (по умолчанию), 1
*Stop bits: 2 (default), 1
|-
|-
! colspan="2" | Количество запоминаемых ИК-команд
! colspan="2" | Number of stored IR commands
|-
|-
|Количество команд
|Number of teams
|
|
* Прошивки до версии '''3.7.2''' включительно: '''7'''
* Firmware to version ''3.7.2'' inclusive: ''7''
* Прошивки с версии '''4.4.0''': '''40'''
* Firmware from version '''4.4.0''': '''40'''
* Прошивки версии старше 3.7.2 и до 4.4.0 поддерживали до ~80 команд, но некорректно работали с некоторыми устройствами.
* Firmware versions older than 3.7.2 and up to 4.4.0 supported up to ~80 commands, but did not work correctly with some devices.
|-
|-
|Длительность команд
|Command duration
| Максимальная длина команды -- 508 регистров, плюс два регистра -- признак окончания команды.Каждый регистр кодирует длительность высокого или низкого уровня сигнала (последовательно) в микросекундах.
| The maximum command length is 508 registers, plus two registers indicates the end of the command.Each register encodes the duration of a high or low signal level (sequentially) in microseconds.
|-
|-
! colspan="2" | Габариты
! colspan="2" | dimensions
|-
|-
| Д x Ш x В
| L x W x h
|
|
* 40x15x11 мм; длина разъема кабеля передатчика добавляет +30 мм к ширине корпуса
* 40x15x11 mm; length of connector cable transmitter adds 30 mm to the width of the housing
|-
|-
! colspan="2" |Условия эксплуатации
! colspan="2" |operating Conditions
|-
|-
| Температура воздуха
| Air temperature
| -40°С до +80°С
| -40°C to +80°C
|-
|-
| Относительная влажность воздуха
| Relative humidity
| до 98%,без конденсата влаги
| up to 98%,without moisture condensate
|}
|}


== Обучение и использование модуля ==
== Learning and using the module ==


Подробное описание и использования модуля, а также карта регистров, описаны в разделе [[WB-MSx_Consumer_IR_Manual|Инструкция по работе с ИК-приёмопередатчиком в устройствах WB-MS, WB-MSW, WB-MIR]].
Detailed description and use of the module, and a map of the registers is described in section [[WB-MSx_Consumer_IR_Manual/en|how to work with the IR receiver in the  WB-MS WB-MSW, WB-MIR devices]].


== Дополнительные Функции==
== Additional functionality==


'''Смена адреса''' производится широковещательный (slave_id 0) командой записи (WRITE_SINGLE_REGISTER) в holding register с адресом 128 (0x80).
'''Address change''' is broadcast (slave_id 0) team record (WRITE_SINGLE_REGISTER) to holding register with address 128 (0x80).


По адресу 200 лежит '''сигнатура''' длинной 6 байт. Сигнатура уникальна для каждой модели устройства и позволяет идентифицировать модель.
The '''signature''', 6 bytes long, lies at address 200. The signature is unique for each device model and allows you to identify the model.
Для получения сигнатуры нужно выполнить READ_HOLDING_REGISTERS адрес 200 длина 6.   
To obtain the signatures, fulfill READ_HOLDING_REGISTERS address 200 length 6.   
Запись в эту область памяти не поддерживается, при попытки записи в недопустимое место возвращается ошибка 3.
Writing to this area of memory is not supported and error 3 is returned when attempting to write to an invalid location.


== Карты регистров ==
== Register map ==


Регистры, относящиеся к ИК подробно описаны в разделе [[WB-MSx_Consumer_IR_Manual|Инструкция по работе с ИК-приёмопередатчиком в устройствах WB-MS, WB-MSW, WB-MIR]].
Registers related to IR are described in detail in the section [[WB-MSx_Consumer_IR_Manual/en|instructions for working with IR transceiver in WB-MS, WB-MSW, WB-MIR devices]].
{| class="wikitable"
{| class="wikitable"
! rowspan="2" |Регистр/ адрес
! rowspan="2" |Register/ address
! rowspan="2" |Тип
! rowspan="2" |Type
! rowspan="2" |Чтение/ запись
! rowspan="2" |Read/ write
! rowspan="2" |Значение по умолчанию
! rowspan="2" |Default
! rowspan="2" |Формат
! rowspan="2" |Format
! rowspan="2" |Назначение
! rowspan="2" |Purpose
!Версии
!Versions
прошивки
insertions
|-
|-
!
!
Строка 128: Строка 128:
|0x7FFF
|0x7FFF
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с встроенного датчика
|Temperature with built-in sensor
|
|
|-
|-
Строка 136: Строка 136:
|0x7FFF
|0x7FFF
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с внешнего датчика 1-Wire
|Temperature from external 1-Wire sensor
|
|
|-
|-
Строка 144: Строка 144:
|0
|0
|°C × 16 (signed)
|°C × 16 (signed)
|Температура с первого внешнего датчика 1-Wire. При ошибке опроса датчика сохраняет предыдущее валидное значение (статус датчика читать из discrete регистра 16).
|Temperature from the first external 1-Wire sensor. In case of an error, the sensor retains the previous valid value (sensor status read from the discrete register 16).
|начиная с прошивки 4.6.0
|starting with firmware 4.6.0
|-
|-
|
|
Строка 156: Строка 156:
|-
|-


|104-105 || input || R || || 32-bit unsigned int  
| 104-105 || input || R|| || 32-bit unsigned int || uptime counter in seconds
|| Время работы устройства (uptime counter) в секундах
|-
|


|-
|-
Строка 166: Строка 165:
|96
|96
|baud rate / 100
|baud rate / 100
|скорость порта RS-485, '''делённая на 100'''. Допустимые скорости: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 <br>([[UART_Communication_Settings|Настройка параметров обмена данными по RS-485 для modbus-устройств Wiren Board]])
|RS-485 port speed, "'divided by 100"'. Permissible speeds: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 <br>([[UART_Communication_Settings/en|configure RS-485 communication parameters for Wiren Board Modbus devices]])
| rowspan="3" |>3.1.0
| rowspan="3" |>3.1.0
|-
|-
Строка 174: Строка 173:
|0
|0
|
|
|настройка бита чётности порта RS-485. Допустимые значения: 0 - нет бита чётности (none), 1 - нечётный (odd), 2 - чётный (even)
|configure the RS-485 port parity bit. Valid values: 0 - no parity bit (none), 1 - odd (odd), 2 - even (even)
|-
|-
|112
|112
Строка 181: Строка 180:
|2
|2
|
|
|количество стоп-битов порта RS-485. Допустимые значения: 1, 2
|number of stop bits of RS-485 port. Valid values: 1, 2
|-
|-
|
|
Строка 195: Строка 194:
|RW
|RW
|0
|0
|отличное от 0
|other than 0
|запись в регистр вызывает перезагрузку модуля без сохранения состояния
|write to the register causes a reset of the module without saving state
|
|
|-
|-
Строка 204: Строка 203:
| -
| -
|mV
|mV
|текущее напряжение питания модуля
|current supply voltage of the module
|
|
|-
|-
Строка 212: Строка 211:
|1
|1
|
|
|Modbus-адрес устройства
|The Modbus address of the device
|
|
|-
|-
| 129 (0x81) || holding || RW || 0 || 0 или 1 || Переход в режим загрузчика || начиная с прошивки 4.5.0
| 129 (0x81) || holding || RW|| 0 || 0 or 1 || Switch to bootloader mode || starting with firmware 4.5.0
|-
|-
|200-206
|200-206
|input
|input
|R
|R
|см. [[Sensors Modbus Management|Сигнатура устройства]]
|see [[Sensors Modbus Management/en|device Signature]]
|
|
|сигнатура
|signature
|
|
|-
|-
Строка 229: Строка 228:
|R
|R
|
|
|__date__ __time__
|__date__ _ _ time__
|дата сборки прошивки
|the build date of the firmware
|
|
|-
|-
Строка 238: Строка 237:
|216
|216
|°C × 100 (signed)
|°C × 100 (signed)
|Компенсация самонагрева встроенного датчика температуры.
|Self-heating compensation of the built-in temperature sensor.
Значение регистра вычитается из температуры, измеренной встроенным датчиком (регистр 6)
The register value is subtracted from the temperature measured by the built-in sensor (register 6)
|
|
|-
|-
Строка 246: Строка 245:
|R
|R
|
|
|строка, null-terminated
|string, null-terminated
|версия прошивки
|firmware version
|
|
|-
|-
Строка 255: Строка 254:
|
|
|32-bit unsigned int
|32-bit unsigned int
|уникальный идентификатор (S/N)
|unique identifier (S/N)
|
|
|-
|-
Строка 270: Строка 269:
|RW
|RW
|0
|0
|0 или 1
|0 or 1
|Режим входа 1-W: 0 - 1-wire, 1 - дискретный вход
|1-W input mode: 0 - 1-wire, 1 - discrete input
| rowspan="3" |>=4.0.0
| rowspan="3" |>=4.0.0
|-
|-
Строка 279: Строка 278:
|
|
|16-bit unsigned int
|16-bit unsigned int
|Счетчик срабатываний для входа 1-W
|Counter for 1-W input
|-
|-
|0
|0
Строка 285: Строка 284:
|R
|R
|
|
|0 или 1
|0 or 1
|Текущее состояние входа 1-W: 0 - разомкнут, 1 - замкнут на GND. Если для входа выбран режим 1-wire, значение всегда равно 0.
|Current state of input 1-W: 0 - open, 1 - GND closed. If 1-wire mode is selected for input, the value is always 0.
|-
|-
|16
|16
Строка 292: Строка 291:
|R
|R
|
|
|0 или 1
|0 or 1
|Статус опроса датчика 1-Wire входа №1: 0 - датчик не подключен, 1 - датчик подключен и корректно опрашивается
|Sensor polling status 1-Wire input no. 1: 0 - sensor not connected, 1 - sensor connected and correctly polled
|начиная с прошивки 4.6.0
|starting with firmware v.4.6.0
|}
|}


==Сигнатура устройства ==
== Device signature ==


По адресу 200 лежит сигнатура модуля длиной 6 байт. Сигнатура уникальна для каждой модели устройств Wiren Board и позволяет идентифицировать модель по Modbus:
The 6-byte module signature is stored at address 200. The signature is unique for each model of Wiren Board devices and allows to identify the model by Modbus:


{| class="wikitable"
{| class="wikitable"
! style="font-weight: bold;" | Модуль
! style="font-weight: bold;" | Module
! style="font-weight: bold;" | Сигнатура
! style="font-weight: bold;" | Signature
|-
|-
| WB-MIR
| WB-MIR
Строка 309: Строка 308:
|}
|}


Для получения сигнатуры нужно выполнить команду READ_HOLDING_REGISTERS по адресу 200 (длина 6 регистров). Запись в эту область памяти не поддерживается, при попытке записи в недопустимое место возвращается ошибка 3. Пустые места в тексте сигнатуры забиваются значением 0x00.  
To get the signature of a device you need to run command READ_HOLDING_REGISTERS at 200 (length of 6 registers). Writing to this area of memory is not supported, and error 3 is returned when attempting to write to an invalid location. Empty spaces in the signature text are clogged with the value 0x00.  
Начиная с регистра 220 записана дата сборки прошивки, в формате "число'''x00'''время'''x00'''" в виде строки (пример: 'Jan 27 2017 17:01:13'). Длина записи — 21 регистр.
Starting from register 220, the firmware build date is recorded, in the format ''number'''x00'''time'''x00''''' as a string (example: 'Jan 27 2017 17:01:13'). The length of the record is 21 registers.


== Управление модулем из web-интерфейса ==
== Module management from the web interface ==
[[File:WB-MIR-2-WEB_Cut.png|1039px|thumb|center|Веб-интерфейс модуля WB-MIR v2]]
[[File:WB-MIR-2-WEB_Cut.png|1039px|thumb|center|WB-MIR v2 Web interface]]
Для подключения модуля WB-MIR v2 используется шаблон '''WB-MIR v2''', который предоставляет полный набор к функциям модуля из веб-интерфейса, включая обучение.
To connect the WB-MIR v2 module, use the '''WB-MIR v2''' template, which provides a complete set of module functions from the web interface, including learning.




Рассмотрим основные органы управления модулем и их назначение.
Consider the main controls of the module and their purpose.


<div class="mw-translate-fuzzy">
{| class="wikitable"
{| class="wikitable"
! Название элемента управления
! The name of the control
!Назначение
!Appointment
|-
|-
|Input Voltage||Напряжение питания модуля
|Input Voltage||module supply voltage
|-
|-
|Learn to RAM||Запись ИК-сигнала в оперативный буфер (см. раздел [[#Оперативный режим|Оперативный режим]]). Для обучения контрол переводится в положение ON, после обучения — OFF.   
|Learn-to-RAM||Write the IR signal in the operational buffer (see section [[#Operational mode|Operational mode]]). For learning, the control is transferred to ON position, after learning — OFF.   
|-
|-
|Play from RAM||Воспроизведение ИК-сигнала из оперативного буфера (см. раздел [[#Оперативный режим|Оперативный режим]]).
|Play from RAM||Play the IR signal from the operating buffer (see [[#Operating mode|Operating mode]]).
|-
|-
|Learn to ROMx||Запись ИК-сигнала в соотв. ячейку ПЗУ (см. раздел [[#Постоянный режим|Постоянный режим]]). Для обучения контрол переводится в положение ON, после обучения — OFF.
|Learn to ROMx||IR signal Recording ACC. the cell of the ROM (see section [[#DC mode|DC mode]]). For learning, the control is transferred to ON position, after learning — OFF.
|-
|-
|Play from ROMx||Воспроизведение ИК-сигнала из соотв. ячейки ПЗУ (см. раздел [[#Постоянный режим|Постоянный режим]]). Для обучения контрол переводится в положение ON, после обучения — OFF.
|Play from ROMx||Play IR signal from resp. ROM cells (see [[#Constant mode|Constant mode]]]). For training, the control is transferred to THE on position, after training — OFF.
|-
|-
|ROMx -> RAM||Копирование данных из соотв. ячейки ПЗУ в оперативный буфер для редактирования (см. раздел [[#Постоянный режим|Постоянный режим]]). Для редактирования контрол переводится в положение ON, после редактирования — OFF.
|ROMx -> RAM||Copy data from ACC. ROM cells to the online buffer for editing (see [[#Constant mode|Constant mode]]). For editing, control is transferred to ON position, after editing — OFF.
|-
|-
|Internal/External Temperature Sensor||Температура внутреннего/внешнего цифрового датчика. Если датчик отсутствует или неисправен, его название выделяется красным цветом.
|Internal/External Temperature Sensor||Internal/external digital temperature sensor. If the sensor is missing or defective, its name is highlighted in red.
|-
|-
|Serial NO||Серийный номер модуля WB-MIR, может потребоваться при обращении в техподдержку.
|Serial NO||the Serial number of the WB-MIR module may be required when contacting technical support.
|-
|-
|Reset all ROM||Сброс содержимого всех ячеек памяти. '''Будьте внимательны, очистка ПЗУ будет выполнена без запроса на подтверждение!'''
|Reset all ROM||Resets the contents of all memory locations. '''Be careful, ROM cleaning will be done without asking for confirmation!'''
|-
|-
|}
|}
</div>


== Управление модулем из командной строки ==
== Command-line device management ==
Программное обеспечение контроллера Wiren Board включает в себя утилиту modbus_client для работы с устройствами, подключенными к выходам RS-485, по протоколу Modbus, подробное описание команды находится на странице [[Modbus-client]]. Доступ к командной строке описан в статье [[SSH]].
The Wiren Board controller software includes  modbus_client utility to work with devices connected to the RS-485 outputs, via Modbus Protocol, the detailed description of the command is on the page [[Modbus-client/en| Modbus client]]. Access to the command line is described in [[SSH/en| SSH]].


=== Пример чтения регистров ===
=== Register reading example ===
Проверим, верно ли, что мы подключились именно к модулю нужного типа. (Модуль wb-mqtt-serial должен быть предварительно остановлен). По адресу 200 хранится уникальная сигнатура длиной в 6 регистров. Прочтем 6 регистров, начиная с адреса 200, и преобразуем полученный ответ из шестнадцатеричных цифр в символьную строку:
Let's check whether it is true that we are connected to the module of the desired type. (Module wb-mqtt-serial needs to be stopped). At address 200, a unique signature of 6 registers is stored. Let's read 6 registers, starting with the address 200, and convert the received answer from hexadecimal digits into a character string:


<syntaxhighlight lang="bash">echo  -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \
<syntaxhighlight lang="bash">echo  -e `modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 \
Строка 353: Строка 354:
grep Data | sed -e 's/0x00/\\\x/g' -e 's/Data://' -e 's/\s//g'` </syntaxhighlight>
grep Data | sed -e 's/0x00/\\\x/g' -e 's/Data://' -e 's/\s//g'` </syntaxhighlight>


В результате выполнения команды получаем строку, например '''WBMIR'''. В этом примере модуль WB-MIR имеет Modbus-адрес 1.
As a result of the command, we receive string  '''WBMIR'''. The WB-MIR module in the example has Modbus address 1.


== Обновление прошивки устройства ==
== Device firmware update ==
Начиная с новых версий микропрограмм устройства поддерживается функционал обновления прошивки (микропрограммы) по протоколу Modbus. Это дает возможность расширять функциональные возможности устройств и устранять ошибки в микропрограммном обеспечении непосредственно на месте монтажа. Подробнее о перепрошивке устройств рассказано в статье [[WB-MCU-Flasher|Загрузка прошивок на устройства Wiren Board]]. Список версий прошивок, поддерживающих обновление, а также устройств, для которых эта функция реализована, можно найти в статье [[Firmware_Changelog]].
Starting with the new firmware versions of the device, the firmware update functionality (firmware) via the Modbus Protocol is supported. This makes it possible to extend the functionality of the devices and eliminate errors in the firmware directly at the installation site. Read more about flashing devices described in the article [[WB-MCU-Flasher|Download firmware to Wiren Board devices]]. A list of firmware versions that support the update, as well as devices for which this feature is implemented, can be found in [[Firmware_Changelog/en| Firmware Changelog]].




== Изображения и чертежи устройства ==
== Images and drawings of the device ==
<!--{{Wbincludes:WBPicturesNoDrawing|1}}-->
<!--{{Wbincludes:WBPicturesNoDrawing|1}}-->
{{Wbincludes:WBPictures|1}}
{{Wbincludes:WBPictures|1}}
12 063

правки