diff --git a/debian/changelog b/debian/changelog index 89362845e..f76acfd39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +wb-mqtt-serial (2.114.5) testing; urgency=medium + + * WB-MRWM2 template: add low/high voltage protection + + -- Daniil Safonov Mon, 25 Mar 2024 13:49:33 +0600 + wb-mqtt-serial (2.114.4) stable; urgency=medium * WB-MSW v3 template: add support for high resolution temperature and humidity channels diff --git a/templates/config-wb-mrwm2.json.jinja b/templates/config-wb-mrwm2.json.jinja index 928fb10c2..3388c2700 100644 --- a/templates/config-wb-mrwm2.json.jinja +++ b/templates/config-wb-mrwm2.json.jinja @@ -60,8 +60,58 @@ "title": "Output Safe State", "id": "gg_outputs_safe_state", "group": "g_outputs" - }, + { + "title": "Protection Setting", + "id": "gg_protection", + }, + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + { + "title": "Channel {{out_num}} Protection Settings", + "group": "gg_protection", + "id": "gg_protection_channel_{{out_num}}", + }, + { + "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 + } + } + }, + { + "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 + } + } + }, + { + "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", "id": "gg_outputs_channels", @@ -296,6 +346,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", @@ -337,6 +390,98 @@ ] }, {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + "out{{out_num}}_safe_mode_voltage_high_mode": { + "title": "High Voltage Protection Enable", + "group": "gg_protection_channel_{{out_num}}_high_voltage", + "order": 1, + "address": {{ 1326 + out_num - 1 }}, + "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, V", + "group": "gg_protection_channel_{{out_num}}_high_voltage", + "order": 2, + "address": {{ 1318 + 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": "Low Voltage Protection Enable", + "group": "gg_protection_channel_{{out_num}}_low_voltage", + "order": 1, + "address": {{ 1310 + out_num - 1 }}, + "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": {{ 1302 + out_num - 1 }}, + "reg_type": "holding", + "default": 200, + "min": 80, + "max": 230, + "order": 2, + "condition": "out{{out_num}}_safe_mode_voltage_low_mode==1" + }, + "out{{out_num}}_safe_mode_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 }}, + "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_high_mode==1" + }, + "out{{out_num}}_safe_mode_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 }}, + "reg_type": "holding", + "default": 0, + "min": 0, + "max": 600, + "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": "Auto restore last state", + "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", @@ -495,7 +640,23 @@ "group": "gg_outputs_channels" }, {% endfor -%} - {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} + { + "name": "Channel {{out_num}} Protection Status", + "reg_type": "holding", + "address": {{1294 + out_num - 1}}, + "type": "text", + "enum": [0, 1, 2], + "enum_titles": [ + "Normal", + "Low voltage", + "High voltage", + ], + "readonly": true, + "group": "gg_outputs_channels" + }, + {% endfor -%} + {% for out_num in range(1, OUTPUTS_NUMBER + 1) -%} { "name": "Urms L{{out_num}}", "reg_type": "input", @@ -624,6 +785,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 high voltage":"Превышено напряжение на выходе {{in_num}}", + "out {{in_num}} protection low voltage":"Занижено напряжение на выходе {{in_num}}", + "out {{in_num}} protection power":"Мощность превышена на выходе {{in_num}}", {% endfor -%} "Outputs": "Выходы", @@ -636,6 +800,22 @@ "Actions for outputs when the input is closed / opened": "Действия для выходов при замыкании / размыкании входа", + "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) -%} + "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}}", "Output {{out_num}} Actions": "Действия для выхода {{out_num}}",