From 145cad5f389c4e0ef313d2f06b34f5bbebe2e751 Mon Sep 17 00:00:00 2001 From: Andrei Smaliak Date: Tue, 5 May 2026 20:10:50 +0400 Subject: [PATCH] remove embedded repo It-screenClient --- .gitignore | 1 + It-screenClient | 1 + .../modbus_profiles/rs485_pt100_tzt.json | 114 ++++++++++++++++++ stage_z2m/stage_z2m_lib.sh | 6 +- 4 files changed, 119 insertions(+), 3 deletions(-) create mode 160000 It-screenClient create mode 100644 stage_ui/console_core/modbus_profiles/rs485_pt100_tzt.json diff --git a/.gitignore b/.gitignore index 857d398..d98acaa 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ __pycache__/ *.zip *:Zone.Identifier client/ +It-screenClient/ diff --git a/It-screenClient b/It-screenClient new file mode 160000 index 0000000..21ba434 --- /dev/null +++ b/It-screenClient @@ -0,0 +1 @@ +Subproject commit 21ba43446b7f7eaca5c777af275ac63f481e8e03 diff --git a/stage_ui/console_core/modbus_profiles/rs485_pt100_tzt.json b/stage_ui/console_core/modbus_profiles/rs485_pt100_tzt.json new file mode 100644 index 0000000..ff377a8 --- /dev/null +++ b/stage_ui/console_core/modbus_profiles/rs485_pt100_tzt.json @@ -0,0 +1,114 @@ +{ + "family": "rs485_pt100_tzt", + "title": "RS485_PT100_TZT", + "display_name": "RS485 PT100 Temperature Sensor", + "discovery_enabled": false, + "transport": { + "protocol": "modbus_rtu", + "default_port": "/dev/ttyS3", + "default_baud": 2400, + "default_parity": "none", + "default_databits": 8, + "default_stopbits": 1, + "scan_baud": [2400, 4800, 9600], + "scan_parity": ["none"], + "zero_based": true + }, + "detection": { + "type": "u16", + "function": "holding", + "start": 2, + "count": 1, + "label": "reg2 (slave_id)", + "match": ["__pt100_oem_fallback__"], + "timeout_quick": 1.8, + "timeout_deep": 3.2 + }, + "registers": { + "test_read": { + "address": 0, + "count": 1, + "type": "holding" + }, + "slave_id": { + "address": 2, + "count": 1, + "type": "holding", + "rw": true + }, + "comm_profile": { + "address": 3, + "count": 1, + "type": "holding", + "rw": true + } + }, + "summary_registers": { + "temperature": { + "address": 0, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "uint16", + "label": "reg0 (temperature x10)" + }, + "resistance": { + "address": 1, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "uint16", + "label": "reg1 (resistance x10)" + }, + "slave_id": { + "address": 2, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "uint16", + "label": "reg2 (slave_id)" + }, + "baud_code": { + "address": 3, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "enum", + "label": "reg3 (baud_code)", + "enum_map": { + "1": "2400", + "2": "4800", + "3": "9600" + } + }, + "unknown_parameter": { + "address": 4, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "uint16", + "label": "reg4 (unknown_parameter)" + }, + "reserved": { + "address": 5, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "uint16", + "label": "reg5 (reserved)" + }, + "unknown_mode": { + "address": 6, + "count": 1, + "type": "holding", + "decode_mode": "uint16", + "value_format": "uint16", + "label": "reg6 (unknown_mode)" + } + }, + "comm_profiles": [ + { "register_value": 1, "baud": 2400, "parity": "none", "label": "2400" }, + { "register_value": 2, "baud": 4800, "parity": "none", "label": "4800" }, + { "register_value": 3, "baud": 9600, "parity": "none", "label": "9600" } + ] +} diff --git a/stage_z2m/stage_z2m_lib.sh b/stage_z2m/stage_z2m_lib.sh index 67517e0..4b88025 100755 --- a/stage_z2m/stage_z2m_lib.sh +++ b/stage_z2m/stage_z2m_lib.sh @@ -526,7 +526,7 @@ yaml_remove_keys_in_section() { next } - if (in_section && $0 ~ "^[^[:space:]][^:]*:[[:space:]]*$") { + if (in_section && $0 ~ "^[^[:space:]][^:]*:[[:space:]]*") { in_section=0 } @@ -555,7 +555,7 @@ yaml_set_key() { next } - if (in_section && $0 ~ "^[^[:space:]][^:]*:[[:space:]]*$") { + if (in_section && $0 ~ "^[^[:space:]][^:]*:[[:space:]]*") { if (!key_found) { print " " key ": " value key_found=1 @@ -599,7 +599,7 @@ yaml_normalize_serial_section() { next } - if (in_section && $0 ~ "^[^[:space:]][^:]*:[[:space:]]*$") { + if (in_section && $0 ~ "^[^[:space:]][^:]*:[[:space:]]*") { if (!emitted) { print " port: " port_value print " adapter: " adapter_value