From 4542b1a5a2efcc7ba2b5f1d37998da6afb2866ae Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Wed, 24 Jan 2024 19:40:24 +0700 Subject: [PATCH 01/24] added visual widget - demo version --- templates/config-wb-mrwm2.json.jinja | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index fdc2be776..e8c7809e9 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -490,7 +490,34 @@ "group": "gg_outputs_channels" }, {% endfor -%} - {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + { + "name": "out {{out_num}} protection vh", + "reg_type": "discrete", + "address": {{out_num + 400}}, + "type": "switch", + "sporadic": true, + "group": "gg_outputs_channels" + }, + { + "name": "out {{out_num}} protection vl", + "reg_type": "discrete", + "address": {{out_num + 402}}, + "type": "switch", + "sporadic": true, + "group": "gg_outputs_channels" + + }, + { + "name": "out {{out_num}} protection ch", + "reg_type": "discrete", + "address": {{out_num + 404}}, + "type": "switch", + "sporadic": true, + "group": "gg_outputs_channels" + }, + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { "name": "Urms L{{out_num}}", "reg_type": "input", @@ -619,6 +646,9 @@ "Input {{in_num}} Long Press Counter": "Счетчик длинных нажатий входа {{in_num}}", "Input {{in_num}} Double Press Counter": "Счетчик двойных нажатий входа {{in_num}}", "Input {{in_num}} Shortlong Press Counter": "Счетчик коротких, а затем длинных нажатий входа {{in_num}}", + "out {{in_num}} protection ch":"Превышено напряжение на выходе {{in_num}}", + "out {{in_num}} protection vl":"Напряжение низкое на выходе {{in_num}}", + "out {{in_num}} protection vh":"Мощность превышена на выходе {{in_num}}", {% endfor -%} "Outputs": "Выходы", From e17239de7cb061c10a5e8be67cf47a40ae22365f Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 2 Feb 2024 13:32:51 +0700 Subject: [PATCH 02/24] Update config-wb-mrwm2.json.jinja --- templates/config-wb-mrwm2.json.jinja | 134 +++++++++++++++++++++++++-- 1 file changed, 127 insertions(+), 7 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index e8c7809e9..d67db16c8 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -55,8 +55,33 @@ "title": "Output Safe State", "id": "gg_outputs_safe_state", "group": "g_outputs" - }, + { + "title": "Protection Mode", + "id": "gg_protection", + }, + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + { + "title": "Protection channel {{out_num}}", + "group": "gg_protection", + "id": "gg_protection_channel_{{out_num}}", + }, + { + "title": "Protection channel {{out_num}} power", + "group": "gg_protection_channel_{{out_num}}", + "id": "gg_protection_channel_{{out_num}}_power", + }, + { + "title": "Protection channel {{out_num}} high voltage", + "group": "gg_protection_channel_{{out_num}}", + "id": "gg_protection_channel_{{out_num}}_high_voltage", + }, + { + "title": "Protection channel {{out_num}} low voltage", + "group": "gg_protection_channel_{{out_num}}", + "id": "gg_protection_channel_{{out_num}}_low_voltage", + }, + {% endfor -%} { "title": "Outputs group", "id": "gg_outputs_channels", @@ -110,6 +135,9 @@ ], "parameters": { + + + {% for in_num in range(FIRST_INPUT, OUTPUTS_NUMBER + 1) -%} {% if in_num == 0 -%} "in{{in_num}}_mode": { @@ -291,6 +319,9 @@ "enum_titles": ["no action", "reset", "set", "toggle"], "condition": "in{{in_num}}_mode==6" }, + {% endfor -%} + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "out{{out_num}}_safe_state": { "title": "Output {{out_num}}", "group": "gg_outputs_safe_state", @@ -332,6 +363,86 @@ ] }, {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + "out{{out_num}}_safe_mode_power_mode": { + "title": "Enable Power protection", + "group": "gg_protection_channel_{{out_num}}_power", + "order": 1, + "address": 930, + "reg_type": "holding", + "default": 0, + "enum": [0, 1], + "enum_titles": [ + "Off", + "On" + ] + }, + "out{{out_num}}_safe_mode_power_value": { + "title": "Level of high power protection, W", + "group": "gg_protection_channel_{{out_num}}_power", + "order": 2, + "address": {{ 946 + out_num - 1 }}, + "reg_type": "holding", + "default": 3000, + "min": 10, + "max": 4600, + "order": 2, + "condition": "out{{out_num}}_safe_mode_power_mode==1" + }, + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + "out{{out_num}}_safe_mode_voltage_high_mode": { + "title": "Enable High voltage protection", + "group": "gg_protection_channel_{{out_num}}_high_voltage", + "order": 1, + "address": 930, + "reg_type": "holding", + "default": 0, + "enum": [0, 1], + "enum_titles": [ + "Off", + "On" + ] + }, + "out{{out_num}}_safe_mode_voltage_high_value": { + "title": "Level of high voltage protection", + "group": "gg_protection_channel_{{out_num}}_high_voltage", + "order": 2, + "address": {{ 946 + out_num - 1 }}, + "reg_type": "holding", + "default": 260, + "min": 100, + "max": 400, + "order": 2, + "condition": "out{{out_num}}_safe_mode_voltage_high_mode==1" + }, + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + "out{{out_num}}_safe_mode_voltage_low_mode": { + "title": "Enable Low voltage protection", + "group": "gg_protection_channel_{{out_num}}_low_voltage", + "order": 1, + "address": 933, + "reg_type": "holding", + "default": 0, + "enum": [0, 1], + "enum_titles": [ + "Off", + "On" + ] + }, + "out{{out_num}}_safe_mode_voltage_low_value": { + "title": "Level of low voltage protection, V", + "group": "gg_protection_channel_{{out_num}}_low_voltage", + "order": 2, + "address": {{ 946 + out_num - 1 }}, + "reg_type": "holding", + "default": 200, + "min": 80, + "max": 230, + "order": 2, + "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" + }, {% endfor -%} "outputs_restore_state": { "title": "Outputs State After Power On", @@ -492,7 +603,7 @@ {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { - "name": "out {{out_num}} protection vh", + "name": "out {{out_num}} protection high voltage", "reg_type": "discrete", "address": {{out_num + 400}}, "type": "switch", @@ -500,7 +611,7 @@ "group": "gg_outputs_channels" }, { - "name": "out {{out_num}} protection vl", + "name": "out {{out_num}} protection low voltage", "reg_type": "discrete", "address": {{out_num + 402}}, "type": "switch", @@ -509,7 +620,7 @@ }, { - "name": "out {{out_num}} protection ch", + "name": "out {{out_num}} protection power", "reg_type": "discrete", "address": {{out_num + 404}}, "type": "switch", @@ -646,9 +757,9 @@ "Input {{in_num}} Long Press Counter": "Счетчик длинных нажатий входа {{in_num}}", "Input {{in_num}} Double Press Counter": "Счетчик двойных нажатий входа {{in_num}}", "Input {{in_num}} Shortlong Press Counter": "Счетчик коротких, а затем длинных нажатий входа {{in_num}}", - "out {{in_num}} protection ch":"Превышено напряжение на выходе {{in_num}}", - "out {{in_num}} protection vl":"Напряжение низкое на выходе {{in_num}}", - "out {{in_num}} protection vh":"Мощность превышена на выходе {{in_num}}", + "out {{in_num}} protection high voltage":"Превышено напряжение на выходе {{in_num}}", + "out {{in_num}} protection low voltage":"Напряжение низкое на выходе {{in_num}}", + "out {{in_num}} protection power":"Мощность превышена на выходе {{in_num}}", {% endfor -%} "Outputs": "Выходы", @@ -661,6 +772,15 @@ "Actions for outputs when the input is closed / opened": "Действия для выходов при замыкании / размыкании входа", + "Protection Mode": "Режимы защит", + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + "OutputPPP {{out_num}}": "Выход с защитой {{out_num}}", + "Output {{out_num}} Safe Mode Power": "Ограничение мощности на канале {{out_num}}", + "Output {{out_num}} Safe Mode HighVoltage": "Ограничение высокого напряжения на канале {{out_num}}", + "Output {{out_num}} Safe Mode LowVoltage": "Ограничение низкого напряжения на канале {{out_num}}", + {% endfor -%} + + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "Output {{out_num}}": "Выход {{out_num}}", "Output {{out_num}} Actions": "Действия для выхода {{out_num}}", From c9f04657a70aa0775c909787debf03c9aa3dfcc9 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 2 Feb 2024 15:27:26 +0700 Subject: [PATCH 03/24] hide some groups --- templates/config-wb-mrwm2.json.jinja | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index d67db16c8..eb8c9af1e 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -62,7 +62,7 @@ }, {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { - "title": "Protection channel {{out_num}}", + "title": "Channel {{out_num}} protection modes", "group": "gg_protection", "id": "gg_protection_channel_{{out_num}}", }, @@ -70,16 +70,31 @@ "title": "Protection channel {{out_num}} power", "group": "gg_protection_channel_{{out_num}}", "id": "gg_protection_channel_{{out_num}}_power", + "ui_options": { + "wb": { + "disable_title": true + } + } }, { "title": "Protection channel {{out_num}} high voltage", "group": "gg_protection_channel_{{out_num}}", "id": "gg_protection_channel_{{out_num}}_high_voltage", + "ui_options": { + "wb": { + "disable_title": true + } + } }, { "title": "Protection channel {{out_num}} low voltage", "group": "gg_protection_channel_{{out_num}}", "id": "gg_protection_channel_{{out_num}}_low_voltage", + "ui_options": { + "wb": { + "disable_title": true + } + } }, {% endfor -%} { @@ -405,7 +420,7 @@ ] }, "out{{out_num}}_safe_mode_voltage_high_value": { - "title": "Level of high voltage protection", + "title": "Level of high voltage protection, V", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 2, "address": {{ 946 + out_num - 1 }}, From cc3f9e7cdf27b23e18d1b229f1f284b15aa9f14d Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 2 Feb 2024 15:36:53 +0700 Subject: [PATCH 04/24] Update changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 247a9d05f..7eee388f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +wb-mqtt-serial (2.109.2) stable; urgency=low + + * WB-MRWM2 templates: add protection modes by power and low/high voltage + + -- Daniil Safonov Fri, 02 Feb 2024 17:00:00 +0600 + wb-mqtt-serial (2.109.1) stable; urgency=medium * MRM2mini template: fix curtains mapping matrix size From 27d494522283e3850d4df31a1edcc0e1d3ca8e51 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 2 Feb 2024 15:38:55 +0700 Subject: [PATCH 05/24] rm spaces --- templates/config-wb-mrwm2.json.jinja | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index eb8c9af1e..549e351ac 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -150,9 +150,6 @@ ], "parameters": { - - - {% for in_num in range(FIRST_INPUT, OUTPUTS_NUMBER + 1) -%} {% if in_num == 0 -%} "in{{in_num}}_mode": { @@ -795,7 +792,6 @@ "Output {{out_num}} Safe Mode LowVoltage": "Ограничение низкого напряжения на канале {{out_num}}", {% endfor -%} - {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "Output {{out_num}}": "Выход {{out_num}}", "Output {{out_num}} Actions": "Действия для выхода {{out_num}}", From c649797966d87dd9c8ad74a5ff31b8e3d76a6dd3 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 19 Feb 2024 16:10:31 +0700 Subject: [PATCH 06/24] update registers for high/low voltage protection --- templates/config-wb-mrwm2.json.jinja | 89 ++++++++++++++-------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 549e351ac..31979c004 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -66,16 +66,6 @@ "group": "gg_protection", "id": "gg_protection_channel_{{out_num}}", }, - { - "title": "Protection channel {{out_num}} power", - "group": "gg_protection_channel_{{out_num}}", - "id": "gg_protection_channel_{{out_num}}_power", - "ui_options": { - "wb": { - "disable_title": true - } - } - }, { "title": "Protection channel {{out_num}} high voltage", "group": "gg_protection_channel_{{out_num}}", @@ -376,38 +366,13 @@ }, {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} - "out{{out_num}}_safe_mode_power_mode": { - "title": "Enable Power protection", - "group": "gg_protection_channel_{{out_num}}_power", - "order": 1, - "address": 930, - "reg_type": "holding", - "default": 0, - "enum": [0, 1], - "enum_titles": [ - "Off", - "On" - ] - }, - "out{{out_num}}_safe_mode_power_value": { - "title": "Level of high power protection, W", - "group": "gg_protection_channel_{{out_num}}_power", - "order": 2, - "address": {{ 946 + out_num - 1 }}, - "reg_type": "holding", - "default": 3000, - "min": 10, - "max": 4600, - "order": 2, - "condition": "out{{out_num}}_safe_mode_power_mode==1" - }, {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "out{{out_num}}_safe_mode_voltage_high_mode": { "title": "Enable High voltage protection", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 1, - "address": 930, + "address": {{ 1306 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], @@ -420,7 +385,7 @@ "title": "Level of high voltage protection, V", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 2, - "address": {{ 946 + out_num - 1 }}, + "address": {{ 1300 + out_num - 1 }}, "reg_type": "holding", "default": 260, "min": 100, @@ -434,7 +399,7 @@ "title": "Enable Low voltage protection", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 1, - "address": 933, + "address": {{ 1308 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], @@ -447,7 +412,7 @@ "title": "Level of low voltage protection, V", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 2, - "address": {{ 946 + out_num - 1 }}, + "address": {{ 1302 + out_num - 1 }}, "reg_type": "holding", "default": 200, "min": 80, @@ -455,6 +420,31 @@ "order": 2, "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" }, + "out{{out_num}}_safe_mode_voltage_timeout_off": { + "title": "Level of high voltage protection, V", + "group": "gg_protection_channel_{{out_num}}_low_voltage", + "order": 2, + "address": {{ 1312 + out_num - 1 }}, + "reg_type": "holding", + "default": 100, + "min": 10, + "max": 600, + "order": 2, + "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" + }, + "out{{out_num}}_safe_mode_voltage_timeout_on": { + "title": "Level of high voltage protection, V", + "group": "gg_protection_channel_{{out_num}}_low_voltage", + "order": 2, + "address": {{ 1310 + out_num - 1 }}, + "reg_type": "holding", + "default": 0, + "min": 0, + "max": 600, + "order": 2, + "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" + }, + {% endfor -%} "outputs_restore_state": { "title": "Outputs State After Power On", @@ -617,7 +607,7 @@ { "name": "out {{out_num}} protection high voltage", "reg_type": "discrete", - "address": {{out_num + 400}}, + "address": {{out_num -1 + 1322}}, "type": "switch", "sporadic": true, "group": "gg_outputs_channels" @@ -625,20 +615,22 @@ { "name": "out {{out_num}} protection low voltage", "reg_type": "discrete", - "address": {{out_num + 402}}, + "address": {{out_num - 1 + 1324}}, "type": "switch", "sporadic": true, "group": "gg_outputs_channels" }, + {# { "name": "out {{out_num}} protection power", "reg_type": "discrete", - "address": {{out_num + 404}}, + "address": {{out_num - 1 + 1320}}, "type": "switch", "sporadic": true, "group": "gg_outputs_channels" }, + #} {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { @@ -650,6 +642,15 @@ "scale": 0.01, "group": "g_l{{out_num}}" }, + { + "name": "Irms L{{out_num}}", + "reg_type": "input", + "address": {{1298 + out_num - 1}}, + "type": "current", + "format": "u16", + "scale": 0.001, + "group": "g_l{{out_num}}" + }, { "name": "P L{{out_num}}", "reg_type": "input", @@ -736,7 +737,7 @@ ], "translations": { "en": { - "WB-MRWM2-template-title": "WB-MRWM2 (2-channel power metering relay)", + "WB-MRWM2-template-title": "WB-MRWM2 v222 (2-channel power metering relay)", "mode_description": "For using button mapping-matrix firmware v1.17.0 or newer is required", "outputs_state_after_power_on_description": "Option \"According to inputs\" works for latching switch mode only, firmware v1.18.4 or newer is required", "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.", @@ -759,7 +760,7 @@ "debounce_time_description": "For press detection must be 5-10 times less than second press waiting time. Adds a delay to the response to presses. Firmware up to 1.19.0 supports maximum 250 ms" }, "ru": { - "WB-MRWM2-template-title": "WB-MRWM2 (2-канальный модуль реле с измерением мощности)", + "WB-MRWM2-template-title": "WB-MRWM2 v222 (2-канальный модуль реле с измерением мощности)", {% for in_num in range(FIRST_INPUT, OUTPUTS_NUMBER + 1) -%} "Input {{in_num}}": "Вход {{in_num}}", From d8562dc1cc16150715e6eac2e485a225425182e3 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Wed, 21 Feb 2024 00:21:29 +0700 Subject: [PATCH 07/24] update of output status of voltage protection v0 --- templates/config-wb-mrwm2.json.jinja | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 31979c004..e41273a8d 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -612,6 +612,8 @@ "sporadic": true, "group": "gg_outputs_channels" }, + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { "name": "out {{out_num}} protection low voltage", "reg_type": "discrete", @@ -621,16 +623,6 @@ "group": "gg_outputs_channels" }, - {# - { - "name": "out {{out_num}} protection power", - "reg_type": "discrete", - "address": {{out_num - 1 + 1320}}, - "type": "switch", - "sporadic": true, - "group": "gg_outputs_channels" - }, - #} {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { @@ -771,7 +763,7 @@ "Input {{in_num}} Double Press Counter": "Счетчик двойных нажатий входа {{in_num}}", "Input {{in_num}} Shortlong Press Counter": "Счетчик коротких, а затем длинных нажатий входа {{in_num}}", "out {{in_num}} protection high voltage":"Превышено напряжение на выходе {{in_num}}", - "out {{in_num}} protection low voltage":"Напряжение низкое на выходе {{in_num}}", + "out {{in_num}} protection low voltage":"Занижено напряжение на выходе {{in_num}}", "out {{in_num}} protection power":"Мощность превышена на выходе {{in_num}}", {% endfor -%} From 48f959d3612c1ca6ae210761b0c7b1f12771717d Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 23 Feb 2024 01:14:30 +0700 Subject: [PATCH 08/24] rem current --- templates/config-wb-mrwm2.json.jinja | 9 --------- 1 file changed, 9 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index e41273a8d..a3e682ce4 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -634,15 +634,6 @@ "scale": 0.01, "group": "g_l{{out_num}}" }, - { - "name": "Irms L{{out_num}}", - "reg_type": "input", - "address": {{1298 + out_num - 1}}, - "type": "current", - "format": "u16", - "scale": 0.001, - "group": "g_l{{out_num}}" - }, { "name": "P L{{out_num}}", "reg_type": "input", From 3f6b55cd894442d99d12b2c7f9c524ce86cad523 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 23 Feb 2024 01:16:42 +0700 Subject: [PATCH 09/24] update address --- templates/config-wb-mrwm2.json.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index a3e682ce4..5f7252aa3 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -385,7 +385,7 @@ "title": "Level of high voltage protection, V", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 2, - "address": {{ 1300 + out_num - 1 }}, + "address": {{ 1304 + out_num - 1 }}, "reg_type": "holding", "default": 260, "min": 100, From 0ebdeb088c59364be1f5c23786dc59ae1245c74b Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 23 Feb 2024 11:50:35 +0700 Subject: [PATCH 10/24] update adress --- templates/config-wb-mrwm2.json.jinja | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 5f7252aa3..f18606ac2 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -372,7 +372,7 @@ "title": "Enable High voltage protection", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 1, - "address": {{ 1306 + out_num - 1 }}, + "address": {{ 1360 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], @@ -385,7 +385,7 @@ "title": "Level of high voltage protection, V", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 2, - "address": {{ 1304 + out_num - 1 }}, + "address": {{ 1310 + out_num - 1 }}, "reg_type": "holding", "default": 260, "min": 100, @@ -399,7 +399,7 @@ "title": "Enable Low voltage protection", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 1, - "address": {{ 1308 + out_num - 1 }}, + "address": {{ 1350 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], @@ -421,10 +421,10 @@ "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" }, "out{{out_num}}_safe_mode_voltage_timeout_off": { - "title": "Level of high voltage protection, V", + "title": "voltage_timeout_off", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 2, - "address": {{ 1312 + out_num - 1 }}, + "address": {{ 1370 + out_num - 1 }}, "reg_type": "holding", "default": 100, "min": 10, @@ -433,7 +433,7 @@ "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" }, "out{{out_num}}_safe_mode_voltage_timeout_on": { - "title": "Level of high voltage protection, V", + "title": "voltage_timeout_on", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 2, "address": {{ 1310 + out_num - 1 }}, @@ -444,7 +444,6 @@ "order": 2, "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" }, - {% endfor -%} "outputs_restore_state": { "title": "Outputs State After Power On", @@ -607,7 +606,7 @@ { "name": "out {{out_num}} protection high voltage", "reg_type": "discrete", - "address": {{out_num -1 + 1322}}, + "address": {{out_num -1 + 1310}}, "type": "switch", "sporadic": true, "group": "gg_outputs_channels" @@ -617,7 +616,7 @@ { "name": "out {{out_num}} protection low voltage", "reg_type": "discrete", - "address": {{out_num - 1 + 1324}}, + "address": {{out_num - 1 + 1302}}, "type": "switch", "sporadic": true, "group": "gg_outputs_channels" From 0a3e86ff541374a2c615d68194b3796cd5434782 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 1 Mar 2024 11:25:41 +0700 Subject: [PATCH 11/24] added group gg_protection_channel_{{out_num}}_timeout --- templates/config-wb-mrwm2.json.jinja | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index f18606ac2..5695040cb 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -86,6 +86,16 @@ } } }, + { + "title": "Protection channel {{out_num}} timeout", + "group": "gg_protection_channel_{{out_num}}", + "id": "gg_protection_channel_{{out_num}}_timeout", + "ui_options": { + "wb": { + "disable_title": true + } + } + }, {% endfor -%} { "title": "Outputs group", @@ -422,27 +432,27 @@ }, "out{{out_num}}_safe_mode_voltage_timeout_off": { "title": "voltage_timeout_off", - "group": "gg_protection_channel_{{out_num}}_low_voltage", + "group": "gg_protection_channel_{{out_num}}_timeout", "order": 2, - "address": {{ 1370 + out_num - 1 }}, + "address": {{ 1334 + out_num - 1 }}, "reg_type": "holding", "default": 100, "min": 10, "max": 600, "order": 2, - "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" + "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1||out{{out_num}}_safe_mode_voltage_high_mode==1" }, "out{{out_num}}_safe_mode_voltage_timeout_on": { "title": "voltage_timeout_on", - "group": "gg_protection_channel_{{out_num}}_low_voltage", + "group": "gg_protection_channel_{{out_num}}_timeout", "order": 2, - "address": {{ 1310 + out_num - 1 }}, + "address": {{ 1342 + out_num - 1 }}, "reg_type": "holding", "default": 0, "min": 0, "max": 600, "order": 2, - "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" + "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1||out{{out_num}}_safe_mode_voltage_high_mode==1" }, {% endfor -%} "outputs_restore_state": { From 62ba7eb19b73fc2a60ecee507fa6b502d4d5a2e7 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 1 Mar 2024 11:28:51 +0700 Subject: [PATCH 12/24] update address --- templates/config-wb-mrwm2.json.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 5695040cb..ac2270337 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -382,7 +382,7 @@ "title": "Enable High voltage protection", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 1, - "address": {{ 1360 + out_num - 1 }}, + "address": {{ 1326 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], @@ -409,7 +409,7 @@ "title": "Enable Low voltage protection", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 1, - "address": {{ 1350 + out_num - 1 }}, + "address": {{ 1318 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], From 5ac5151404e8567fbcbe8062aecd1b1e24f11d51 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Fri, 1 Mar 2024 14:35:00 +0700 Subject: [PATCH 13/24] switch address of value and enable --- templates/config-wb-mrwm2.json.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index ac2270337..eedf9542b 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -395,7 +395,7 @@ "title": "Level of high voltage protection, V", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 2, - "address": {{ 1310 + out_num - 1 }}, + "address": {{ 1318 + out_num - 1 }}, "reg_type": "holding", "default": 260, "min": 100, @@ -409,7 +409,7 @@ "title": "Enable Low voltage protection", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 1, - "address": {{ 1318 + out_num - 1 }}, + "address": {{ 1310 + out_num - 1 }}, "reg_type": "holding", "default": 0, "enum": [0, 1], From 8b93e5362291e46ef24f0dd09f338142367699f9 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Wed, 6 Mar 2024 18:37:16 +0700 Subject: [PATCH 14/24] added _power_on flag --- templates/config-wb-mrwm2.json.jinja | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index eedf9542b..47c9257f3 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -96,6 +96,16 @@ } } }, + { + "title": "Protection channel {{out_num}} auto power on", + "group": "gg_protection_channel_{{out_num}}", + "id": "gg_protection_channel_{{out_num}}_power_on", + "ui_options": { + "wb": { + "disable_title": true + } + } + }, {% endfor -%} { "title": "Outputs group", @@ -454,6 +464,19 @@ "order": 2, "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1||out{{out_num}}_safe_mode_voltage_high_mode==1" }, + "out{{out_num}}_safe_mode_power_on": { + "title": "Enable auto power on", + "group": "gg_protection_channel_{{out_num}}_power_on", + "order": 1, + "address": {{ 1350 + out_num - 1 }}, + "reg_type": "holding", + "default": 0, + "enum": [0, 1], + "enum_titles": [ + "Off", + "On" + ] + }, {% endfor -%} "outputs_restore_state": { "title": "Outputs State After Power On", From 23d88d9e631a725d848084c19423c7f784cb245d Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Tue, 12 Mar 2024 12:29:34 +0700 Subject: [PATCH 15/24] remove debug symbols --- templates/config-wb-mrwm2.json.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 47c9257f3..e245be1d3 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -752,7 +752,7 @@ ], "translations": { "en": { - "WB-MRWM2-template-title": "WB-MRWM2 v222 (2-channel power metering relay)", + "WB-MRWM2-template-title": "WB-MRWM2 (2-channel power metering relay)", "mode_description": "For using button mapping-matrix firmware v1.17.0 or newer is required", "outputs_state_after_power_on_description": "Option \"According to inputs\" works for latching switch mode only, firmware v1.18.4 or newer is required", "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.", @@ -775,7 +775,7 @@ "debounce_time_description": "For press detection must be 5-10 times less than second press waiting time. Adds a delay to the response to presses. Firmware up to 1.19.0 supports maximum 250 ms" }, "ru": { - "WB-MRWM2-template-title": "WB-MRWM2 v222 (2-канальный модуль реле с измерением мощности)", + "WB-MRWM2-template-title": "WB-MRWM2 (2-канальный модуль реле с измерением мощности)", {% for in_num in range(FIRST_INPUT, OUTPUTS_NUMBER + 1) -%} "Input {{in_num}}": "Вход {{in_num}}", From ef6bbe7aa63a1b7ef4a327354e6e5a0225ff6c22 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Thu, 21 Mar 2024 01:02:35 +0700 Subject: [PATCH 16/24] added Channel {{out_num}} status code --- templates/config-wb-mrwm2.json.jinja | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index e245be1d3..91d4349a3 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -637,23 +637,12 @@ {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { - "name": "out {{out_num}} protection high voltage", - "reg_type": "discrete", - "address": {{out_num -1 + 1310}}, - "type": "switch", - "sporadic": true, - "group": "gg_outputs_channels" - }, - {% endfor -%} - {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} - { - "name": "out {{out_num}} protection low voltage", - "reg_type": "discrete", - "address": {{out_num - 1 + 1302}}, - "type": "switch", + "name": "Channel {{out_num}} status code", + "reg_type": "holding", + "address": {{1294 + out_num - 1}}, + "type": "value", "sporadic": true, "group": "gg_outputs_channels" - }, {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} From c9f7f0b1920f94197d954656c87b551e836189a1 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Thu, 21 Mar 2024 18:58:56 +0700 Subject: [PATCH 17/24] save - try to use enum_titles --- templates/config-wb-mrwm2.json.jinja | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 62694f8f1..485d7f28c 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -645,8 +645,13 @@ "name": "Channel {{out_num}} status code", "reg_type": "holding", "address": {{1294 + out_num - 1}}, - "type": "value", - "sporadic": true, + "enum": [0, 1, 2], + "enum_titles": [ + "Normal", + "Low voltage", + "High voltage", + ], + "format": "u8", "group": "gg_outputs_channels" }, {% endfor -%} From e03d1572e0fed6938c5203e889229fbc121050d2 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Thu, 21 Mar 2024 18:59:28 +0700 Subject: [PATCH 18/24] update change log --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index c61d3df0c..3c6ed1f4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -wb-mqtt-serial (2.109.2) stable; urgency=low +wb-mqtt-serial (2.114.4) stable; urgency=low - * WB-MRWM2 templates: add protection modes by power and low/high voltage + * WB-MRWM2 templates: add low/high voltage protection - -- Daniil Safonov Fri, 02 Feb 2024 17:00:00 +0600 + -- Daniil Safonov Thu, 21 Mar 2024 18:18:33 +0600 wb-mqtt-serial (2.114.3) stable; urgency=medium From e1d2d16c155b83c6644c06904bd19490cd5167c7 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 25 Mar 2024 12:43:08 +0700 Subject: [PATCH 19/24] added readonly --- templates/config-wb-mrwm2.json.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 485d7f28c..84646855b 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -651,7 +651,7 @@ "Low voltage", "High voltage", ], - "format": "u8", + "readonly": true, "group": "gg_outputs_channels" }, {% endfor -%} From 269f5f912c02349c03f8b745f546c3031aba2af6 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 25 Mar 2024 12:43:27 +0700 Subject: [PATCH 20/24] added "type": "text", --- templates/config-wb-mrwm2.json.jinja | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 84646855b..813b43d2a 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -642,9 +642,10 @@ {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { - "name": "Channel {{out_num}} status code", + "name": "Channel {{out_num}} Protection Status", "reg_type": "holding", "address": {{1294 + out_num - 1}}, + "type": "text", "enum": [0, 1, 2], "enum_titles": [ "Normal", From f7e3ca8827fc2cb7087f0be3e798bb174a264291 Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 25 Mar 2024 12:43:59 +0700 Subject: [PATCH 21/24] update Text in GUI --- templates/config-wb-mrwm2.json.jinja | 34 +++++++++++++++++----------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 813b43d2a..3388c2700 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -62,12 +62,12 @@ "group": "g_outputs" }, { - "title": "Protection Mode", + "title": "Protection Setting", "id": "gg_protection", }, {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { - "title": "Channel {{out_num}} protection modes", + "title": "Channel {{out_num}} Protection Settings", "group": "gg_protection", "id": "gg_protection_channel_{{out_num}}", }, @@ -110,7 +110,7 @@ "disable_title": true } } - }, + }, {% endfor -%} { "title": "Outputs group", @@ -394,7 +394,7 @@ {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "out{{out_num}}_safe_mode_voltage_high_mode": { - "title": "Enable High voltage protection", + "title": "High Voltage Protection Enable", "group": "gg_protection_channel_{{out_num}}_high_voltage", "order": 1, "address": {{ 1326 + out_num - 1 }}, @@ -421,7 +421,7 @@ {% endfor -%} {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "out{{out_num}}_safe_mode_voltage_low_mode": { - "title": "Enable Low voltage protection", + "title": "Low Voltage Protection Enable", "group": "gg_protection_channel_{{out_num}}_low_voltage", "order": 1, "address": {{ 1310 + out_num - 1 }}, @@ -446,7 +446,7 @@ "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" }, "out{{out_num}}_safe_mode_voltage_timeout_off": { - "title": "voltage_timeout_off", + "title": "Protection Activation Delay Setting (in 1/10 sec)", "group": "gg_protection_channel_{{out_num}}_timeout", "order": 2, "address": {{ 1334 + out_num - 1 }}, @@ -458,7 +458,7 @@ "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1||out{{out_num}}_safe_mode_voltage_high_mode==1" }, "out{{out_num}}_safe_mode_voltage_timeout_on": { - "title": "voltage_timeout_on", + "title": "Protection Deactivation Delay Setting (in 1/10 sec)", "group": "gg_protection_channel_{{out_num}}_timeout", "order": 2, "address": {{ 1342 + out_num - 1 }}, @@ -470,7 +470,7 @@ "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1||out{{out_num}}_safe_mode_voltage_high_mode==1" }, "out{{out_num}}_safe_mode_power_on": { - "title": "Enable auto power on", + "title": "Auto restore last state", "group": "gg_protection_channel_{{out_num}}_power_on", "order": 1, "address": {{ 1350 + out_num - 1 }}, @@ -800,13 +800,21 @@ "Actions for outputs when the input is closed / opened": "Действия для выходов при замыкании / размыкании входа", - "Protection Mode": "Режимы защит", + "Protection Setting": "Настройка защиты", + "High Voltage Protection Enable": "Включение защиты от высокого напряжения", + "Level of high voltage protection, V": "Уровень защиты от высокого напряжения, В", + "Low Voltage Protection Enable": "Включение защиты от низкого напряжения", + "Level of low voltage protection, V": "Уровень защиты от низкого напряжения, В", + "Protection Activation Delay Setting (in 1/10 sec)": "Настройка задержки активации защиты (1/10 сек)", + "Protection Deactivation Delay Setting (in 1/10 sec)": "Настройка задержки деактивации защиты (1/10 сек)", + "Auto restore last state": "Автоматическое восстановление последнего состояния", {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} - "OutputPPP {{out_num}}": "Выход с защитой {{out_num}}", - "Output {{out_num}} Safe Mode Power": "Ограничение мощности на канале {{out_num}}", - "Output {{out_num}} Safe Mode HighVoltage": "Ограничение высокого напряжения на канале {{out_num}}", - "Output {{out_num}} Safe Mode LowVoltage": "Ограничение низкого напряжения на канале {{out_num}}", + "Channel {{out_num}} Protection Settings": "Настройки защиты канала {{out_num}}", + "Channel {{out_num}} Protection Status": "Статус защиты канала {{out_num}}", {% endfor -%} + "Normal": "Норма", + "Low voltage": "Низкое напряжение", + "High voltage": "Высокое напряжение", {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} "Output {{out_num}}": "Выход {{out_num}}", From fe1d3984910c4a9eb571391f7086538e57a90ccb Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 25 Mar 2024 14:09:56 +0700 Subject: [PATCH 22/24] Update changelog --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f78798712..f76acfd39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -wb-mqtt-serial (2.114.5) stable; urgency=low +wb-mqtt-serial (2.114.5) testing; urgency=medium - * WB-MRWM2 templates: add low/high voltage protection + * WB-MRWM2 template: add low/high voltage protection -- Daniil Safonov Mon, 25 Mar 2024 13:49:33 +0600 From 51bb894162ddcd4bfbf45eda91a7219b20fca9ac Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 25 Mar 2024 15:06:15 +0700 Subject: [PATCH 23/24] try jump version --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f76acfd39..a57fcc633 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -wb-mqtt-serial (2.114.5) testing; urgency=medium +wb-mqtt-serial (2.115.8) testing; urgency=medium * WB-MRWM2 template: add low/high voltage protection From 28ced950a4555df1dc30319232671d3d6addf7be Mon Sep 17 00:00:00 2001 From: Daniil Safonov Date: Mon, 25 Mar 2024 16:38:53 +0700 Subject: [PATCH 24/24] Revert "try jump version" --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a57fcc633..f76acfd39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -wb-mqtt-serial (2.115.8) testing; urgency=medium +wb-mqtt-serial (2.114.5) testing; urgency=medium * WB-MRWM2 template: add low/high voltage protection