R4DCB08: различия между версиями
Fahreeve (обсуждение | вклад) (добавил guard_interval_us для повышения стабильности считывания показаний датчиков) |
Fahreeve (обсуждение | вклад) |
||
Строка 21: | Строка 21: | ||
"name": "modbus 1-Wire converter", | "name": "modbus 1-Wire converter", | ||
"id": "r4dcb08", | "id": "r4dcb08", | ||
" | "frame_timeout_ms": 0, | ||
"groups": [ | "groups": [ | ||
{ | { |
Версия 23:05, 4 июля 2024
Описание
8 канального коллектора датчиков температуры R4DCB08 с поддержкой modbus
Подключение к контроллеру
Устройство официально не поддерживается, но подключалось к контроллеру Wiren Board нашими пользователями.
Подробнее смотрите по ссылке
Настройка:
- Подключите устройство к шине RS-485 контроллера Wiren Board.
- Подайте на него питание.
- Загрузите на компьютер шаблон для ПО Wiren Board.
- Скопируйте файл json в папку пользовательских шаблонов по инструкции в описании драйвера wb-mqtt-serial.
- Добавьте новое устройство в веб-интерфейсе контроллера Wiren Board по инструкции Начальное конфигурирование устройств через веб-интерфейс.
Шаблон конфигурации
Сохранить файл по следующему пути /etc/wb-mqtt-serial.conf.d/templates/config-r4dcb08.json
{
"device_type": "R4DCB08-modbus-1wire",
"device": {
"name": "modbus 1-Wire converter",
"id": "r4dcb08",
"frame_timeout_ms": 0,
"groups": [
{
"title": "Input 1",
"id": "g_in_1"
},
{
"title": "Input 2",
"id": "g_in_2"
},
{
"title": "Input 3",
"id": "g_in_3"
},
{
"title": "Input 4",
"id": "g_in_4"
},
{
"title": "Input 5",
"id": "g_in_5"
},
{
"title": "Input 6",
"id": "g_in_6"
},
{
"title": "Input 7",
"id": "g_in_7"
},
{
"title": "Input 8",
"id": "g_in_8"
},
{
"title": "General",
"id": "g_general"
}
],
"parameters": {
"corr_temp_1": {
"title": "Temperature correction 1",
"group": "g_in_1",
"order": 2,
"reg_type": "holding",
"address": "0x08",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_2": {
"title": "Temperature correction 2",
"group": "g_in_2",
"order": 2,
"reg_type": "holding",
"address": "0x09",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_3": {
"title": "Temperature correction 3",
"group": "g_in_3",
"order": 2,
"reg_type": "holding",
"address": "0x0A",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_4": {
"title": "Temperature correction 4",
"group": "g_in_4",
"order": 2,
"reg_type": "holding",
"address": "0x0B",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_5": {
"title": "Temperature correction 5",
"group": "g_in_5",
"order": 2,
"reg_type": "holding",
"address": "0x0C",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_6": {
"title": "Temperature correction 6",
"group": "g_in_6",
"order": 2,
"reg_type": "holding",
"address": "0x0D",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_7": {
"title": "Temperature correction 7",
"group": "g_in_7",
"order": 2,
"reg_type": "holding",
"address": "0x0E",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"corr_temp_8": {
"title": "Temperature correction 8",
"group": "g_in_8",
"order": 2,
"reg_type": "holding",
"address": "0x0F",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"default": 0
},
"baud_rate": {
"title": "Baud rate",
"description": "baud_rate_description",
"reg_type": "holding",
"address": "0x00FF",
"enum": [0, 1, 2, 3, 4],
"default": 3,
"enum_titles": [
"1200",
"2400",
"4800",
"9600",
"19200"
],
"group": "g_general",
"order": 1
}
},
"channels": [
{
"name": "Temperature 1",
"group": "g_in_1",
"order": 1,
"reg_type": "holding",
"address": "0x00",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 2",
"group": "g_in_2",
"order": 1,
"reg_type": "holding",
"address": "0x01",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 3",
"group": "g_in_3",
"order": 1,
"reg_type": "holding",
"address": "0x02",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 4",
"group": "g_in_4",
"order": 1,
"reg_type": "holding",
"address": "0x03",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 5",
"group": "g_in_5",
"order": 1,
"reg_type": "holding",
"address": "0x04",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 6",
"group": "g_in_6",
"order": 1,
"reg_type": "holding",
"address": "0x05",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 7",
"group": "g_in_7",
"order": 1,
"reg_type": "holding",
"address": "0x06",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
},
{
"name": "Temperature 8",
"group": "g_in_8",
"order": 1,
"reg_type": "holding",
"address": "0x07",
"format": "s16",
"type": "temperature",
"scale": 0.1,
"error_value": "0x8000",
"readonly" : true
}
],
"translations": {
"en": {
"baud_rate_description": "Make sure that communication with device is established before changing this parameter. Select required baud rate, save configuration and then change port baud rate to the same value."
},
"ru": {
"baud_rate_description": "Перед изменением параметра убедитесь, что связь с устройством установлена. Выберите нужную скорость обмена, сохраните конфигурацию, а затем укажите в настройках порта эту же скорость.",
"General": "Общее",
"Input 1": "Вход 1",
"Input 2": "Вход 2",
"Input 3": "Вход 3",
"Input 4": "Вход 4",
"Input 5": "Вход 5",
"Input 6": "Вход 6",
"Input 7": "Вход 7",
"Input 8": "Вход 8",
"Baud rate": "Скорость обмена"
}
}
}
}
Полезные материалы
Медиа: R4DCB08_modbus_rtu_protocol.pdf