From fcd07353660a5a46ee7dcfd8ad8400c865ff103a Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Thu, 19 Dec 2024 17:16:56 +0300 Subject: [PATCH 1/9] WB-MAI6: Add supply voltage channel --- debian/changelog | 6 ++++++ templates/config-wb-mai6.json.jinja | 11 +++++++++++ test/TDeviceTemplatesTest.Validate.dat | 1 + 3 files changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index 195003d1..6cd2d9b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +wb-mqtt-serial (2.147.3) stable; urgency=medium + + * WB-MAI6: add Supply voltage + + -- Ilia Skochilov Thu, 19 Dec 2024 17:13:00 +0300 + wb-mqtt-serial (2.147.2) stable; urgency=medium * Add min_request_interval=1000 to WBE2-I-EBUS template diff --git a/templates/config-wb-mai6.json.jinja b/templates/config-wb-mai6.json.jinja index 2148bb1c..b747c387 100644 --- a/templates/config-wb-mai6.json.jinja +++ b/templates/config-wb-mai6.json.jinja @@ -990,6 +990,15 @@ "enabled": false, "group": "hw_info" }, + { + "name": "Supply voltage", + "reg_type": "input", + "address": 121, + "type": "voltage", + "scale": 0.001, + "enabled": false, + "group": "hw_info" + }, { "name": "Uptime", "reg_type": "input", @@ -1058,6 +1067,7 @@ "IN_P_title": "Channel P", "IN_N_title": "Channel N", "external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0." + "Supply voltage": "5V Supply", }, "ru": { "template_title": "{{ title_ru }}", @@ -1191,6 +1201,7 @@ "Internal Temperature": "Температура внутри модуля", "Serial": "Серийный номер", "FW Version": "Версия прошивки", + "Supply voltage": "Напряжение 5В", "Uptime": "Время работы с момента включения", "ADC Loop Duration": "Время цикла опроса АЦП", "ADC Loop Counter": "Счетчик циклов опроса АЦП", diff --git a/test/TDeviceTemplatesTest.Validate.dat b/test/TDeviceTemplatesTest.Validate.dat index 6649811b..d244b8e2 100644 --- a/test/TDeviceTemplatesTest.Validate.dat +++ b/test/TDeviceTemplatesTest.Validate.dat @@ -13747,6 +13747,7 @@ WB-MAI6 MCU Voltage => MCU Voltage Serial => Serial Uptime => Uptime + Supply voltage => Supply voltage WB-MAO4 Channel 1 => Channel 1 Channel 1 Duty Cycle Raw => Channel 1 Duty Cycle Raw From 37f41979cfed87e835139a48925d0d9bb8ce4681 Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Thu, 19 Dec 2024 17:25:24 +0300 Subject: [PATCH 2/9] Refactoring --- debian/changelog | 2 +- templates/config-wb-mai6.json.jinja | 7 ++++--- test/TDeviceTemplatesTest.Validate.dat | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6cd2d9b2..98c39c44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ wb-mqtt-serial (2.147.3) stable; urgency=medium - * WB-MAI6: add Supply voltage + * WB-MAI6: add supply voltage channel -- Ilia Skochilov Thu, 19 Dec 2024 17:13:00 +0300 diff --git a/templates/config-wb-mai6.json.jinja b/templates/config-wb-mai6.json.jinja index b747c387..e5043976 100644 --- a/templates/config-wb-mai6.json.jinja +++ b/templates/config-wb-mai6.json.jinja @@ -991,10 +991,11 @@ "group": "hw_info" }, { - "name": "Supply voltage", + "name": "Supply Voltage", "reg_type": "input", "address": 121, "type": "voltage", + "units": "V", "scale": 0.001, "enabled": false, "group": "hw_info" @@ -1067,7 +1068,7 @@ "IN_P_title": "Channel P", "IN_N_title": "Channel N", "external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0." - "Supply voltage": "5V Supply", + "Supply Voltage": "5V Supply", }, "ru": { "template_title": "{{ title_ru }}", @@ -1201,7 +1202,7 @@ "Internal Temperature": "Температура внутри модуля", "Serial": "Серийный номер", "FW Version": "Версия прошивки", - "Supply voltage": "Напряжение 5В", + "Supply Voltage": "Напряжение 5В", "Uptime": "Время работы с момента включения", "ADC Loop Duration": "Время цикла опроса АЦП", "ADC Loop Counter": "Счетчик циклов опроса АЦП", diff --git a/test/TDeviceTemplatesTest.Validate.dat b/test/TDeviceTemplatesTest.Validate.dat index d244b8e2..c2131d53 100644 --- a/test/TDeviceTemplatesTest.Validate.dat +++ b/test/TDeviceTemplatesTest.Validate.dat @@ -13747,7 +13747,7 @@ WB-MAI6 MCU Voltage => MCU Voltage Serial => Serial Uptime => Uptime - Supply voltage => Supply voltage + Supply Voltage => Supply Voltage WB-MAO4 Channel 1 => Channel 1 Channel 1 Duty Cycle Raw => Channel 1 Duty Cycle Raw From 82446eae54ce3d7df8e30fdc024ba4d801d9ee45 Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Thu, 19 Dec 2024 17:55:59 +0300 Subject: [PATCH 3/9] Fix type --- templates/config-wb-mai6.json.jinja | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mai6.json.jinja b/templates/config-wb-mai6.json.jinja index e5043976..d76b408e 100644 --- a/templates/config-wb-mai6.json.jinja +++ b/templates/config-wb-mai6.json.jinja @@ -994,7 +994,7 @@ "name": "Supply Voltage", "reg_type": "input", "address": 121, - "type": "voltage", + "type": "value", "units": "V", "scale": 0.001, "enabled": false, @@ -1023,7 +1023,8 @@ "reg_type": "input", "address": 123, "scale": 0.001, - "type": "voltage", + "type": "value", + "units": "V", "enabled": false, "group": "hw_info" }, From cd65d0a694b81538a50df08f7d3dd34a14406a33 Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Fri, 20 Dec 2024 09:22:09 +0300 Subject: [PATCH 4/9] Fix errors --- templates/config-wb-mai6.json.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mai6.json.jinja b/templates/config-wb-mai6.json.jinja index d76b408e..31c84948 100644 --- a/templates/config-wb-mai6.json.jinja +++ b/templates/config-wb-mai6.json.jinja @@ -1068,8 +1068,8 @@ "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.", "IN_P_title": "Channel P", "IN_N_title": "Channel N", - "external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0." - "Supply Voltage": "5V Supply", + "external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0.", + "Supply Voltage": "5V Supply" }, "ru": { "template_title": "{{ title_ru }}", From 72dee9d064022eb524bfe17db2d4fcd9175d9901 Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Fri, 20 Dec 2024 11:53:28 +0300 Subject: [PATCH 5/9] Fix errors --- templates/config-wb-mai6.json.jinja | 4 ++-- test/TDeviceTemplatesTest.Validate.dat | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/config-wb-mai6.json.jinja b/templates/config-wb-mai6.json.jinja index 31c84948..c24692ac 100644 --- a/templates/config-wb-mai6.json.jinja +++ b/templates/config-wb-mai6.json.jinja @@ -1049,7 +1049,7 @@ "format": "u16", "enabled": false, "group": "debug" - }, + }, { "name": "ADC Loop Duration", "reg_type": "input", @@ -1059,7 +1059,7 @@ "scale": 0.001, "enabled": false, "group": "debug" - } + } ], "translations": { diff --git a/test/TDeviceTemplatesTest.Validate.dat b/test/TDeviceTemplatesTest.Validate.dat index af1d15d9..712b34aa 100644 --- a/test/TDeviceTemplatesTest.Validate.dat +++ b/test/TDeviceTemplatesTest.Validate.dat @@ -13754,8 +13754,8 @@ WB-MAI6 MCU Temperature => MCU Temperature MCU Voltage => MCU Voltage Serial => Serial - Uptime => Uptime Supply Voltage => Supply Voltage + Uptime => Uptime WB-MAO4 Channel 1 => Channel 1 Channel 1 Duty Cycle Raw => Channel 1 Duty Cycle Raw @@ -23589,6 +23589,7 @@ tpl1_oni_plc_w_ema_06U00 MCU Temperature => MCU Temperature MCU Voltage => MCU Voltage Serial => Serial + Supply Voltage => Supply Voltage Uptime => Uptime tpl1_oni_plc_w_emd_0706 Curtain 1 Close => Curtain 1 Close From 614457d1f923b6e039f6be47d22efb7ae34e3757 Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Fri, 20 Dec 2024 14:24:02 +0300 Subject: [PATCH 6/9] Change names --- templates/config-wb-mai6.json.jinja | 7 +++---- test/TDeviceTemplatesTest.Validate.dat | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/templates/config-wb-mai6.json.jinja b/templates/config-wb-mai6.json.jinja index c24692ac..7ce15e64 100644 --- a/templates/config-wb-mai6.json.jinja +++ b/templates/config-wb-mai6.json.jinja @@ -991,7 +991,7 @@ "group": "hw_info" }, { - "name": "Supply Voltage", + "name": "Internal 5V Bus Voltage", "reg_type": "input", "address": 121, "type": "value", @@ -1068,8 +1068,7 @@ "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.", "IN_P_title": "Channel P", "IN_N_title": "Channel N", - "external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0.", - "Supply Voltage": "5V Supply" + "external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0." }, "ru": { "template_title": "{{ title_ru }}", @@ -1203,7 +1202,7 @@ "Internal Temperature": "Температура внутри модуля", "Serial": "Серийный номер", "FW Version": "Версия прошивки", - "Supply Voltage": "Напряжение 5В", + "Internal 5V Bus Voltage": "Напряжение внутренней шины 5В", "Uptime": "Время работы с момента включения", "ADC Loop Duration": "Время цикла опроса АЦП", "ADC Loop Counter": "Счетчик циклов опроса АЦП", diff --git a/test/TDeviceTemplatesTest.Validate.dat b/test/TDeviceTemplatesTest.Validate.dat index 712b34aa..5cffa18d 100644 --- a/test/TDeviceTemplatesTest.Validate.dat +++ b/test/TDeviceTemplatesTest.Validate.dat @@ -13754,7 +13754,7 @@ WB-MAI6 MCU Temperature => MCU Temperature MCU Voltage => MCU Voltage Serial => Serial - Supply Voltage => Supply Voltage + Internal 5V Bus Voltage => Internal 5V Bus Voltage Uptime => Uptime WB-MAO4 Channel 1 => Channel 1 @@ -23589,7 +23589,7 @@ tpl1_oni_plc_w_ema_06U00 MCU Temperature => MCU Temperature MCU Voltage => MCU Voltage Serial => Serial - Supply Voltage => Supply Voltage + Internal 5V Bus Voltage => Internal 5V Bus Voltage Uptime => Uptime tpl1_oni_plc_w_emd_0706 Curtain 1 Close => Curtain 1 Close From d4c735730477f2fe923682cd1ba62acc9475705b Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Fri, 20 Dec 2024 14:25:16 +0300 Subject: [PATCH 7/9] changelog --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 84927c66..27afa373 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ wb-mqtt-serial (2.152.1) stable; urgency=medium - * WB-MAI6: add supply voltage channel + * WB-MAI6: add Internal 5V Bus Voltage channel - -- Ilia Skochilov Thu, 19 Dec 2024 17:13:00 +0300 + -- Ilia Skochilov Thu, 20 Dec 2024 17:13:00 +0300 wb-mqtt-serial (2.152.0) stable; urgency=medium From cdc7bec9b3d59fc5ed7ab8a6d25e972486b35b83 Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Fri, 20 Dec 2024 14:26:20 +0300 Subject: [PATCH 8/9] changelog --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 27afa373..8d083828 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ wb-mqtt-serial (2.152.1) stable; urgency=medium * WB-MAI6: add Internal 5V Bus Voltage channel - -- Ilia Skochilov Thu, 20 Dec 2024 17:13:00 +0300 + -- Ilia Skochilov Fri, 20 Dec 2024 17:13:00 +0300 wb-mqtt-serial (2.152.0) stable; urgency=medium From cc1e02185699f8f26e041790b6e6ecd1a6a6b38a Mon Sep 17 00:00:00 2001 From: Ilia Skochilov Date: Fri, 20 Dec 2024 14:45:18 +0300 Subject: [PATCH 9/9] Fix order --- test/TDeviceTemplatesTest.Validate.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/TDeviceTemplatesTest.Validate.dat b/test/TDeviceTemplatesTest.Validate.dat index 5cffa18d..8e043092 100644 --- a/test/TDeviceTemplatesTest.Validate.dat +++ b/test/TDeviceTemplatesTest.Validate.dat @@ -13750,11 +13750,11 @@ WB-MAI6 IN 6 Temperature => IN 6 Temperature IN 6 Value => IN 6 Value IN 6 Voltage => IN 6 Voltage + Internal 5V Bus Voltage => Internal 5V Bus Voltage Internal Temperature => Internal Temperature MCU Temperature => MCU Temperature MCU Voltage => MCU Voltage Serial => Serial - Internal 5V Bus Voltage => Internal 5V Bus Voltage Uptime => Uptime WB-MAO4 Channel 1 => Channel 1 @@ -23585,11 +23585,11 @@ tpl1_oni_plc_w_ema_06U00 IN 6 Temperature => IN 6 Temperature IN 6 Value => IN 6 Value IN 6 Voltage => IN 6 Voltage + Internal 5V Bus Voltage => Internal 5V Bus Voltage Internal Temperature => Internal Temperature MCU Temperature => MCU Temperature MCU Voltage => MCU Voltage Serial => Serial - Internal 5V Bus Voltage => Internal 5V Bus Voltage Uptime => Uptime tpl1_oni_plc_w_emd_0706 Curtain 1 Close => Curtain 1 Close